Advantages and disadvatages of AJAX?

Discussion in 'Programming' started by Alvin, Aug 15, 2006.

  1. #1
    Can i get expert views on advantages and disadvantages of AJAX?

    I would like to know more about disadvantages...

    Thank you in advance...
     
    Alvin, Aug 15, 2006 IP
  2. gemini181

    gemini181 Well-Known Member

    Messages:
    2,883
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    155
    #2
    Good question :)
    Also, please, mention if there are server load issues w/ Ajax?

    Thanks.
     
    gemini181, Aug 15, 2006 IP
  3. Alvin

    Alvin Notable Member

    Messages:
    2,076
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Thats what I have heard that AJAX is brutal for server?
    is that right?
     
    Alvin, Aug 15, 2006 IP
  4. surefire

    surefire Guest

    Messages:
    40
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    AJAX is a tool and like any tool it can be used for great things or over used and misapplied. So AJAX itself is neither good nor bad.

    A common complaint is that there you can't use the back button since the whole goal of AJAX is to update the page 'on the fly' without leaving the page.

    Another complaint is that many AJAX apps aren't designed first to work without AJAX, before adding AJAX into the mix to make the user experience more intuitive. This is often referred to as accessibility. If you turn off javascript in your browser, would the site still function? If not, then you might want to reconsider your use of AJAX.

    I think server load really will be affected more by how the AJAX code is used rather than if it's used or not used.

    IMHO many times you see AJAX in use it was added for the sake of adding AJAX, not because it made the user experience any better.

    Finally, if you're going to start to dabble with AJAX, I suggest using one of the many javascript libraries that have become popular: scriptaculous, prototype, dojo, moofx... strange names aren't they.

    My favorite is jQuery
     
    surefire, Aug 16, 2006 IP
  5. knopix

    knopix Peon

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Dont AJAX-ify your entire site.
    Simple things like polls or signingu for a newsletter, AJAX is great for that.
    But making your entire navigation based on AJAX is not a good idea. Most users are still used to clicking the Back button, which will force them to leave your site.
     
    knopix, Aug 16, 2006 IP
  6. HanSolo42

    HanSolo42 Peon

    Messages:
    106
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Also, even though AJAX is somewhat standard, different browsers has small differences in javascript implementations that can be annoying to deal with.
     
    HanSolo42, Aug 16, 2006 IP
  7. 1EightT

    1EightT Guest

    Messages:
    2,646
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    0
    #7
    there are really only server load issues if you use ajax in an improper way. I saw someone using it for a who's online on a forum for example (terrible idea). I also saw a vbulletin instant messenger based on ajax (terrible idea)
     
    1EightT, Aug 16, 2006 IP
  8. etechsupport

    etechsupport Peon

    Messages:
    408
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yeah, if you use its in imoroper way the application may give a lousy experience to your users.
     
    etechsupport, Aug 17, 2006 IP
  9. Alvin

    Alvin Notable Member

    Messages:
    2,076
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    210
    #9
    What do you thing about using it for Rate feature(i.e. rating a picture or anything else)
     
    Alvin, Aug 17, 2006 IP
  10. DonkeyTeeth

    DonkeyTeeth Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I think AJAX is best used when there's a real need for a 'back and forth' between a database and a dynamic page.

    The main advantage is that it can process a user's action and display results without having to refresh the page.

    As far as server load, it really depends on how you set up your server scripts to handle and respond to AJAX requests. If anything, it may slow down the browser on the user's PC because its doing much more of the processing on the client side using AJAX, rather than just passing parameters to a server script.

    I think AJAX can be used to add some helpful features, like autocomplete fields in forms, dynamic drop-downs, and other kinds of 'smart form' functions. It also adds some real benefits when data needs to be refreshed on the fly based on controls on a page.

    But I also think its being overused as a way to just submit data without refreshing the browser. The traditional browser submit methods are tried-and-true, and most people actually expect to see a screen refresh after submitting form data.

    I think the rate feature could be a decent use of AJAX if you intended to have ratings refresh instantly after the user made their rating. Some questions might be - does this provide enough feedback to the user that their rating has been recorded? will this be done efficiently enough that the user won't see any slowdown on their browser?
     
    DonkeyTeeth, Aug 18, 2006 IP
  11. liquidboy

    liquidboy Peon

    Messages:
    281
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Ajax is great and i use and abuse it...if you design your web application correctly then anything, including navigation, is possible..

    The biggest disadvantage is the loss in pageviews, this is a catastrophy when your sites are built on advertising funds (i dont think i need to explain the downside of reduced pageviews on advert dollars)

    The biggest advantage is that UI design again becomes the focal point of a good web application, ajax is really making webdesigners take more care in there UI decisions!

    Good luck in your ajax crusade... liquidboy!
     
    liquidboy, Aug 18, 2006 IP
  12. mihd

    mihd Peon

    Messages:
    136
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #12
    bad for seo if your pages are generated dynamicaly using ajax
     
    mihd, Aug 21, 2006 IP
  13. CCD

    CCD Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #13
    AJAX is fine for rating images/photos (not something you're likely to want to back out from so no worries about navigation either!) and is a good example of when ajax would enhance the user experience - just make sure the rate photo works without javascript enabled too, for maximum accessibility :)

    Not sure why some people are saying AJAX causes heavy server loads? Typically, AJAX is used to replace the content within one or two <div> elements on a page on the fly, as opposed to reloading the whole page with the new information in place - so how could the bandwidth tally for the AJAX version ever exceed the non-AJAX version?
     
    CCD, Aug 21, 2006 IP
  14. mihd

    mihd Peon

    Messages:
    136
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #14
    i only use ajax were it helps like, making more responsive forms

    most of time u dont care if a registration form gets indexed


    as for serving content better keep to good old static pages unless u dont care about google
     
    mihd, Aug 21, 2006 IP
  15. brandnewx

    brandnewx Peon

    Messages:
    988
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Advantage or disadvantage is just a matter of usage. I use AJAX to emulate user experience of desktop application in web page, so i guess it's an advantage. Think Google Map and Microsoft Virtual Earth. How annoying it would be if the whole page refreshed everytime you scroll to the left or right. Think vBulletin 3.5+ Quick Reply and Quick Edit. How annoying it would be if you click "Post Quick Reply" only to see the whole long thread reloads.

    AJAX is not designed for site navigation. It's never designed to load the whole page or jump across different pages. It's very bad use of AJAX.
     
    brandnewx, Aug 21, 2006 IP