Postbacks and View State


Overview

One of the main goals in developing a web site is to provide the best possible experience for the site's users. To achieve that goal, the site developer must do many things, including but not limited to creating a pleasant look and feel for the site, making the site intuitive for the end users, and finally, keeping the time it takes to communicate between the client and server as limited as possible. That last item has been a challenge for web site developers for years.

When a user goes to a web site, the remote web server performs a series of events. It receives the request, processes events required by the web application, and then sends the rendered HTML to the client browser. The events are processed on the server side, and what this means is the server must use valuable resources to parse each page and then send it to the client browser as HTML, which is often seen as a disadvantage. One of the major advantages of using server side is that it is browserindependent, so you don't have to worry about variations between browsers. Everything done by the ASP.NET framework is done on the server side.

When events are rendered on the user's machine instead of on the remote server, they are rendered on the client side. The major advantage of using client side is that each web browser uses its own resources to execute the code found on the web page, thus taking the workload away from the remote web server. The main disadvantages are that a developer cannot use client-side code to access local files, directories, or databases. In addition, various browsers may not be able to support all methods received from the server. Probably the best general example of something being done on the client side is JavaScript.

Over the years, developers have found that a combination of both client-side and server-side scripting is often best to achieve the desired results. One of the disadvantages of this combination is that it requires the developer to understand how to write code for both the server side and the client side. For example, a DotNetNuke developer would be required to understand one of the .NET languages, probably VB.NET, and JavaScript in addition to HTML. This can be difficult for a developer because a solid understanding of all three programming languages in this example would be required to achieve the best possible result.




Professional DotNetNuke 4.0 (c) Open Source Web Application Framework for ASP. NET 4.0
Professional DotNetNuke 4: Open Source Web Application Framework for ASP.NET 2.0 (Programmer to Programmer)
ISBN: 0471788163
EAN: 2147483647
Year: 2006
Pages: 182

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net