Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
The Internet

Mastering Ajax Websites 307

An anonymous reader writes to tell us that IBM DeveloperWorks has an interesting article introducing the uninitiated to the world of Ajax. From the article: "Ajax, which consists of HTML, JavaScript technology, DHTML, and DOM, is an approach that helps you transform clunky Web interfaces into interactive Ajax applications. The author, an Ajax expert, demonstrates how these technologies work together. Ajax is more than just the latest fad -- it's your stepping stone to build better Web sites through efficient use of your time."
This discussion has been archived. No new comments can be posted.

Mastering Ajax Websites

Comments Filter:
  • Ever notice . . . (Score:5, Insightful)

    by Ph33r th3 g(O)at ( 592622 ) on Sunday December 11, 2005 @10:30PM (#14236069)
    . . . how when a new fad comes along, people say it's not a fad?
  • by ceejayoz ( 567949 ) <cj@ceejayoz.com> on Sunday December 11, 2005 @10:33PM (#14236085) Homepage Journal
    Sure, but when something useful comes along, people say it is a fad.

    Look at what Google Maps did for online mapping and tell me AJAX is "just a fad".
  • by phoenix.bam! ( 642635 ) on Sunday December 11, 2005 @10:34PM (#14236087)
    Ajax is a fad and it isn't. All the hype about it is of course, generated because it's the awesome new fad. But it is an incredibly useful tool. Digg.com does a great job of using AJAX the proper, no intrusive way. GMAIL too. It's great for some things and won't be going away soon. But soon there won't be 20 stories a week posted about it.
  • Re:Ajax in action (Score:3, Insightful)

    by ceejayoz ( 567949 ) <cj@ceejayoz.com> on Sunday December 11, 2005 @10:41PM (#14236120) Homepage Journal
    More useful examples would include Google Maps, Gmail, Flickr, etc.
  • Good but bad! (Score:5, Insightful)

    by ech00ne ( 937418 ) on Sunday December 11, 2005 @10:45PM (#14236134)
    AJAX doesn't make it easy to develop cross-platform web applications. Look at all the browser incompatibilities in the developing of Gmail and more recently MSN's start.com page.

    We need to re-standarize Javascript or at least make sure all the browsers implement a 100% compatible version. And I don't think that will work since not even HTML is properly rendered by any browser at all.
  • by abelikoff ( 412709 ) on Sunday December 11, 2005 @10:46PM (#14236143) Homepage
    AJAX...helps you transform clunky Web interfaces into interactive Ajax applications.

    Recalling the Simpsons: "Only suckers buy [last year's] model. You are not a sucker, are you?"

    I can't wait to start padding my resume with the latest and greates technology out there that will do the same thing we've been doing for decade but with more acronyms and steeper learning curve.

  • by Geoffreyerffoeg ( 729040 ) on Sunday December 11, 2005 @10:48PM (#14236157)
    Half the opinions about Ajax is that it's not worth all the effort. Too complex.

    Too complex? As compared to what? Having each and every server-side action also generate a page for the user? With AJAX, you can have one or two pages for display, and the rest of the scripts just for sending or retrieving data.
  • by robertgeller ( 882730 ) on Sunday December 11, 2005 @10:58PM (#14236187)
    I don't think the parent was implying the AJAX, itself, is too complex, but rather that JavaScript is, a statement which I entirely agree with. To do anything in JavaScript requires many lines of code -- and kludgy code, to me. JavaScript needs to either be seriously revamped or entirely rewritten. Unfortunately, the time it will take to a) get this new language written and, most importantly, b) get it standardized in all the major browsers (*ahem* especially IE) would probably just be too long. I don't think JavaScript is going to get a major revamp anytime soon. I think it's time for an alternative, though. Hey, client-side Python would be great; I'm all for it! :)
  • Re:Ajax in action (Score:3, Insightful)

    by junjun26 ( 247061 ) on Sunday December 11, 2005 @11:00PM (#14236192) Homepage Journal
    That's why it works so much better for web applications than normal web pages. Why would you bookmark a page in your Gmail account ;)
  • Re:Ajax in action (Score:5, Insightful)

    by Bogtha ( 906264 ) on Sunday December 11, 2005 @11:01PM (#14236195)

    That's not Ajax, that's developers who have screwed up. You can have Ajax and addressability (bookmarks, back button, etc) for 99% of the things Ajax is good for. It's just you have all these newbie web designers jumping on Ajax like there's no tomorrow, so most of the things you see have had lots of shortcuts taken, and some of the things you see shouldn't have used Ajax in the first place.

    A good rule of thumb for knowing when it's appropriate to use Ajax is where you intend on posting something to the server, and then redisplaying the page you just came from. For example, Slashdot's moderation. It makes no sense to regenerate the entire page just to tell the server what you think of one particular comment. This is also the situation where bookmarks, the back button, etc aren't going to break.

  • by Bogtha ( 906264 ) on Sunday December 11, 2005 @11:06PM (#14236213)

    You don't need polish to keep users, you only need polish to attract users. Take Slashdot as an example. Hideous design, atrocious implementation, no polish whatsoever, full of bugs, and yet people keep coming back to it.

    Once you've attracted users, they rarely go away unless you give them a push (like endlessly posting repetitive articles on Ajax, for example).

  • by heinousjay ( 683506 ) on Sunday December 11, 2005 @11:11PM (#14236227) Journal
    You're almost there, but the number of users has nothing to do with it. You use it when it's appropriate to support a desktopish interaction model, and you don't want to reload the page every time.

    Also, I'd clean up the terminology. You don't use it for web sites. You use it for applications.
  • by KiloByte ( 825081 ) on Sunday December 11, 2005 @11:13PM (#14236236)
    Also, if you consider the popularity of the "NoScript" extension, you'll see that a lot of people turn JavaScript off. Having it permanently disabled is a part of many security policies, as well; I would estimate that at least 10% or so of people will have JavaScript disabled at least on their first visit. This is a lot more than a minority such as "Links users" or "the blind".

    So... unless you disregard a significant percentage of viewers, you do need to provide an alternate version.

    The article says: "Ajax is more than just the latest fad -- it's your stepping stone to build better Web sites through efficient use of your time." -- tell me how can AJAX save you time if you have to do _both_ versions of the site, multiplied by the number of differently behaving browsers?
  • by QuietLagoon ( 813062 ) on Sunday December 11, 2005 @11:14PM (#14236241)
    Sure, but when something useful that is called a fad comes along, everyone thinks it will solve all the problems they face? Even those it doesn't?
  • Re:Ajax in action (Score:5, Insightful)

    by Geoffreyerffoeg ( 729040 ) on Sunday December 11, 2005 @11:28PM (#14236299)
    A good rule of thumb for knowing when it's appropriate to use Ajax is where you intend on posting something to the server, and then redisplaying the page you just came from.

    Completely. AJAX should only be used when you would've POSTed something to the server and made a slight change - both of those are non-bookmarkable and non-addressable. (Good) web designers seem used to when to GET and when to POST, so only use AJAX in the latter case. The general rule for that, by the way, is that POST should change stuff on the server, and GET should only retrieve data. Thus, you can only bookmark a view of data, not a change of it - you've already changed it once you're ready to bookmark.

    AJAX can actually help with the entire problem of tabs and forms - if the form only changes data but doesn't update the view, you can use a regular link to see a different view of it.

    The other solution is to do what Google Maps does - since they're using AJAX to retrieve views, they have a button called "Link to this view" or something that gives you a context-free URI to that particular view.
  • by Lars83 ( 901821 ) on Sunday December 11, 2005 @11:37PM (#14236325)
    Websites done in Flash make my ban list.
  • by qray ( 805206 ) on Sunday December 11, 2005 @11:56PM (#14236396)
    Ajax and its predicessors, to me, are poor attempts to patch problems with building web applications. It's unfortunate that we haven't seen real solutions to the problems of building web applications. I'm surprised at how excited people get over things like CSS and Ajax.

    At this point in the game, we shouldn't have to be jumping through hoops and playing games to get great looking web applications. Web applications should be on par with traditional applications.

    --

    Q
  • Re:Good but bad! (Score:4, Insightful)

    by _Neurotic ( 39687 ) on Monday December 12, 2005 @12:09AM (#14236434) Journal
    It's not so much a matter of making each browser's implementation of JavaScript compatible. The real issue is their differing object models. The object models are a direct result of their respective design methodologies and approaches to security. There any many similarities (like the top level window and document objects) but when you get down to the nitty gritty (a must for "AJAX") you are bound to run into the differences that require conditional logic to provide cross platform compatibility.

    So, unless we end up with one web browser, we'll never have a common object model and will therefore always have incompatibilities.
  • by ceejayoz ( 567949 ) <cj@ceejayoz.com> on Monday December 12, 2005 @12:29AM (#14236488) Homepage Journal
    Sure, but that's a stupid people problem.
  • by geekoid ( 135745 ) <dadinportland&yahoo,com> on Monday December 12, 2005 @12:56AM (#14236594) Homepage Journal
    Thats not complex. It may be bandwidth intensive, but that is different.

  • by jericho4.0 ( 565125 ) on Monday December 12, 2005 @02:45AM (#14236906)
    A web application framework, like Ruby on Rails [rubyonrails.org], can isolate you from most of the JS. Here is a introduction [onlamp.com] to Rails and Ajax.
  • Re:XML (Score:3, Insightful)

    by LarsWestergren ( 9033 ) on Monday December 12, 2005 @03:11AM (#14236970) Homepage Journal
    He used html, java, dhtml, xml...

    He used JavaSCRIPT. Big difference.
  • by Watts Martin ( 3616 ) <layotl&gmail,com> on Monday December 12, 2005 @04:54AM (#14237181) Homepage
    Flash isn't a language, but ActionScript is. And, to be fair to Flash, I've seen a (very small) number of sites that actually use it for practical interface work -- an online reservation system, or the new Yahoo! maps beta [yahoo.com], and it's good or better than any AJAX system I've seen. Flash is really a pretty good system for "rich internet applications" (the buzzword before "Web 2.0" became fashionable); it's just that developers (as opposed to designers), and users, have grown to think of it as a system for little more than producing annoying animated advertisements and unnecessarily frilly web pages. That it's gotten that reputation is largely Macromedia's fault, but it's not really a correct perception of it, and hasn't been since Flash 5, at least.

    At any rate, it may not be the best use of your time, but were I actually developing a web-based application that needed a sophisticated client, I wouldn't rule Flash out, depending on what the back end system I was developing on was. Like it or not, Flash has one big advantage over Ajax and, for that matter, HTML/CSS in general: it bypasses browser compatibility issues entirely.

  • by Anonymous Coward on Monday December 12, 2005 @06:54AM (#14237440)
    AJAX doesn't make it easy to develop cross-platform web applications. Look at all the browser incompatibilities in the developing of Gmail and more recently MSN's start.com page.


    I'm genuinely confused. What does AJAX give you that Java applets do not? For example, people talk about Google's mapping application, and the ability to drag the map around. Isn't this something that Java was supposed to be able to do? And as far as browser incompatibilities go, isn't that what a Java applet program could circumvent?

    What am I missing here? Furthermore, AJAX seems to force open source -- all of your source code is available so that malicious people can exploit its vulnerabilities.
  • by m50d ( 797211 ) on Monday December 12, 2005 @07:09AM (#14237468) Homepage Journal
    Web applications shouldn't exist. It's as simple as that. They're an attempt to shoehorn the web into something very different to what it was designed for - it's meant as a documents platform, not an applications platform. If you want to run remote applications, there are plenty of ways to do so - X11 is the obvious one. If you feel it's inadequate for the higher-latency environment of the internet, you're probably right - but the solution to that is not to try and get http to do applications, it's to write a new protocol for doing internet applications. That's what we should have - a new, standard way of doing applications over the internet, designed for doing applications over the internet, and optimized for this task.
  • by Chazmyrr ( 145612 ) on Monday December 12, 2005 @01:27PM (#14239609)
    We have a standard way of doing applications over the internet, it's designed for doing applications over the internet, and the only reason it isn't optimized for the task is because some people just can't seem to move past 1993 and constantly whine that that isn't what the web was designed for.

    Well, tough shit. That's what the web is being used for. Do you really think that the web would have been successful without ecommerce? Ecommerce is a web application. Any site that takes input from the user and does something with it is a web application. Slashdot is a web application.

    The whole point of DOM, DHTML, scrpting, XML, CSS, and practically every web standard for the last 7 years has been to facillitate using the web for applications. Just about everyone is on board with this, but there's always a few that want to retard progress.

    Web applications do exist, they aren't going away, and any attempt to change this fact is just pissing into the wind. Stop being part of precipitate and start being part of the solution.

If you think the system is working, ask someone who's waiting for a prompt.

Working...