• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Should Ajax be used for each and every click on a home page?

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got a doubt. AJAX is used to do a partial refresh on a page.Suppose on home page we have different functionalities served by JSP (or Servlets or Struts). Should each be re written to support AJAX. I have seen AJAX being used in a limited way in AJAX. First click will fetch data from server. Another click now on page will bring data using AJAX not by reloading.Why not the first click itself bring data from server.

thanks
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main purpose of AJAX is to make asynchronous calls to the server without reloading the whole page.

Suppose, there is a registration form for user, we have combo box where in when we select country, only after that combo box gets populated for states and like wise.

Loading the data all at once is a bad idea, we should load data in chunks as required which is facilitated by Ajax.

Other good example might be pagination as well, wherein we bring only that much data from the server requested by the user.

Thanks,
Ashwini Kashyap | www.infocepts.com
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks.

Loading the data all at once is a bad idea, we should load data in chunks as required which is facilitated by Ajax.


Why is loading data all at once a bad idea?
 
Ashwini Kashyap
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be you bring all of the data at once but out of which only some part is required.

The intention always should be to bring only that much data on client end which is actually required.
In doing so response time of the server is faster and hence improves the performance of the server.

Thanks,
Ashwini
 
reply
    Bookmark Topic Watch Topic
  • New Topic