« Videos and Podcasts for Social networking | Main | Personalise your own dashboard with yourminis »

Nov14
The Usage of Ajax

Ajax is a prevalent sight in so many new Web 2.0 sites nowadays. The momentum is taking off with the wave of Web 2.0 webajaxgoogle.jpg applications being rolled out in recent months or 2006. For a web developer, Ajax requires a different way of thinking, as the traditional round trip communication between the web server and the browser is no longer necessary. The data returned to the browser no longer has to have a full xhtml compliant structure to be rendered. In fact, they can be injected into any existing html element on the page and be considered structurally part of that page (there must be some security implications here, surely ?!). Why is this a good thing ? Think interactivity ! You can allow visitors to vote, take surveys, chat etc. without ever leaving the page. Sure, all this used to be made possible using hidden frames and iframes, but the advantage is the new Ajax model ensures all the elements are still part of the same page and you do not have to traverse the DOM (Document Object Model) to get to the part of the page you want to update.

I like Ajax because :

  • Ajax calls are more bandwidth efficient. If you have a large page with mostly static text and only portions of it need to be changed per request, Ajax provides a better mechanism for doing this than standard form submit
  • The auto-complete feature (like in Google Suggest) is more user friendly than selecting from a dropdown or a page full of alphabet letters
  • A typical Ajax request can have individual hooks for the life of the request, giving you a much better way to inform the user of the progress as the call is being completed
  • You can put it on your CV/Resumé that you have done it
  • Ajax is great for hiding your HTML source. If you use Ajax to deliver the more sensitive contents, your competitors will have great diffculty trying to reverse engineer your code (although if he is really determined, he will find a way !).

  • I do not like Ajax because (well, to be more precise, these are the gotchas) :

  • Ajax can not be used for uploading binary data like images or PDF's
  • The auto-complete feature can generate massive number of round trip requests to the server, which could potentially skew the performance analytics on the site. Also, network latency can in a way spoil the user experience for this feature
  • You can not push Adsense ads into an Ajax response. Google Adsense is the way most webmasters generate income on the side, and it needs to be able to crawl your site for the page it was embedded in, in order to deliver the relevant ads. As Ajax calls are injected into the page, the contents are invisible to Google Adsense
  • An Ajax enabled page is stateful, meaning it preserves the context for the interactions you have made with the page. If you click on the Back button on your browser, this context is completely destroyed and you have to start from scratch again. You can implement Ajax patterns to support the Back button, but this will have to be designed into each page
  • Ajax is a nightmare to debug, specially because the Ajax contents can not be viewed using the conventional right click, View source ... trick
  • Ajax uses Javascript extensively, this means you have to reach a certain degree of competence with Javascript if you want to do anything more sophisticated than Hello World. Also the other two bad side effects with Javascript are:
    1. some search engines are blind to Javascript, or can not index it properly
    2. if you have a confirmer (e.g. Are you sure you want to delete this very important record ? (Y/N)) on a Javascript URL, it is completely ignored by the bots, so do not be surprised if all your subscribers get cleaned out the morning after the crawler visited your site
  • Can anything be done in Ajax that can not be achieved with tradditional web techniques ? I have not found any yet. Then why should developers adopt Ajax ? I think this is not a yes or no kind of answer. A mix of the two is probably the best way to achieve your goal. Ajax is not the best thing since Britney Spears but it has its uses.


    0 Comments/Trackbacks




    submit a trackback

    TrackBack URL for this entry:

    post a comment

    Name, Email Address, and URL are not required fields.





    Comment Preview

    « Videos and Podcasts for Social networking | Main | Personalise your own dashboard with yourminis »

    Advertise


    Related Resources

    Advertise Here

    recent comments

      sponsored ads



      subscribe


      Prefer Email?
      Subscribe below-

      Enter your Email:


      Powered by FeedBlitz What's this?

      Current News

      Support This Blog

      blogroll


      business social media

      Use these fast growing business social media sites to promote your business, feature your products, spotlight your business leaders, create links, and drive traffic back to your company site, all for free!

      BIZZlogos - Add your logo - free link to your site
      BIZZphotos - Add photos of your products and people
      BIZZprofiles - Submit your profile and build your online visibility
      BIZZspotlight - Spotlight your business with free links
      BIZZvideos - Videos about businesses, products and business people.
      BIZZbites - "Digg" for Business - Submit your articles and posts

      Know More Media - Technology / Computers / Software

      know more media network

      View Network Map

      Network Feed List (OPML)

      Know More Media Network
      Feed


      we support unitus

      PRWeb

      Influencer



      ITechTips is a member of the Know More Media network of business related blogs.

      Here are some current headlines from some of our business publications:

      ProductivityGoal

      CallCenterScript

      AdHurl

      TheBizofKnowledge

      LandingTheDeal

      CustomersAreAlways

      HealthCareVox

      BrainBasedBusiness

      TheInsurancePolicy

      MarketingBlurb