When using ASP.NET AJAX Extensions to transition your site to an AJAX experience, there are two main programming models to choose from: partial rendering and script services. In last month's column, I discussed partial rendering from a primarily architectural perspective. Simply put, with partial rendering, you don't need to change the underlying architecture of an ASP.NET application—it's an easy route to implementing some of the best elements of AJAX, such as no-flicker updates to pages on your site. This enhanced behavior is achieved by simply adding a few new server controls (specifically, ScriptManager and UpdatePanel) and having them silently perform a few tricks to transform a traditional postback in an asynchronous request run through the XMLHttpRequest object. This approach is pretty easy as it simply applies AJAX functionality to the existing Web development model.
If you're ready for a full paradigm shift in building AJAX applications, then you should be looking at the script services approach. All in all, the typical AJAX architecture is fairly easy to understand. Figure 1 illustrates a high-level view of how it works. There's a back end made of application-specific services, which are usually just an AJAX script-callable façade on top of the middle tier of the system where the business logic lives and works. Services and the front end exchange data via HTTP using a variety of formats to pass parameters and return values. After receiving and processing data, the front end, which is made of JavaScript code running on the client, faces the nontrivial task of building a graphical UI using HTML and JavaScript. The reliance on JavaScript is a structural constraint of the browser and this will only change once the browser can support more powerful programming capabilities.