« ASP.Net AJAX Programming models | Main | How to make your web site work in all browsers »

February 22, 2008

Pros and cons of Programming models (AJAX)

Server Centric Programming Model

Compared to the client-centric programming model, the Server-centric programming model is easy to implement. All we need to know is develop the Asp.net application and then wrap certain areas of the page with UpdatePanels. By doing so, we will be using the minimal Ajax implementation.

Using UpdatePanels means posting the entire page to the server. Even when the required update to the web page is minimal, every asynchronous postback results in more server side processing. This results in downgraded performance.

From coding point of view, using UpdatePanel control results in elegant code. Sections of the page are wrapped by the UpdatePanels and all Ajax processing is taken up by the UpdatePanel control.

The server-centric approach denies granular level of control to the developer which is needed for sophisticated interactive web applications.

Client-Centric programming model

The Client-centric approach is adopted to build sophisticated interactive web applications. Such application scan be developed by using JavaScript, which means a high degree of expertise.

The Client-centric approach involves using ScriptManager control which enables calling of methods of a class bypassing the asp.net page life cycle. Which means, optimum usage of server resources.

Because we use client side DHTML controls, during a response, only required data from the server is re