Page 22 - DCAP312_WEB_TECHNOLOGIES_II
P. 22
Web Technologies-II
Notes 1.7 Problems with Traditional ASP
There are many problems with ASP if you think of needs for Today’s powerful Web applications:
1. Interpreted and Loosely Typed Code
ASP scripting code is usually written in languages such as JScript or VBScript. The script
execution engine that Active Server Pages relies on interprets code line by line, every time
the page is called. In addition, although variables are supported, they are all loosely typed
as variants and bound to particular types only when the code is run. Both these factors
impede performance, and late binding of types makes it harder to catch errors when you
are writing code.
2. Mixes Layout (HTML) and Logic (Scripting Code)
ASP files frequently combine script code with HTML. This results in ASP scripts that are
lengthy, difficult to read, and switch frequently between code and HTML. The interspersion
of HTML with ASP code is particularly problematic for larger web applications, where
content must be kept separate from business logic.
3. Limited Development and Debugging Tools
Microsoft Visual InterDev, Macromedia Visual UltraDev, and other tools have attempted
to increase the productivity of ASP programmers by providing graphical development
environments. However, these tools never achieved the ease of use or the level of acceptance
achieved by Microsoft Windows application development tools, such as Visual Basic or
Microsoft Access. ASP developers still rely heavily or exclusively on Notepad.
Debugging is an unavoidable part of any software development process, and the debugging
tools for ASP have been minimal. Most ASP programmers resort to embedding temporary
Response. Write statements in their code to trace the progress of its execution.
4. No Real State Management
Session state is only maintained if the client browser supports cookies. Session state
information can only be held by using the ASP Session object. And you have to implement
additional code if you, for example, want to identify a user.
5. Obscure Configuration Settings
The configuration information for an ASP web application (such as session state and server
timeouts) is stored in the IIS metabase. Because the metabase is stored in a proprietary
format, it can only be modified on the server machine with utilities such as the Internet
Service Manager. With limited support for programmatically manipulating or extracting
these settings, it is often an arduous task to port an ASP application from one server to
another.
If your Web application makes use of components, copying new files to your
application should only be done when the Web server is stopped. Otherwise
it is like pulling the rug from under your application’s feet, because the
components may be in use and locked.
1.8 Advantages of ASP.NET
Following are the advantages of the ASP.NET are as:
1. Separation of Code from HTML
To make a clean sweep, with ASP.NET you have the ability to completely separate layout
and business logic. This makes it much easier for teams of programmers and designers to
16 LOVELY PROFESSIONAL UNIVERSITY