Sunday, October 17, 2010

Why use Ajax? Using Ajax for performance reasons

AJAX is a very powerful tool to the web world and adds another dimension to the eCommerce pages.

I have used this mainly:

1. For interactive or dynamic interfaces on the web.

2. To bypass the akamai cached pages for dynamic content. If you are not using partial caching for akamai pages. It is a very powerful tool for pricing\ATP Messaging in product and category pages.

3. For performance improvements. e.g. Accessories in a cart. As these events can be asynchronous and does not have to wait for the whole page to load up.

Out of the box DOJO is provided and I have used RICO for several years, when we did the comparisons at that time, it was strictly for performance reasons that RICO was chosen. And JQUERY seems to be the preferred choice now a days.

I have used primarily for?

1. Replace the complete DIV\SPAN as AJAX response.

2. Use JSON in the Ajax response to replace selected HTML elements.

Things to do for an Ajax call to work.

1. Register the Ajax event.

2. Write the custom controller command for the Ajax and register command and response in struts-config-ext.xml

3. Ajax response JSP to replace the HTML entity.

I have found it particularly interesting to use AJAX for performance for min-carts\Accessories and other places where the complete page reload can be avoided.

2 comments:

  1. Hi Raj,

    I am also planning to replace the DOJO with Jquery in one of the project i am doing.Are there any guidelines that you can suggest which i should keep in mind while i attempt to do this.

    Thanks
    Ashu

    ReplyDelete
  2. JQuery is awesome and I am sure there is lot of resources available online. I can't think of any specific issues.

    ReplyDelete