Before .NET Ajax architecture, let’s discuss how both an Ajax and a non-Ajax web application work. In a non-Ajax web application environment, the Http request that is sent by the client browser is directly processed at the web server at the server side. The web server processes this incoming request and returns the response back to the client browser in the form of HTML and CSS. This happens synchronously—that is, the browser has to wait until the request is complete.
On the contrary, in an Ajax web application environment, the Ajax engine sits in between the client browser and the web server. It is the Ajax layer that is responsible for initiating requests both synchronously and asynchronously to the web server. The web server processes these incoming requests and returns the response to the Ajax engine rather than the client browser directly. The Ajax engine returns the HTML and CSS data to the client browser. This model facilitates faster responsiveness by minimizing postback delays and also by reducing the server overheads and network loads. Figures 2.2 and 2.3 illustrate how these two models work.
There are two perspectives to the ASP.NET Ajax architecture: the server and the client. In other words, you get two APIs with this framework: the server-side API and the client-side API. We will learn both of them as we progress through this section.
We refer to the client API as the client framework and the server API as the server framework. It should also be noted that the client framework is not tightly coupled to the server framework—that is, the client framework can work independent of the server framework. Thus, you can use the client framework to design and develop applications even in PHP or other web-based languages as well!
Ajax Architecture in ASP.NET
Hot on Web: