Postbacks from the Edge
By Jonathan Goodyear
There are a lot of features about smart client applications that make them superior to Web applications. For instance, seamless application state, richer user interface options, and usage while disconnected from the network. When I m working on an ASP.NET Web application, I miss all of those features (and more). I accept their absence, though, as justifiable costs of building an application where I don t have control over the operating system on each user s computer. However, one thing I cannot stand for in this day of modern application development is the antiquated page postback mechanism that almost every Web application uses. Although the pictures and fonts are prettier now, something about that just screams Cobol green screen console application. How dumb is it that we repaint the entire browser window whenever we submit some data to the Web server?
Developer excitement over the Google applications and the catchiness of the new acronym has finally led to the increasing usage of asynchronous communication in Web user interfaces that should have happened a long time ago. In addition, a developer named Michael Schwarz has developed a robust free .NET library that implements the Ajax methodology (http://ajax.schwarz-interactive.de/). The value-add there is that the Ajax.NET library does all the heavy lifting for you. All you have to do is label your server methods using an AjaxMethod attribute and add an HttpHandler definition to web.config that helps wire everything together. There are a couple of other small steps, but they are all very simple. The best part is that it works with ASP.NET v1.1, so you can use it in production applications today.
Jonathan Goodyear is president of ASPSoft (http://www.aspsoft.com), an Internet consulting firm based in Orlando, FL. Jonathan is Microsoft Regional Director for Florida, a Microsoft Certified Solution Developer (MCSD), and author of Debugging ASP.NET (New Riders). Jonathan also is a contributing editor for asp.netPRO. E-mail him at mailto:[email protected] or through his angryCoder eZine at http://www.angryCoder.com.