• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pushlets vs AJAX

 
Michael Moser
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We use pushlets with some success for our dynamic HTML updates in a web application. Specifically, anytime new alerts are added to a database table, the JSP frame we use to display them realtime is updated. I know very little of AJAX apart from the buzzword. Can this tech help me reduce the overhead involved with pushlets?

Thanks!
[ April 04, 2006: Message edited by: Ilja Preuss ]
 
Linda Walters
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably not, since the main thrust of AJAX is "Pull" rather than "Push". The user performs some action, such as dragging an item to her shopping cart. The AJAX JavaScript code then sends the data for the selected item in a POST to the webservlet and the user can go on shopping or whatever. When the webserver returns the result (extended price, subtotal, sales tax, shipping, etc.) the listener that has been set in the AJAX app's JavaScript is invoked, the XML in the result is parsed for the data and then the existing DOM is modified by the JavaScript to replace and/or add the data from the XML to the existing form on the webpage.

Note that the possibly extensive HTML for the form itself is not resent to the browser, nor is the browser screen repainted, the data in the form widgets (or any other HTML elements on the page) are changed with a user experience that is much more like a desktop application.

I don't see any reason why the Pushlet and AJAX can't work together.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dont know, if you are thinking to replace your Pushlets with AJAX. No, you can't do that, as described in previous post.

As Linda already said, you can use both and AJAX would, definitely, add some real values.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a new technique called Comet.

Eric
 
Michael Moser
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for the comments! I have some new things to try now.
 
Just van den Broecke
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I just released Pushlets v2.0.2 which has support for AJAX through a JavaScript library. So I don't think it is either Pushlets or AJAX. So check it out: www.pushlets.com
An example is www.geotracing.com where Pushlets (w. AJAX) are used for real-time GPS tracking on a Google Map.

Just
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic