onjava.com — By the end of this tutorial, developers will have a solution to an AJAX problem that not even Google Maps or Gmail possesses: robust, usable bookmarking and back and forward behavior that works exactly like the rest of the Web
Oct 27, 2005 View in Crawl 4
scottyteeOct 29, 2005
"This is great - it should be implemented everywhere there's AJAX. The same goes for fixing the Back button functionality." - Agree 100%--<a class="user" href="http://www.diggfans.com">http://www.diggfans.com</a>
quest_masterOct 29, 2005
AJAX can really go mainstream, with people not pissed off about its behavior, with this.
nthitzOct 29, 2005
The article clearly states no Safari support. Also changes to the DOM are not saved. It isn't perfect yet. But its getting there.
skeetoOct 29, 2005
AJAX seems to be where things are going. I've seen industry magazines like eWeek write more articles about it.
timeisapearOct 29, 2005
gmail has a back button btw
smhillOct 29, 2005
"Ajax" is just javascript. That is all. It has been around for a quite a while. More recently people have using the xmlhttprequest object because the moz and safari now support it. And more often than not it is used to return html not xml. So in many (if not most) cases the acronym is "ajax" is incorrect. It is client side scripting that accesses remote data.It doesn't "run anywhere". It runs on modern javascript enabled browsers. Flash is capable of everything that "ajax" is, and has been for much longer. However most people were more concerned about making crappy animations and music when it comes to flash that scriptablitily and communications. "Ajax" seems destined for this route as well as more and more wanabees pick up prebuilt libraries and integrate in their site with actual concept of what it does or what it can be used for.As evidenced here on digg by the numerous articles of "OMG Sweet AJAX site!" and it is more often than not just some simple javascript and has nothing to do with remote requests or xml. It is not "where things are going". It is simply a tool like any other. Good uses and potential, often abused and overstated/hyped.
smhillOct 30, 2005
Not really how it works.It makes sense to use if the benefits outweigh the costs. (both client side and server side)Let's use your digg example. First off, digg pages are very small indeed. You full reload is minimal. A few bytes at best, not a "lot of data" by any stretch of the imagination. Even if you just add your comment, the cost is context. suppose comments have been removed or added since you last viewed the page? Just putting up yours breaks the integrity of the data. Logically the best step reload all the comments to ensure context. The comments comprise the largest part of the page. So any benefits this would bring are offset by the additional javascript needed to do it.Additionally, to ensure accessibility, the developers would have to provide methodology to have the same functionality should the user not have javascript on, be viewing it from a different device or a non-compliant browser. So the cost their is maintainability on the code side. Meaning updates to two ways to post comments. This can be minimized but good code, but none the less, it is a consideration that would have to be taken into account.What about benefits server-side? On a site like digg, they would be minimal or non-existant. The biggest chunk is going to be db activity and that would not change. Good coding would keep the display side to a minimum in the first place so the cost/benefit would be pretty much null. Client side, as I said above, the code being sent to your browser would have minimal impact. Client-side scripting would take minimal additional resources, and graphics and images are cached so a page reload would have little impact. Additionally, if you go back or forward in your history, the pages would not reflect the correct content you last saw. (unless you used the hack in this article, and then you vastly increasing client side activity and page size). Also if you consider, there are probably more people reading than posting. So, if you are not posting, adding ajax for comments is additional code required that you are not going to use. Look at how many people dugg it vs. posted comments? Wasted bandwidth.So, to be beneficial on digg, you would have to return all the comments, which is no savings on the client or server. Or if you didn't you are losing content integrity at a minimal savings to the client. In the end there would be no real savings or benefit, other than a) to be OMGAJAX!!!11 and b) give the appearance of "instant" action. (no visible refresh)It is not about "old paradigms". In fact going balls out and ajaxifing everything in sight would be very much the old paradigm. Doing flashy, poorly thought out stuff because it all the rage. That is exactly what standard practice in on the web in general.More and more the new paradigm is designing web applications with thought and concern to use the methods and technologies that best fit the need and provide the best possible solutions to content delivery. On occasion, javascript and remote data requests are an excellent solution for that. Most often for common things, they are not. Comments on a web blog/bbs/news thingy are an example of flash without substance that probably are best benefited by using a traditional method.By contrast, using ajax to "digg" an article is perfect fit. Quick solution, you only need to return a number, minimal server-side and client-side activity. Like everything, right tool for the right job.
republicoftexasOct 30, 2005
What does this have to do with cleaning soap scum?
smhillOct 30, 2005
"I think it's sad that it took "accesibility" and alternative devices to start writing semantic standards-based xhtml when clearly it was the "right" solution for a long long time."I couldn't agree more. You shouldn't have to have additional reasons for simply doing things the correct way. Accessibly and alternate devices should just be a side benefit of proper development not a driving force.I disagree on your point about comments (in the context of a site like this), but your arguments are valid and well stated. It boils down simply a difference of opinion which I am fine leaving it at.And I fully concur with your points about browser functionality. I develop web applications professionally, and with modern web browsers and support of dom, css and remote scripting, whole new options are available to how far it can be pushed and still stay in realm of standard technologies without having to rely on plug-ins. And of course faster computers and connections make it more viable as well. (and frameworks like rails). Flash has all these possibilities, but is limiting in terms of development (as is activex and the like).It is a fun time to be doing web development.
bakdraftJun 16, 2007
hi, i found a full ajax website, and the back button works : <a class="user" href="http://itbreaks.net">http://itbreaks.net</a>