AJAX Buzzword Reinvigorates Javascript 541
samuel4242 writes "Javascript may have been with us since the beginning of the browser, but it's going through a renaissance as companies like Google create Javascript-enabled tools like Google Maps . There's even a nice, newly coined acronym , AJAX for "Asynchronous Javascript and XML". A nice survey article from Infoworld interviews Javascript creator, Brendan Eich, who says that this is what he and Marc Andreessen planned from the beginning. Perhaps AJAX will finally deliver what Java promised. Perhaps it will really provide a solid way to distribute software seamlessly."
Re:Correct me if i'm wrong but... (Score:3, Interesting)
Re:AJAX Won't Deliver... (Score:3, Interesting)
http://www.cslacker.com/ [cslacker.com]
works fine in IE, Firefox and Safari.. but IE's retarded CSS handling makes things dicey..
Re:widget set - Try Konfabulator (Score:3, Interesting)
With Konfabulator, you can build cross-platform (no Linux yet) desktop widgets (similar to OSX Dashboard widgets, but more functional), using XML and Javascript. You can define the different components of your widget in XML, and then write the event handlers in Javascript. Optionally, you can have Javascript dynamcially create the components in the onLoad event handler. It uses the Spidermonkey Javascript engine, also found in Mozilla/Firefox.
If you give it a try, Check out my widget, ClipDrop (a clipboard manager), in the Gallery.
Google isn't writing in Javascript (Score:1, Interesting)
Re:So what's the big deal? (Score:2, Interesting)
Re:Choosing language (Score:3, Interesting)
Or Java.
And a few niche browsers had alternatives (e.g. http://grail.sourceforge.net/ [sourceforge.net] allowed client-side Python scripts), but none of them ever got anything approaching critical mass.
AJAX + JSON = Powerful combination (Score:5, Interesting)
Set your content type to "text/javascript" and you can send data over the network and have it be perfectly legal and ready to use. NO XML PARSING!
JSON (JSON.org [json.org]) just happens to be legal Python syntax... which makes me think...
hmmm.... Google has a huge server farm and is renowed for using Python... Google Maps talks client/server using Javascript, not xml... Python and Javascript shared JSON sytax for serializing objects... hmmm...
It is a very efficient combo: Python, Javascript, JSON, mod_python.
...why? (Score:4, Interesting)
Note, this doesn't stop the annoyance factor. Those stupid flash ads will eventually become those stupid AJAX ads, as SVG matures into something usable, and people code more SVG-AJAX apps. But we've still got some time.
Besides, AJAX could do some good. I could think of it as possible to build a quick and dirty AJAX application to check if the packages on a system are out of date (yes, re-inventing the wheel is bad, but if you're changing the whole framework, sometimes you have to). Or any of the other millions of applications Dashboard widgets are already doing today.
Re:So what's the big deal? (Score:4, Interesting)
Here's a demo in a proper web page:
http://www.blakespot.com/xml.html [blakespot.com]
Good stuff.
blakespot
Re:Google isn't writing in Javascript (Score:1, Interesting)
Mozilla, XUL and Javascript is better than AJAX (Score:2, Interesting)
Anyterm (Score:2, Interesting)
Re:Ruby on Rails and AJAX (Score:1, Interesting)
Re:AJAX Won't Deliver... (Score:3, Interesting)
IE was around for a long time and the FF developers explicitly decided not to support nonstandard features that not just IE but tens of thousands of websites were using.
The standards jihad has held back the Mozilla project big time. Why not just display a "non compliant code" icon on the status bar somewhere... even display a security risk popup.
There was "one programming language" for web scripting back when MS had 95+% of the browser market share, and FF and Moz decided to go on a jihad instead of realizing that the specifics of the standard aren't that important and a de-facto standard is good enough for most people.
No Refreshes! (Score:3, Interesting)
Forget AJAX, here's JAH (Score:4, Interesting)
I made a JAH example [mac.com] to show how easy this is.
JAH stands for Just Async HTML
Re:AJAX Won't Deliver... (Score:2, Interesting)
IE's nonstandard features are mostly hacks, and IE has only brain damaged support for CSS. If you ever try to build an actual application in javascript, you can't fail to notice this. Mozilla's decision of supporting whe W3C standards was done in order to have a truly powerful tool for web developers (i.e., people who want to build real *applications* in the web, not just homepages -- for these, i.e. is mostly OK). That, and the fact that it enables the applications themselves (Mozilla, Firefox, Thunderbitd, etc.) to be built in the same platform -- XUL, XBL, javascript and CSS.
Mozilla has adopted some nonstandard features from IE, the most used ones are XMLHttpRequest and innerHTML. They are adopted when they are useful and make sense. There are discussions about adopting others, like document.all, but this can't be done easily, because many sites assume that if one nonstandard feature is present, then all of IE's quirks can be counted on: I can't tell you how many times I have seen this:
The fact is, Mozilla trying to copy IE's quirky behaviour would most likely fail, because Microsoft would be free to make IE a moving target (the same way they have done countless times before) as soon as they felt threatened (which seems to be happening now -- witness the next "revolutionary" release of IE 7).
Re:AJAX also good for... (Score:3, Interesting)
what i don't understand is how many people act like they've never seen or heard of this before, and how it's some amazing new paradigm. IE 6.0 is 4 years old. all of the major mechanisms that are commonly used to perform asynchronous IO in webpages have been around more or less unchanged since before then. so why this big burst of interest now? what caused the web development world at large to suddenly wake up to this now? was it really gmail? sure it was probably the most popular use of 'ajax' technology, but it was hardly the first or the most impressive.
Re:AJAX also good for... (Score:3, Interesting)
The idea behind Ajax *does* revolutionize the web paradigm.
Don't be silly. It's a nice optimisation. It's very useful, and I use it a lot, but it's not revolutionary.
For example, rather than load a form, and all the form formatting to make the text fields line up correctly, and all the validation code to validate that form, you load a series of XML tags that contain only the basic information needed to tell the client how to lay out the form.
Huh? An external stylesheet and generic script loaded from cache means the only thing you need in your HTML are the form controls and a couple of regexps to drive the script. You want to replace that with dynamically loading XML? That's over-engineering that reduces quality.
The client takes care of generating the HTML for the form
Sounds like you've just made your application dependent upon Javascript. That's not good practice, and law requires an accessible alternative in many places, so you either don't do this, or have to code the functionality twice, once with Javascript, once without.
Those who have used good Ajax sites (google maps, gmail) should understand the power behind it, and these sites only break the tip of the ice berg.
Have you actually looked at the gmail code? It's hideously bad [jibbering.com].
Re:AJAX will also kick your ass (Score:2, Interesting)