Thursday, September 24, 2009

Ajax in Jspx

Since the first time Ajax hit the road, the whole web world just shifted the way the whole things are made. Although the technologies composing Ajax was there far before, the term was coined in 2005. People started to think differently, by people we mean Customers and Providers. Customers now expecting more and Providers are raising the bar.
Just imagine Facebook without ajax. It would be very irritating when every single action requires refreshing the whole page. Imagine that you wall will be refreshed only when you manually refresh the whole page!.

Although ajax is a mandatory feature in almost and every website,Ajax fever started very lately around 2006. Back then, most of the current Web Frameworks were casted and not ready for native support for ajax.

The first support for ajax in ASP.NET was an open source project named Magic Ajax. The name is well describing the tool as the most important criteria about any tool as how clean to use the tool and how clean and unuse it. I have seen a lot of tools with an innovative ideas. But were never used because of the amount of efforts required to use it. Magaic Ajax just were almost simple.

On the other sore in the Java world, JSF introduced rich faces with new set of tags to support rich ajax controls.

Jspx initially did not support ajax, starting from build beta 0.0.11 and beta 0.0.12
till the first final build 1.0.0. The support of ajax was introduced in build 1.0.1.
Supporting ajax in jspx followed the below constraint:
  1. Less efforts to add or remove ajax.
  2. Backward compatibility should be always supported.
 The solution was to provide a new control AjaxPanel. This control will be functioning as following:
  1. The HTML controls wrapped within AjaxPanel will be only acting ajaxly.
  2. The content of the AjaxPanel will be only updated when an event is fired from a control within the panel.
  3. Enabling Ajax requires only adding the AjaxPanel tag.
  4. Disabling Ajax requires only removing the AjaxPanel tag.
The above strategy assures the less efforts for supporting ajax in jspx applications.

No comments:

Post a Comment