AJAX Buzzword Reinvigorates Javascript
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."
cleaning tub
cleaning toilet
getting first post
Javascript may have been with us since the beginning of the browser...
Huh? I don't seem to remember seeing it until about '96 or '97. That's just a wee bit later than the beginning of the browser...
Isn't part of this due to Microsoft's non-complient browser API?
Go ahead and mod me as flamebait.
Top 10 Reasons To Procrastinate
10.
You're smoking crack. Client-Side scripting has always been in JavaScript or languages that look exactly like JavaScript.
By the way, am I the only one that uses the web with JavaScript turned off for almost every site?
Yes. Here's your tin foil hat now go sit in the corner.
Ruby on Rails has been working on this for some time, at least since the 0.11 release back in March. This is a wonderful technique for speeding up web applications. Browse around the web site, or hang out in IRC, and you will quickly see what all the excitement is all about.
What we need now (and Google has shown that it's feasable) is a Javascript based GUI.
Gnome and KDE can conquer all desktops once they are ported to this AJAX framework.
Where's the first javascript based window manager? Personalized Google is the first step in that direction.
DNA is the ultimate spaghetti code.
Unless standards are complied with fully there can never be "one programming language" for web scripting. Anyone who's had to debug Javascript in IE that works in Firefox knows this.
You have two hands and one brain, so always code twice as much as you think!
This has been possible for years. I've personally been using this type of scripting in web applications since 2001. Why the big fuss all of a sudden? Is it just because of the new XhtmlhttpRequest object (or whatever the hell its called)? You can do the same thing with an iFrame. Sure, its not as elegant, but it gets the job done. And it registers in your browser history.
For me, the crux of the usefulness and eventual adoption and finally complete embracing of AJAX lies in the article's paragraph:
I've seen what Google has done with AJAX (e.g., Google suggest), and it's stuff I never imagined could be so repsonsive in a web context. For me it starts to make programming fun again, and web programming an acceptable form of application development.
When browsers and web first emerged I could see the writing on the wall, but I wasn't happy about it. Browser application writing from the programming perspective was probably the single most giant leap backwards in technology for me (not including technologies introduced by Microsoft)....: you mean, all the years I've spent honing skills writing applications no longer apply? You mean I no longer have "state" as a tool for maintaining sanity in my application???? Hwaahhh??? I have to do what to change the web page???
While there have been some technologies (ASP, JSP, etc) to help with these issues, none have addressed the responsiveness issue with the web page round trip message loop. AJAX comes close. Now all I have to do is learn it.
For a great example of the responsive nature of this (I've referenced this before), go to Google Personal Home, set up your own home page, and play... Configure your modules by dragging them around... open and close your g-mail previews. This all starts looking alot like programs actually running locally on your own machine. (I'm assuming all are familiar with and have played similarly with Google Maps.)
Additionally, here are some very good resources to learn more about AJAX:
That's it, I'm done.
Finally, the reason I was looking for to disable Javascript is here.
Nobody here said it did! They said it might be able to deliver what Java promised. NO MENTION of Java and Javascript being the same there. If I say I might be able to deliver what Jane promised, I'm not saying I'm Jane, am I? They're refering to run-anywhere.
Oh yes, I have JavaScript turned off. Also, I browse with a monochrome monitor, my speakers shut off, and my tinfoil hat firmly in place.
Damn you technology!
(get over JS)
Having to go back to the server again and again and again to get tiny amounts of data doesn't sound too nice to me.
That's what you do each time you click on a link to go to a different web page within a site. With AJAX, you only get the data you need. It's not slow. Have you used Google Maps? GMail? That's what's going on behind the scenes, and it makes the experience far better.
You don't have to do that. Just add a little more data in the initial page load and make the browser do all the work. Once you reach a milestone, then post back to the server. You have to add some server-side validation to keep the script-kiddies at bay, but the performance cost of that is negligible. Also, if you do have to trip back to the server for data, its a lot quicker to just return the data that you need rather than refreshing the whole page.
People keep talking like Java has failed and is now dead and gone.
:)
I have been programming primarily in Java since 97, and if you ask me, it's just *starting* to pick up steam.
The language itself is just becoming mature - with big strides (generics, etc) in Java 1.5. And only now are we seeing alternate implementations to Suns, with GNU Classpath approaching a million lines of code, and GCJ compiled applications shipping in Fedora Core 4. Java applications such as Eclipse are also just starting to become popular, and Java API's for things like GNOME are just appearing on the horizon.
So quit calling Java dead
All "AJAX" is going to do is sell a bunch more four-color glossies to those IT types with more stars in their eyes than substance in their heads. It's just another vaguely-defined acronym with a catchy ring to it.
For anybody who actually writes code, things like Google Maps are simply a happy marriage of time-honored techniques and modern browser tricks. They're cool, they're novel, they're useful, they're quite well-written, and they're letting us do things in the browser that used to require plugins--but there's nothing terribly eye-popping about the techniques themselves.
Obliteracy: Words with explosions
There is a need to standardize (as much as possible) the way that AJAX will work in the browser. There are a lot of code-writers and code-copy-n-pasters out there. When you visit one of these sites, you know because the browser may act funny due to poor programming/hacking of Javascript interacting with the server. AJAX is much bigger than just XML messaging, it's an opportunity to bring a more traditional application model to the browser via Event handling and dispatching. Notice that if you have an engine or framework that is well built, it's quite simple to add event handlers like key presses or mouse clicks or even drag-n-drop. If one was to script each element on a page, that gets heavy and can slow the browser. Which - btw, is why AJAX hadn't caught on until recently: computing resources were not sufficient in many cases.
.net. This combination of technologies has been around for a while, however, as people find them more useful and interesting, there is a need for good information and a solid foundation for folks to work off of.
That being said, everyone should look at http://www.sourcelabs.com/ajb/AJAX Mistakes. There's also a nice list being compiled at http://www.openajax.net/OpenAJAX
* Bluechip client
.NET Experience on Linux
* Excellent Package
* London, Engliand Offices
Requirements -
* 5 years of writing AJAX apps for enterprise clients
* 5-10 years
* At least 15 years Linux experience
Call now or apply online by clicking here!
"It's not your information. It's information about you" - John Ford, Vice President, Equifax
Of course, most people developing web applications have a little experience in the main technologies in AJAX, particularly DHTML and DOM, which are the critical ones. Only now we have a buzzword that HR an latch onto.
On the other hand, if they're looking at people who can architect something like Google maps, well, they're going to have to wait until the frameworks catch up. I've got my eye on Echo.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Perhaps AJAX will finally deliver what Java promised. Perhaps it will really provide a solid way to distribute software seamlessly... (emphasis mine)
The "promise" of Java (write once, run anywhere) is exactly the same as Ajax. A big implmentation difference is in the runtime. Ajax's runtime is native to the browser; Java's runtime is not.
If what you need to do can be done with Ajax, then Ajax delivers on the promise, today. Java? Sure, it delivers big-time, if you can live with Web Start and deploying the runtime to every desktop.
Ajax should be welcomed by Java advocates everywhere. The marketplace are finally "getting it" regarding write once, run anywhere. The limitations of Ajax are substantial, so it won't be long before people need more muscle.
"We receive as friendly that which agrees with, we resist with dislike that which opposes us" - Faraday
Try www.konfabulator.com. It's free to use (nagware, actually) and versions are available for Windows and Mac.
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.
- Despite popular opinion, I am not perfect.
Great idea.
.EXE on my site that does some really cool things including encrypting your hard drive. But that's OK, you can pay me $200 and I'll send you the decryption key.
I've got an
Why doesn't Slashdot ever get slashdotted?
I'd rather go back to the server every time for a small, 2k object than go back to the server for 14k of HTML, and 160k of images/flash/multimedia/etc. For most application's, it's even a smaller object than that. Just look at Google Maps vs Mapquest. Every time you change zoom, Mapquest has to refresh the entire page, whereas G Maps, it's entirely seemless, and doesn't even seem like it's going to the server at all.
It's got some other potential uses I've been investigating as well. Brings back the whole HTML-based video game idea, now that you don't have to refresh the entire page to change one variable to something useful...
"Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
Client-Side scripting has always been in JavaScript or languages that look exactly like JavaScript
Or Java.
And a few niche browsers had alternatives (e.g. http://grail.sourceforge.net/ allowed client-side Python scripts), but none of them ever got anything approaching critical mass.
rage, rage against the dying of the light
I think maybe the slick apps like google maps is finally showing what good code CAN do, instead of the bloated bug ridden javascripting of yesterday.
Or maybe I'm just not transcending expectations by thinking outside of the box, and therefore my toolset isn't capable of brigding the information gap causing a chasm with my ability to think forwardly.
I'm struggling to identify which is worse: The day when we report that a buzzword has made progress, or the day a buzzword actually creates progress.
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) 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.
And on a serious note: Who was the moron who made the onreadystatechange event handler? Why couldn't you just pass in a reference to the XmlHttpRequest object so people wouldn't be forced to use global variables to store the reference? Is that so hard?
The thing that's different about an AJAX application is that the application has no file system hooks. About the only things it could read datawise are cookies, and if you're that afraid of webobjects, you've probably already got them disabled and you probably have a hard time with even the simplest websites (read: slashdot).
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.
"Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
Just today I was looking at this page It's a list of ten easy to do mistakes in Ajax apps. Some of them are not that easy to avoid...
I'll do the stupid thing first and then you shy people follow...
That being said, this does look like the least annoying of a lot of really annoying hacks to attempt to shoehorn stateful programming into an inherently stateless paradigm. Personally I think we should be rethinking the underlying infrastructure before we build too much on top of it.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
Quite honestly javascript is a very poor language.
Actually, Javascript is surprisingly robust. Probably you're referring the platform inconsistencies, which have long been a showstopper. But with recent versions of browsers supporting the javascript standard (ie. ECMAScript) increasingly well, a lot of the major wholes are closing, and you really can write cross-platform javascript with a minimal compatibility layer.
Javascript is not meant to be a large-scale programming language... it doesn't have strong-typing or other features that you want when developing million-line applications. However, it is still an extremely powerful language providing things like full object-orientation (everything is secretly descended from the window object), comprehensive hooks to HTML, functions as data, regular expressions, flexible data access (eg. objects as hashes), and robust event handling.
I used to think of javascript as a toy language, but when you get to down to it, it does what it needs to do very cleanly and efficiently without imposing unnecessary overhead on the programmer.
I guess AJAX reinvigorates Javascript. It's a perfectly cromulent term. It sure did embiggen Google Maps
Schnapple
Is all of slashdot completely retarded this morning? No one confused Java and Javascript as the same thing. They mearly compared the big picture of AJAX and Java, which is portable clientside applications.
Oh, and "There is one thing for sure though... nothing will finally deliver what Java promised. It's dead Jim. JavaSCRIPT on the other hand..." So, you're saying Javascript on the other hand... may fill that promise? Like the summary says? =D Stop coming to Slashdot please.
Mozilla/Firefox browser uses a XML interface that is better than HTML called XUL. All the extensions for Firefox use XUL and Javascript. But signed XUL&Javascript Apps can be server over the web also. Why not use a better interface language than HTML? Yes it is not compatible with IE, but for better specialized applications it would be work.
...and be all of client side scripting. There is another...
BLEACH (Bloatware + Leanware + Emacs + (x86) Assembly + C + Heroine) has been working wonders for my development. I usually start the day by shooting up in my office, then I start up all of the Office apps (bloatware) on my co-worker's PC to slwo him down. After that, I load up ACIDWARP.EXE (leanware. No DLLs, libs, nothing, jst one EXE and it's small for what it does) on my boss' PC which stuns him for a few hours so he can't keep track of what's going on in the office (usually play Purple Haze in the background). I then open up Emacs on my box and set to work redesigning everything (Screw WYSIWYG. It's overrated.) I also write a lot of my CGI in assembly language to keep the resource usage low and the code tight. C, when it's needed, which is almost never because of how well I can do things in assembly. And finally, another serving of heroine to keep the Jedi Mind tricks fresh. So far, this plan has worked so well, that I've been shuffled through about 70 different companies this year alone. My talents are in demand!
-"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
It's quite possible to build powerful crossplatform applications for the web now - in Flash, Java or AJAX.
One way is AJAX. To make it work well, you essentially have to write a version of the page for each major browser - which is a lot of work. Of course, there are development tools that make this substantially easier. It is by far the most seamlessly integrated with the BROWSING experience, but is less suited than Flash or Java for real applications - like a game or any other datadriven mouse-interactive thing. I don't believe there is no OOP Javascript in a browser.
Another way is Java applets. Java has the advantage that lots of programmers learn it to do nonapplet Java work. The big disadvantage is that a big part of the installed userbase has broken M$ Java engines, and it's generally impossible to install a Java engine without computer-admin privs (as opposed to "browser admin" privs)
The final way is Flash MX 2004 or Flex. Like Java applets, it is a fully featured OOP programming language (Actionscript) It expects to deal with server information, and can innately request data from mostly-arbitrary SOAP Web Services. It also works innately on OSX, Windows and i386 Linux in most all browsers and on a variety of small devices. It doesn't work on more obscure platforms, however, and it's not OSS so it can't be ported by just anybody.
Summary: If you want to a supercharged browser experience, use AJAX. If you want an application that "just happens" to be projected over the web, use Flash.
Looking for freelance Actionscript (Flash/Flex) or ColdFusion work and/or freelance developers. Email me, put Slashdot
Even with AJAX, web-based applications are still giant kludges. HTML forms is a kludge put together quickly to make web pages interactive. It's still missing basic elements like combo boxes and modal dialogs. Javascript is the same thing, a kludge that some people try too hard to make into a real programming language while keeping it backwards compatible.
If you want to make real applications using browsers, you need to come up with native support for many more GUI elements, and you need to come up with a scripting language that is robust and geared towards programmers, i.e. totally unlike javascript. Create these two parts with no concern for backward compatibility, stop asking web "designers" to implement interactive applications, and you will have the start of real web-based applications.
Very cool demonstration of what AJAX can do for interactive web applications: Anyterm - an ssh-like web-based terminal that doesn't rely on a java applet. Needs apache2 to run, though. Also, have a look at "livepage," which is part of the asynchronous python web development framework called nevow.
The problem with the Graceful Degradation principle is that it makes the same assumption that the designers of HTML made: the only thing people are going to want to do on the web is publish books.
When you're trying to create a full-fledged application on the web, base HTML just doesn't cut it. Hell, even for most websites, Basic HTML doesn't cut it.
The problem is that HTML was never really thought through. Creating sites in HTML (or any derivatives like XHTML) just doesn't work. HTML is a good model for the Gutenberg project but a bad model for everything else.
What we really need is a new language that has nothing to do with HTML that can create complex interactions. Unfortunately that doesn't seem to be happening. Even movements in that direction like XAML borrow too much from HTML.
Why doesn't Slashdot ever get slashdotted?
THe "big deal" for a lot of web developers is that you can avoid annoying refreshes to update content. Using XMLHTTP you can retrieve your information in the background and use the XML DOM/DHTML to update only what needs to be updated - instead of redownloading an entire page (and flickering). I wrote a chat app a few year ago that worked this way and it was amazingly responsive.
"God fights on the side with the best artillery." - Napoleon, Marshal of France - speaking truth to power
The XML part of XmlHttpRequest is a bit misleading - you don't have to use XML and parse it in the client. If you use a server process that generates an HTML fragment, you can replace the innerHTML of a target id easily.
I made a JAH example to show how easy this is.
JAH stands for Just Async HTML
Interviewer: "I'm here with Brendan Eich, the creator of Javascript. So, Brendan, it looks like some companies are doing some pretty awesome stuff with Javascript these days! Word has it this was what you envisioned for Javascript from the beginning."
Brendan: "Yeah... um, this is exactly what we envisioned! Awesome tools like what Google is doing with the maps thing, and the... uh... craigslist + Google maps thing! Yeah.. these companies are finally doing exactly what we had originally planned, so... just wait until they come up with--I mean finally catch on to our big picture and we'll let you know what else we had envisioned! You'll just have to wait and see what we take credit fo--I mean, the other ideas of ours they catch on to!"
I don't know about you, but between all the nuances in the javascript, and all the newances in the DOM, and trying to figure out where one starts and the other begins, and have you ever tried to figure out which functions/properties work correctly for which object, and have you ever tried to figure out which DOM to use and how to make DOM's of different browsers compatable, or even simply trying to figure out which objects are really on your web page, and then trying to deal with things like XML parsing on top of that, and then now asynchronous communication, not to mention new things in the pipe like XUL, and franlky ....
Forget the toilets, AJAX is kicking my ASS and I can't imagine that other people who want to do more than copy cutie javascript tidbits aren't having the same problem. What am I missing here?
The Konfabulator site needs more categorization. If I took out all the clocks, countdown timers, single-purpose RSS readers, and webcams, there'd be like six widgets left. I've never seen so much useless junk in my life. Well I suppose I have actually, but not in this particular fashion.
I am no longer wasting my time with slashdot
That and (much more importantly) google using it in live webapps with GMail, Google Maps and Google Suggests.
Everyone was pretty much ready, the web was ready, we needed someone to actually make the jump.
The CoolGuys© at google did it, people now know it works (aka it isn't yet another crappy useless technology) and are therefore willing to use it.
Google was the First Factor
The AJAX buzzword was the second one, because let's face it executives love buzzword, and without a l33t buzzword to go with it a technology just doesn't exist as far as they're concerned (Asynchroneous Javascript + xmlHttpRequest + DOM doesn't quite sound as sexy as AJAX, now does it?), and if an executive doesn't know your technology he won't allow you to use it in a professionnal environment.
"The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler