« 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 rendered. This reduces the network traffic.

From a coding point of view, JavaScript code used for various features of a web page results in more maintenance.

The client-side approach has its own limitations as it cannot handle rich UI elements like menus, treeviews, grids, etc.




TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/2783896/26417526

Listed below are links to weblogs that reference Pros and cons of Programming models (AJAX):

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Post a comment

Comments are moderated, and will not appear on this weblog until the author has approved them.

If you have a TypeKey or TypePad account, please Sign In

Twitter Updates

    follow me on Twitter
    AddThis Social Bookmark Button
    Blog powered by TypePad
    My Photo