The Evolution of the Web
Static Web Pages Dynamic Scripts Distributed,
Content was static. To
Dynamic scripts allowed for
alter the look and feel of a
Web page, a programmer user interaction with a Web
Web pages are actual,
had to physically alter the site. Web content could be
programs created using
contents of the page itself. dynamically generated based
on a number of variables,
The static nature of the techniques. These programs
such as user input. Allowed
Web at this time removed are compiled instead of
for the Web to serve as an
any possibility of a user interpreted like the scripts of
interacting with a Web site the past.
or interaction among Web Development was anything
A focus on Inter-Web server
sites. but easy. The scripting
nature of development led to
Performance was great and developers to build truly
poor programming practices
distributed applications on
development easy, but the and “messy” code. Also,
Web lacked any real the Web.
interaction among Web sites
usability. was possible, but limited and
Problems with ASP Today
• Nasty code - content and code are helplessly mixed as code
snippets are sprinkled around HTML blocks.
• Deploying an ASP application is difficult, potentially
requiring setting changes to the IIS metabase and
registration of various COM components.
• Common tasks, such as server-side form validation,
displaying database results, caching data, user
authentication, uploading binary files, etc., are difficult.
• Scripting languages offer poorer performance and
encourage more spaghetti-like code than their compiled
• Terrible (terrible!!!) debugging support…
ASP+ to the Rescue!
• ASP+ pages are created with the syntax of modern,
compiled programming languages - either VB (not
VBScript), JScript.NET, C#, or others.
• The registry is no more. Components no longer need to be
registered. Deployment is as simple as XCOPY
• ASP+ provides several, customizable, server-side controls
for common tasks: validation, file upload, database
• ASP+ provides mechanisms for inter-Web server
communication, regardless of the Web server or platform.
• Exceptional debugging tools and options.
The Makeup of ASP+
ASP+ Web ASP+ Web
ASP+ Application Layer
ASP+ Web Pages
• These serve the same purpose as ASP pages today:
a dynamic Web page users can visit via the
• ASP+ pages have a .aspx extension, and are text
files, just like ASP pages. In fact, they can be
created to look remarkably like ASP. (Show
• ASP+ pages do not support VBScript. Rather,
pages are created with full-blown VB 7 (or
JScript.NET or C#).
Changes from VB6 to VB7
• No more default properties for objects:
objRS(“columnName”) will generate an error, must
• As a consequence, Set and Let are no longer supported.
• All calls to subroutines must have parenthesis
• Variables can be dimensioned and initialized
simultaneously: Dim i as Integer = 4
• Error handling now uses Try … Catch … Finally
blocks as opposed to On Error Goto.
• VB7 is (finally) a real OOP language. Now possible to use
polymorphism and true inheritance.
Changes from ASP Coding
Styles to ASP+ Coding Styles
• All functions and subs must exist in <SCRIPT
RUNAT=“server”> blocks (functions cannot
exist in the inline code (<% … %>)).
• ASP+ design encourages use of post-back forms
• ASP+ offers server controls. These controls
provide an object model developers can program
• ASP+ pages are designed to be event-driven as
opposed to procedural-based.
ASP+: Write Less Code
• Collecting and acting on user input… a
comparative look at ASP and ASP+
• Note the use of HTML server controls in
the ASP+ page. These are created by
adding the runat=“server” property to
standard HTML tags…
• Note that we can wire up events in the
Server-Side Validation Example
• With ASP, server-side validation was oft-
repeated and a ton of code…
• ASP+ introduces a number of Validation
controls to ease the task of validating form
• Show ValidationDemo.aspx
• For more info, visit:
Web Services: Inter-Server
CLIENT XML SERVER
Creating Web Services with
• Creating Web Services with ASP+ is as simple as
creating a class (show Math.asmx demo).
• Web service files have an .asmx extension.
• ASP+ creates a default description page for a
given .asmx file (show demo by visiting
• An .asmx files SDL (service description language)
can be viewed by visiting the .asmx file and
appending ?sdl to the QueryString.
Via HTTP Protocol, a Discovery
request is sent (DISCO)
Server returns Service Description SERVER
Language (SDL), describing Web service
Sends SOAP Request in format
specified in SDL
Sends SOAP Response,
Calling a Web Service from an
• A proxy class must be created based on the Web service’s
SDL. This task can be automated by
WebServiceUtil.exe (show Proxy class creation
• This proxy class must then be compiled into a DLL (show
compilation of proxy class) and moved into the \bin
• The Web service can then be accessed programmatically
from an ASP+ page (demo: show
• ASP+ is an entirely new way to create interactive,
distributed Web applications.
• ASP+ enables developers to write more powerful
applications with fewer lines of code.
• ASP+ addresses many of the disadvantages of
• ASP+ Web services allow for developers to create
truly distributed applications running over
To Learn More about ASP+
• Download the pre-beta bits at:
• Pick up a copy of Wrox’s A Preview to ASP+
(Anderson, Homer, Howard, and Sussman)
• Visit the many great ASP Web sites:
• Have your ASP+ Questions Answered at: