Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

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."
This discussion has been archived. No new comments can be posted.

AJAX Buzzword Reinvigorates Javascript

Comments Filter:
  • I probably should have said "Did" , ive been checking out ajax and ruby on rails for a few things and I am impressed with both . It will be good to have client side browser scripting which dosn't require 17 hours(slight hyperbole) of testing on various browsers.
  • by neoform ( 551705 ) <djneoform@gmail.com> on Tuesday May 24, 2005 @12:40PM (#12624588) Homepage
    yeah, well i'm developping a web forum using all JS..

    http://www.cslacker.com/ [cslacker.com]

    works fine in IE, Firefox and Safari.. but IE's retarded CSS handling makes things dicey..
  • by spookymonster ( 238226 ) on Tuesday May 24, 2005 @12:41PM (#12624597)
    Try www.konfabulator.com [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.
  • by Animats ( 122034 ) on Tuesday May 24, 2005 @12:42PM (#12624609) Homepage
    Google has people coding in something new, which they aren't saying much about. It's then compiled to Javascript and DHTML. They're not just writing Javascript by hand.
  • by Anonymous Coward on Tuesday May 24, 2005 @12:45PM (#12624649)
    XhtmlhttpRequest isn't new, its been around since 2000 and IE 5.0. What is new is that another browser supports it(firefox) and is no longer and IE only feature.
  • Re:Choosing language (Score:3, Interesting)

    by pthisis ( 27352 ) on Tuesday May 24, 2005 @12:46PM (#12624653) Homepage Journal
    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/ [sourceforge.net] allowed client-side Python scripts), but none of them ever got anything approaching critical mass.
  • by MarkEst1973 ( 769601 ) on Tuesday May 24, 2005 @12:48PM (#12624680)
    AJAX is great, but parsing XML always sucks. The XmlHttpRequest object also has a property called ".text", which returns the text value of the data.

    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)

    by ciroknight ( 601098 ) on Tuesday May 24, 2005 @12:51PM (#12624701)
    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.
  • by blakespot ( 213991 ) on Tuesday May 24, 2005 @01:00PM (#12624821) Homepage
    I've been using XMLHttpRequest [apple.com] to wonderful effect in developing Dashboard widgets [apple.com] for Mac OS X. Seamless, behind-the-scenes data grabs - nothing akin to a page refresh.

    Here's a demo in a proper web page:

    http://www.blakespot.com/xml.html [blakespot.com]

    Good stuff.



    blakespot

  • by Anonymous Coward on Tuesday May 24, 2005 @01:04PM (#12624859)
    Source on this?
  • by tvlinux ( 867035 ) on Tuesday May 24, 2005 @01:06PM (#12624877)
    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 [xulplanet.com] 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.
  • Anyterm (Score:2, Interesting)

    by krabbe ( 239203 ) on Tuesday May 24, 2005 @01:22PM (#12625029)
    Very cool demonstration of what AJAX can do for interactive web applications: Anyterm [chezphil.org] - 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 [nevow.com].
  • by Anonymous Coward on Tuesday May 24, 2005 @01:25PM (#12625078)
    So, in essence, it's not really all that much different than what ASP.Net does, but unlike ASP.Net, with Rails, you can very easily not only supplant whatever JavaScript the server side app is sending to the client, but you can easily look at it as a developer and quite trivially override it if you need/want to.

  • by rnd() ( 118781 ) on Tuesday May 24, 2005 @01:32PM (#12625171) Homepage
    I'm sorry but your comment is so off base it deserves a rebuttal.

    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)

    by N8F8 ( 4562 ) on Tuesday May 24, 2005 @01:44PM (#12625313)
    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.
  • by epeus ( 84683 ) on Tuesday May 24, 2005 @02:00PM (#12625469) Homepage Journal
    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 [mac.com] to show how easy this is.
    JAH stands for Just Async HTML
  • by FrangoAssado ( 561740 ) on Tuesday May 24, 2005 @02:39PM (#12625914)
    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.

    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.

    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.

    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:

    if (document.all) { /* IE stuff */ }
    else if (document.getElementById) { /* Mozilla stuff... */ }
    else { /* tell the user it won't work... */ }

    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).

  • by drew ( 2081 ) on Tuesday May 24, 2005 @05:38PM (#12627815) Homepage
    nice to see that there are at least a few people around here who know what they're talking about on this subject. kind of hard to find a sane voice around here once somebody mentions javascript.

    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.
  • by Anonymous Coward on Tuesday May 24, 2005 @05:40PM (#12627841)

    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].

  • by rjshields ( 719665 ) on Wednesday May 25, 2005 @04:11AM (#12631919)
    It's worth the price just for the $() function, which does a document.getElementById() on the argument ;)
    $ = function() {
    return document.getElementById(arguments[0]);
    }

Ya'll hear about the geometer who went to the beach to catch some rays and became a tangent ?

Working...