Datasheet
❑ Because ASP.NET is based on the common language runtime (CLR) and .NET, ASP.NET does
not suffer from the versioning problems of COM. The .NET framework allows for multiple
versions of components to be on a system without their interacting with each other.
❑ ASP.NET is compiled. The first time that a file is loaded, it is compiled and then processed. The
compiled file is then saved into a temporary directory. Subsequent calls to the ASP.NET file are
processed from the compiled file. The execution of the compiled file on requests is faster than
the interpreted environment of classic ASP.
All in all, ASP.NET is a dramatic improvement over ASP and has become widely accepted in the devel-
opment community.
So, What’s the Problem?
Based on what you have just read regarding ASP.NET, it may sound really good to you. You may be asking
yourself, “Why is there a need for something else? What’s the problem?”
The truth is that ASP.NET has several issues that need to be addressed:
❑ Round trips — The server events in ASP.NET require round trips to the server to process these
events. These round trips result in all form elements being sent between client and server as
well as images and other data files being sent back to the client from the server. Though some
web browsers will cache images, there can still be significant data transfer.
❑ Speed/network data transfer — Because of the
ViewState hidden form element, the amount of
data that is transferred during a postback is relatively large. The more data and controls on the
page, the larger the
ViewState will be and the more data that must be processed on the server
and transmitted back to the client.
❑ Waiting on the result — When a user clicks a button or some other visual element that posts
back data to the server, the user must wait for a full round trip to complete. This takes time
when the processing is done on the server and all the data, including images and
ViewState,
are returned to the client. During that time, even if the user attempts to do something with the
user interface, that action is not actually processed on the client.
❑ User context — Unless an application is able to properly use the
SMARTNAVIGATION feature of
ASP.NET, the user is redirected to the top of a page by default on a postback. Though there are
ways around this issue, this is the default behavior.
❑ Processing — The number of server round trips, amount of data that is transferred, and the
ViewState element’s size result in processing on the server that is not really necessary.
Users typically do something, data is sent to the server, the web server processes it, and the result is
finally sent to back to the user. While the server is processing the data, the user interface is “locked”
so that additional operations don’t happen until a result is returned to the user.
4
Chapter 1: Introduction to ASP.NET AJAX
12830c01.qxd:WroxPro 6/4/07 1:48 PM Page 4