Steve Comrie <[EMAIL PROTECTED]> wrote:

If you haven't heard of XMLHTTPReqeust aka Remote Scripting aka AJAX it's basically a way for web pages to communicate with the server and return information through JavaScript without having to refresh the page.

You can read more about it here:
http://www.adaptivepath.com/publications/essays/archives/000385.php
and see it in action here:
http://www.google.com/webhp?hl=en&complete=1

[and here] ...SAJAX (http://www.modernmethod.com/sajax/)
[and now the CGI::App port, here] I converted their demo app
to one running on my code using C::A http://www.unobserved.org/misc/rs/


I invite anyone that's interested in learning more about using AJAX
to take a look at my sample app.

Nice proof of concept, Steve!

I guess this is an (actually old) idea that's seems to have been hitting critical mass lately (probably due to the clever new acronym!) Just a few days ago, I was devouring the examples at http://www.pengoworks.com/workshop/js/gateway/ (the zip code lookup examples rock!) which actually doesn't use XMLHttpRequest at all, but rather a hidden IFRAME (because this code is 5 years old). The concept of non-page-loading web apps has been banging around that long, but I guess Google Suggest and Google maps have just recently pushed the technique to the tipping point.

I'm working on app currently that uses JavaScript to load a dozen or so dropdowns, each of which can grow quite long indeed. One client populated the thing with so much data that dynamic JS code had swelled the page weight well past 700K! Fortunately that wasn't as painful as it sounds since the business users of this (non-public) web app all enjoy fast broadband connections, but that, the "old fashioned way" sure isn't gonna scale!

So Google Suggest has got me thinking about dynamically populating drop downs as the user types, with only the incrementally defined subsets of data that they need to see. So I'm really itching to try this out with CGI::App, too!

But now I'm not sure if XMLHTTPRequest of this hidden-IFRAME hack is the best way to go. Google maps seem to be using an IFRAME, while Google suggest uses the XMLHttpRequest {sigh}. I guess it doesn't matter now, cross-browser-wise. The link below (almost a year old) says that XMLHttpRequest support has been in IE since IE5, Mozilla since 1.4 and Safari since 1.2 (and dubs the IFRAME trick a hack):

Apple Developer Connection: Dynamic HTML and XML: The XMLHttpRequest Object
http://developer.apple.com/internet/webcontent/xmlhttpreq.html


with it's own "Appleesque" example (loading an RSS feed of your mission critical I-Tunes)
http://developer.apple.com/internet/webcontent/XMLHttpRequestExample/example.html


and here's another excellent article from the Apple developer connection, this time a treatment of the hidden IFRAME route, which they call "Remote Scripting".

Remote Scripting with IFRAME: http://developer.apple.com/internet/webcontent/iframe.html

While, here it is called Round-Tripping: http://www.glendinning.org/webbuilder/roundTripIframe/
(which sounds more like something we'd rather not admit we did back in high school...)


But whatever underlying technique is used, this is a Whole New Way of thinking about developing web apps, and I'm guessing that, now that the cross browser support is there, we'll be seeing (and building!) a lot of these.

-dave


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to