Slashdot Mirror


Ajax in Action

Simon P. Chappell writes "There's always a danger when a new technology buzzword hits the ground running. The danger is that when it finally slows down enough for us to take a good look at, it'll be found to be empty hype with less value than a mime performance on a radio show. This time the buzzword is Ajax and it's moving so fast that you can almost hear the sonic boom. The authors of Manning's new Ajax in Action have managed to catch up with Ajax long enough to take a look at it for us. Their book explains what Ajax is, how to use it and how, for once, the hype may be underselling the prospects for this new buzzword." Read on for Simon's review. Ajax In Action author Crane, Pascarello with James pages 650 (16 page index) publisher Manning rating 9/10 reviewer Simon P. Chappell ISBN 1932394613 summary If you want to create dynamic web applications, get this book.

The majority of the book is for programmers engaged in the development of web applications; especially those who are interested in taking their applications beyond the traditional ``click and wait for the response from the server'' model that we've become accustomed too.

The first section, and particularly the first chapter, would be suitable for anyone who is curious about Ajax. The first chapter answers the questions of what it is, and why it deserves all of the positive press that it's received. If you're introducing Ajax at work, this might be the chapter of recommended reading for your managers and software architects.

Alright, enough introducing the book, now let's take a look at just what Ajax is. Ajax itself is an acronym created by Jesse James Garrett in his, now classic, article Ajax: A New Approach to Web Applications. Ajax, we are told, means Asynchronous JavaScript and XML. This is our first clue that Ajax is not a single, new thing. Ajax actually turns out to be a combination of existing technologies mixed up in a fairly new way.

The fundamental ingredients in Ajax are in-browser JavaScript, Cascading Style Sheets, the browser's internal DOM model and asynchronous HTTP requests. Ajax, the technology, is the amalgam of these individual technologies. Thus, Ajax is both new and well proven at the same time.

Perhaps it's also possible to view Ajax as the natural resting place of the pendulum of application development. Programmers, since the beginning of application development have been trying to balance user experience and ease of installation and maintenance. First we had mainframes with their centralized usage model. Next we got the PC with it's entirely disconnected usage model. This was followed by the Client/Server model that tried to be connected yet offloaded it's processing to the client. The world wide web came next and browsers as the ultimate thin clients forced all of the processing back onto the server again. Finally now, with Ajax, we have what seems like a good balance of server side processing, with responsive clients that provide the rich user interface that users want. The pendulum of centralized versus decentralized has found it's rest point.

The structure of the book is fairly standard. The first section, three chapters, concentrates on imparting the concept of Ajax to the reader. The first chapter begins with the concepts, chapter two takes the reader through some very simple first steps, while chapter three explores how the Model View Controller pattern (MVC to it's friends) applies in the Ajax world and looks at third party, free and open-source Ajax libraries available today.

Part two of the book explores the core techniques of Ajax. Chapter four explores the difference between a web application and a desktop or Ajax application, that of a single page being the entire application. Chapter five explores the role of the server, looking at what resources are available for the server-side coding, including available languages and frameworks as well as ways and means of exchanging data with the server.

Part three looks at what the authors call ``Professional Ajax'', the techniques that make a difference when creating real world applications. Chapter six covers the design of the user experience. The user experience for a major application basically is the application for the user and so getting this right is of fundamental importance. Chapter seven explores security and some of the actions that the developer can take to both ensure access control and protect confidential data. Once the basics of Ajax are mastered, this may well be the most important chapter in the book. Chapter eight covers performance and what can be done to assist application speed and resource usage in practical use. Perhaps the most important measure for an Ajax application is the perceived speed and responsiveness that it delivers. The asynchronous processing is a huge factor in achieving these user perceptions.

Part four shows Ajax by example, with four chapters of example applications and a fifth chapter addressing building stand-alone applications using Ajax.

There is much to like about this book, but top of the fold for me is the clear and concise explanation of just what exactly Ajax is and why it has the power to make a difference in the web application arena. At a time when more people speak of Ajax than actually understand it, this book has the power to bring forth understanding.

This is a very dedicated book. It takes no time to teach the reader the individual technologies that compose Ajax, rather it concentrates on using those technologies. If you do not know JavaScript, or Cascading Style Sheets or do not understand the W3C's DOM model or asynchronous messaging then you would be better served at this time by learning the individual technologies and saving this book for after you've mastered them.

Other than the standard book page over at the Manning website, there is no dedicated book website. This is perhaps unusual, but 30 seconds on your search engine of choice should get you started. Failing that there is a good Ajax page available at Wikipedia.

This is a magnificent book. Not because it's well written and has good example code in it, although it is and it does. Rather, it is magnificent because of the high speed target that they have accurately hit and described in a clear and hype-free fashion; for this the authors are to be commended. If you want to create dynamic web applications, get this book."

You can purchase Ajax in Action from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

270 comments

  1. I'm sorry by CrazyJim1 · · Score: 0

    I'm not buying a book written by Jon Stewart.

    1. Re:I'm sorry by Anonymous Coward · · Score: 0

      italics fixed?

    2. Re:I'm sorry by Anonymous Coward · · Score: 0

      god doesn't exist

    3. Re:I'm sorry by c_forq · · Score: 1

      But I am a god, you insensitive clod!

      It's a joke. Laugh.

      --
      Computers allow humans to make mistakes at the fastest speeds known, with the possible exception of tequila and handguns
    4. Re:I'm sorry by Anonymous Coward · · Score: 0

      Why, thank you for sharing that. The datum has been stored away for use should the unimaginable happen and that nuggest of information should actually have any use to anyone other than yourself.

      And just because we would hate to see you feel like you gave more than you got in this exchange: my right foot itches.

  2. AJAX explained... by nother_nix_hacker · · Score: 5, Funny

    No need to buy this book. Just consume one of these and you will awake the next morning know how to use javascript and XML in unison to produce yet another del.icios.us clone!

    http://www.cleansweepsupply.com/pages/skugroup1068 .html

    1. Re:AJAX explained... by ChrisGilliard · · Score: 1

      ...know how to use javascript and XML in unison to produce yet another...

      The interesting thing is....the X in AJAX which does stand for XML is not all that applicable. You don't need to use XML to be doing pure AJAX. X is just a sexy letter. I think that's the only reason it's in this acronym.

      --
      No Sigs!
    2. Re:AJAX explained... by zephc · · Score: 1

      "I'm Simon Chappell, bitch! Read my book!"

      --
      "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
    3. Re:AJAX explained... by jack_csk · · Score: 1

      You remind me of the years that Microsoft put X on everything. Say, ActiveX, DirectX,...

    4. Re:AJAX explained... by Zoobster · · Score: 0

      Actually, that's untrue.

      In all versions of DOM compatible browsers (excepting Apple's Safari), the property .responseText is forced decoded at UTF-8 codepage. That means if you read in anything not UTF-8 (like SHIFT-JIS), it's garbled. Even if you explicitly try setting it otherwise, it's FORCED at UTF-8.

      You have to rely on the X - the .responseXML to maintain codepage - it's the only property that keeps the original codepage set.

    5. Re:AJAX explained... by JamesOfTheDesert · · Score: 1
      You have to rely on the X - the .responseXML to maintain codepage - it's the only property that keeps the original codepage set.

      Interesting. Some links I dug up while looking for details:

      http://www.experts-exchange.com/Web/Web_Languages/ XML/Q_21624718.html, https://bpcatalog.dev.java.net/ajax/i18n/.

      More/better links welcome.

      --

      Java is the blue pill
      Choose the red pill
    6. Re:AJAX explained... by Zoobster · · Score: 0

      I wrote a quick thing on it here: http://zoobster.blogspot.com/ and on hiveminds: http://www.hiveminds.org/phpBB/viewtopic.php?p=468 18 MS has their object documented (wherein the property of .responseText shows its forced UTF8), but I've discovered that its the same for every browser (FF, Opera, etc). The only browser who supports the correct code-paging for the .responseText is Apple Safari. If you maintain the charset in the XML document you retrieve with .responeXML (say shift-jis or whichever) - then the .responseXML object behaves accordingly and you can render non-UTF8 data. It was frustrating as heck to try and retrieve shift-jis with .responseText (declaring it in setHeaders, the page calling was shift-jis, and the page requested was shift-jis - but it all came up as utf-8, garbled). I lucked out finding that the .responseXML respects the codepage. These days, I just use .responseXML exclusively, just to avoid that headache. Sure, sometimes when you do a callback - all you want is something small - say, "3" - and .responseXML requires valid XML (read: extra crap/elements wrapped around just to get a "3"), but it protects me from ever having to retrieve data that is of a different codepage.

    7. Re:AJAX explained... by Zoobster · · Score: 0

      Oy, next time - I'll remember to put spaces in there, here it is formatted better:.

      I wrote a quick thing on it here:
      http://zoobster.blogspot.com/

      and on hiveminds:
      http://www.hiveminds.org/phpBB/viewtopic.php?p=468 18

      MS has their object documented (wherein the property of .responseText shows its forced UTF8), but I've discovered that its the same for every browser (FF, Opera, etc). The only browser who supports the correct code-paging for the .responseText is Apple Safari.

      If you maintain the charset in the XML document you retrieve with .responeXML (say shift-jis or whichever) - then the .responseXML object behaves accordingly and you can render non-UTF8 data. It was frustrating as heck to try and retrieve shift-jis with .responseText (declaring it in setHeaders, the page calling was shift-jis, and the page requested was shift-jis - but it all came up as utf-8, garbled). I lucked out finding that the .responseXML respects the codepage.

      These days, I just use .responseXML exclusively, just to avoid that headache. Sure, sometimes when you do a callback - all you want is something small - say, "3" - and .responseXML requires valid XML (read: extra crap/elements wrapped around just to get a "3"), but it protects me from ever having to retrieve data that is of a different codepage.

    8. Re:AJAX explained... by Anonymous Coward · · Score: 0

      Hey dumb-ass, Simon is just the reviewer of the book, not its author.

  3. I think I buy into this "ajax" thing by gtrubetskoy · · Score: 5, Informative

    Paul Graham's got an opinion on Ajax in his Web 2.0 essay.

    I too initially thought "What's the big deal, it's just JavaScript". But I'm now actually reading the "Ajax in Action" book, and it looks like there is something to it. It's not so much about the tools you use (which are indeed JavaScript and CSS pretty much), it's more about the architectural view of the application, where you think of the browser hosting your application rather than content and the server produces data rather than content and how Ajax coding is not just get-the-javascript-to-work-and-move-on like in the old days, but rather not unlike any other language, requiring same level of discipline.

    Anyhow, the book explains it better, I recommend it.

    1. Re:I think I buy into this "ajax" thing by AKAImBatman · · Score: 4, Insightful

      I too initially thought "What's the big deal, it's just JavaScript". But I'm now actually reading the "Ajax in Action" book, and it looks like there is something to it. Anyhow, the book explains it better, I recommend it.

      You make it sound so new and mysterious.

      AJAX is simple. We now have a cross-browser method for making server requests in an asynchronous fashion. Combined with the fact that the demise of Netscape 4 means that we can finally code for the DOM, and you've got a recipe for success. It's not anything magical or mysterious. In fact, you could do it with hidden IFrames long before AJAX even became a buzzword. The key is that it's useful and semi-standard. Which means that we can finally deploy all those cool web apps we've wanted to deploy for years but couldn't.

    2. Re:I think I buy into this "ajax" thing by OakDragon · · Score: 2, Interesting
      One of the nice things about AJAX is that it just absolutely blows people away. The click, they expect a page load or a refresh. But it's just there. It really breaks the user's image of what is about to happen. It allows web applications to transcend the "toy" level, just a little.

      Imagine Slashdot never re-loading a page. We could watch as posts spring into existence in real time. A little spooky, if you ask me. :)

    3. Re:I think I buy into this "ajax" thing by arkanes · · Score: 2, Insightful
      where you think of the browser hosting your application rather than content

      And this is where you go wrong, and why AJAX sucks, and will continue to suck - web browers are (fundamentally) shitty application platforms, for very important reasons that will not go away. The future of web applications, the future where they don't totally suck and aren't jury rigged one-of inconsistent half-assed things, is in specialized thin clients.

    4. Re:I think I buy into this "ajax" thing by CastrTroy · · Score: 3, Interesting

      This is what bothers me a little bit. Sometimes when I'm at a web page that uses Ajax, I'm expecting the page to refresh, or do something else when I, say, click on button. Sometimes you don't even notice stuff happening, and you're sitting there waiting for some page to load, that is never going to load. I know how the web works, so I expect things to happen a certain way. When pages use AJAX, they change the way things are done, and start to confuse those that really know what's going on.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    5. Re:I think I buy into this "ajax" thing by estebanf · · Score: 1

      Well, ajax is just an advertisement word for something that's everything but new.... but, we can't blame it for your lack of awareness :)

      --
      DON'T STEAL MUSIC!
    6. Re:I think I buy into this "ajax" thing by CastrTroy · · Score: 1

      Basically what I'm saying is that 99.9% of web pages refresh when you click on something that is supposed to perform an action. When AJAX like technologies are used, the page doesn't refresh. When applications don't behave the way people expect them to, it creates usability issues.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    7. Re:I think I buy into this "ajax" thing by Baricom · · Score: 1

      web browers are (fundamentally) shitty application platforms, for very important reasons that will not go away.

      Netscape didn't believe that, and Microsoft was scared enough to kill them off by releasing a free web browser on every platform that Netscape supported, so the Windows revenue stream would continue. In fact, the point of ActiveX is arguably to support applications in the browser.

      Google doesn't seem to believe that it's a terrible platform either.

    8. Re:I think I buy into this "ajax" thing by arkanes · · Score: 2, Insightful
      Netscape didn't believe that,

      And they were wrong, too, and so was Microsoft. They were worried that Java appletts, of all things, were going to kill the desktop OS. Wake me up when that starts happening - and it had a much better chance than AJAX does.

      Google doesn't seem to believe that it's a terrible platform either.

      Thats why Google Earth is an AJAX application, right? Except it's not. And Googles applications, while good and certainly groundbreaking in terms of web applications are nothing compared to the state of client applications, even years ago. The UI features Maps and GMail lack are too many list here - and they are extremely suited for deployment on the web. Spreadsheets, and even word processing, not so much.

    9. Re:I think I buy into this "ajax" thing by saranagati · · Score: 1

      this is more the fault of the web designer. They should put something on the page to let you know something has changed like using the yellow-fade-technique, or have an image display in a non-intrusive but eye-catching way saying something is loading. (These techniques are actually given in the book i'm reading called "Foundations of Ajax" which is also a great book).

      --
      Give a man a match and he'll be warm for a minute, set him on fire and he'll be warm for the rest of his life.
    10. Re:I think I buy into this "ajax" thing by Anonymous Coward · · Score: 0

      Tags! Few

    11. Re:I think I buy into this "ajax" thing by the+grace+of+R'hllor · · Score: 1

      If you are confused because things don't happen the way you expect them to, how can you say that you "... really know what's going on"? :)

    12. Re:I think I buy into this "ajax" thing by david.given · · Score: 1
      ...it's more about the architectural view of the application, where you think of the browser hosting your application rather than content and the server produces data rather than content...

      Wait... this is like the MVC thing that Smalltalk invented 25 years ago, right? Where you divide your application up into the Model (the thing that manages the data), the View (the thing that takes the data from the Model and organises it for the user interface), and the Controller (the thing that the user actually interacts with)?

      The only real difference I can see between AJAX and conventional web apps is that with a conventional app, the big network pipe is between the View and the Controller; with an AJAX app, the network pipe's between the Model and the View. Plus a small matter of coding, of course.

      Every time I come across a cool new technology, it turns out that Smalltalk invented it in 1980...

    13. Re:I think I buy into this "ajax" thing by serutan · · Score: 1

      I think the value of AJAX is in combining the asynchronous request technique with cross-browser scripting, and of course packaging it neatly as an entity and giving it a name. The technique itself has been around since IE5, when Microsoft introduced the XmlHttpRequest ActiveX object. I've been using it since 1999, but back then it wasn't very well documented and it never got the attention it deserved.

      Microsoft could have done a lot to promote this, for example adding native support for it like Mozilla has done. It would have given the rest of the browser world one more thing to catch up with. So why didn't they? A Microsoft manager remarked to me back then that IE6 wasn't going to contain a whole lot of new features, because with Netscape pretty well dead there wasn't much point in developing IE any further. Kind of reminded me of when somebody around the year 1800 suggested closing the patent office because there was nothing left to invent.

    14. Re:I think I buy into this "ajax" thing by Anonymous Coward · · Score: 0

      You make a good point.

      For example, in GMail, I can't count how many times I'm composing an email, and decide I need to reference something in my Inbox. My normal action here would be to middle click "Inbox" and open it in a new tab. But due to GMail's Ajax implementation, Inbox is not a hyperlink, it is a Javascript call, so I can't open it in a new window.

      My workaround is to put the cursor in the address bar and hit Alt+Enter, which duplicates the URL to a new tab. But as you say, the regular way doesn't work as expected.

    15. Re:I think I buy into this "ajax" thing by BigGerman · · Score: 1
      >> Imagine Slashdot never re-loading a page. We could watch as posts spring into existence in real time

      Like, say, http://www.digg.com/spy ?

    16. Re:I think I buy into this "ajax" thing by l00k · · Score: 1
      Sometimes when I'm at a web page that uses Ajax, I'm expecting the page to refresh, or do something else when I, say, click on button. Sometimes you don't even notice stuff happening, and you're sitting there waiting for some page to load, that is never going to load.

      This is actually a very good point that you raise about Ajax, that has less to do with the failings of the technologies than it does way some people employ them. Clicking an Ajax link won't cause the browser to refresh, and since most users look to the top-right corner of their browser, or their status bar, for visual feedback on the connection and retrieval status of the result of their mouse click, this can leave an Ajax-enabled site feeling broken.

      The best solution is for web developers and designers to provide some simple feedback of their own that could be a simple small animated gif of some kind, perhaps with some text saying 'loading...' 'updating...' or 'sending...' nearby that is switched on when a link is clicked.

      http://script.aculo.us/ has a JavaScript library that can be used with links to switch on or off content in <div> or <span> tags with mouse clicks, which works very well with an Ajax-enabled site.

    17. Re:I think I buy into this "ajax" thing by jaseuk · · Score: 1

      I'm seeing alot of business apps (CRM, GIS, Accounting, Asset Management etc.) all changing from traditional client-server (Either Windows or Terminal Clients) going over to web based applications, the vast majority of these apps are now going to a web system as the primary interface, even those that have client software usually have a web interface for casual use.

      Personally I feel this is a retrograde step for efficiency as a trained data entry operator can work far faster in a text console style accounting program with a few macros than they ever can in a typical web application. Perhaps the improvements available through AJAX style apps can get some of the responsiveness back, typically these applications are all traditional and slow form based web apps.

      Interestingly enough it's these apps that are usually the stumbling block to moving an office over to an open source desktop, as historically all these apps have been windows based compiled applications, with this shift to web based applications there is a greater possibility of using a Linux based desktop.

  4. OR of course... by Anonymous Coward · · Score: 0

    This could just be more hype...

  5. So.. by PhrostyMcByte · · Score: 4, Funny

    I guess we are in for a much cleaner internet?

    1. Re:So.. by corcoranp · · Score: 1

      Only if they use the Anti-Baterial kind...

      --
      Peter Corcoran
    2. Re:So.. by Tumbleweed · · Score: 2, Funny

      I guess we are in for a much cleaner internet?

      Yeah, but it's gonna smell like a hospital.

  6. Intersting book site by smittyoneeach · · Score: 4, Funny

    My only disappointment was that the popup on mouse-over didn't say "Hello, world", which would've been funny on a couple of levels, and opted for something practical like telling you how to BTFM.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  7. Feyenoord Ajax by Anonymous Coward · · Score: 4, Funny

    I have used this idea Ajax and I found the alternative Feyenoord to be superior in every department. However there is worse to be found on the market, after trying out PSV Eindhoven I demanded my money back.

  8. Someone on Slashdot by Philip+K+Dickhead · · Score: 0

    Forgot to close the ITALICS tag. I wonder if I can do it for them...

    --
    "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
    1. Re:Someone on Slashdot by Philip+K+Dickhead · · Score: 1

      I guess not!

      --
      "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
    2. Re:Someone on Slashdot by sacdelta · · Score: 1

      I believe it is that last bit of italics from the article itself.

      --

      Brought to you by: "Al"toids - the curiously weird mint.

    3. Re:Someone on Slashdot by Philip+K+Dickhead · · Score: 1

      It is - and the tag wasn't closed. With CSS, we get a page all Italics.

      --
      "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
  9. speared in the nipple by ericcantona · · Score: 1

    I'm afraid this ajax will suffer the same fate as the original and be speared in the nipple, by the Next Big Thing (TM)

    --
    When the seagulls follow the trawler, it's because they think sardines will be thrown in to the sea
    1. Re:speared in the nipple by Anonymous Coward · · Score: 0

      You'll notice that Ajax 1 actually spears Simoisius in the nipple. I don't know of any Simoisius in Seclusion, but they had best guard their nipples. Ajax 1 is on the hunt.

    2. Re:speared in the nipple by h0nk3y · · Score: 1

      As the previous poster points out, Ajax was the nipple spearor, not the nipple spearee. Other places he speared people included the gut, the head, the side, the neck and the chest. I didn't remember so much spearing going on in that tale. Hopefully this new Ajax will play much nicer with his internet neighbors...

    3. Re:speared in the nipple by UniDyne · · Score: 1

      The original actually slew himself by falling upon Hector's sword. It is unclear whether the sword pierced his nipple (doubtful), but it definitely wasn't a death by spear.

  10. Can AJAX finally bring us "push technology" by DeadSea · · Score: 2, Interesting
    Could we finally get push technology with AJAX?

    I'd like to have the following, all of which have been cumbersome and refreshy to implement in a web browser so far:

    • A news page that I can leave open and automatically gets new stories added to it without refreshing. (CNN that I can leave open and know that stories will apper within a minute of them being posted)
    • A stock ticker that is always up to date. (Yahoo finance that I don't have to refresh)
    • Weather forcast and current conditions that change in real time.
    • Some way to glue all of them together into the same page ala RSS
    1. Re:Can AJAX finally bring us "push technology" by br0ck · · Score: 1

      Both of these do exactly that:

      From Google: http://www.google.com/ig
      From MS: http://www.start.com/

    2. Re:Can AJAX finally bring us "push technology" by arkanes · · Score: 2, Informative

      No. AJAX, for all it's hype and buzz and crapola, does not fundamentally change the client/server nature of HTTP and the web. AJAX applications that load data do it by polling, exactly the same as meta refresh tags and timer-based javascript refreshes have been for 10 years.

    3. Re:Can AJAX finally bring us "push technology" by CastrTroy · · Score: 2, Informative

      You really can't do "push" with webpages, or their data. You could make something that looked like push, but in reality is actually just polling. The problem with this is that AJAX is supposed to reduce the amount of traffic to a website. If you have users constantly polling you for information, you're going to increase your load. I guess it would be better than polling and getting an entire page every time. We'd need to change the way AJAX works in order to get something that was truly "push".

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    4. Re:Can AJAX finally bring us "push technology" by Jerf · · Score: 1

      Everything except the last is pretty easy, although your websites will of course have to actually implement it, or you'll have to do a lot of work yourself.

      The reason it's easy is that it would work much like old push technology; you'd actually pull the information periodically. You can have some problems with unavoidable memory leaks in the web browser, but other than that it would be easy.

      That last one is interesting, and while it is also possible would require a lot more work by a web-based RSS aggregator; at that point I question why you're not just using a current RSS aggregator.

      (That's probably the biggest downside of AJAX; web browsers are mighty big hammers now, but many problems still aren't nails.)

    5. Re:Can AJAX finally bring us "push technology" by Scarblac · · Score: 1

      Well, no, but what you can do is make your refreshy polling things more lightweight and more invisible, so that they sometimes give the illusion of being a push technology.

      --
      I believe posters are recognized by their sig. So I made one.
    6. Re:Can AJAX finally bring us "push technology" by jd142 · · Score: 2, Informative

      I think you can do all of these things since you can have javascript in a while loop/sleep or whatever and then every x number of seconds have the javascript call the function to update the page. I don't do a lot of client side programming, precisely because I can't guarantee what's on the client, but javascript should be able to do that.

      The examples you have here though can also be handled by a meta-refresh. Unless you wanted different sections of the page to update at different intervals. So that the stock is updated every second, the news every 30 minutes, the weather every 15. Then unless you set the meta-refresh to the lower time, ajax would work for these things.

      You could also be really old school and use frames with meta-refresh.

      Although I will confess that I have only started with ajax, it seems to me that it is better suited to apps that are also passing client side input or changes.

      But I could easily be wrong.

    7. Re:Can AJAX finally bring us "push technology" by _xeno_ · · Score: 4, Interesting

      Nope. Push is dead, NAT killed it. (Well, a whole bunch of things killed it, but essentially you can't connect back to a client any more, and there are a whole host of reasons why you generally don't want to leave connections open.)

      However, you can do what email clients have done for ages: poll. And that's what things that emulate what you're talking about essentially do.

      Essentially, with AJAX, you'll have some JavaScript program that uses the good ol' window.setInterval to poll the server every five minutes or so. It gets back an XML document that contains a list of changes, if any, to the page you're looking at. If the data has changed, it then uses the DOM to alter the page to display the new information.

      Effectively, though, it's just a page that refreshes automatically via JavaScript. Because it can pull back an XML document, it doesn't have to download ALL the HTML stuff to get the data. Because it's in the background, it doesn't have to "destroy" the page to load the new information, allowing it to be added to an existing page in a seamless manner.

      It's really nothing new, exactly, it's just that the most popular browsers (Internet Explorer, Firefox, Opera, and Safari) all support XMLHttpRequest in some form now, making it feasible to use it without cutting out some section of your user base. It's just message passing in JavaScript.

      --
      You are in a maze of twisty little relative jumps, all alike.
    8. Re:Can AJAX finally bring us "push technology" by sukotto · · Score: 1

      I have this already. It's called Google | Personalized Home (requires a gmail id). Wish it was more customizable, but I really like it.

      --
      Come play free flash games on Kongregate!
    9. Re:Can AJAX finally bring us "push technology" by Anonymous Coward · · Score: 0

      Those are stupid ideas.

      The last thing I want is being half-way through reading a paragraph, and have that paragraph disappear because it was bumped out by a new story.

      I want new material when *I'm* ready for it. The "Reload" button does that beautifully.

      BTW, anyone knows how to get Firefox NOT to honor the http-equiv="refresh" meta tag? I find it just as annoying as pop-ups.

    10. Re:Can AJAX finally bring us "push technology" by TheRaven64 · · Score: 2, Interesting
      NAT didn't kill push. Push technology is very possible using XMPP, rather than HTTP as the presentation layer. You build something like XMPP Publish-Subscribe on top of it, and then plug in a browser. The browser sends your JID to the server (or a proxy JID if you want anonymity) and subscribes to the pub-sub node relating to the page / web app. Every time the server wants to send to some information, it can. You keep a TCP/IP connection to your XMPP server open while you are online, and the web server can connect to this and send you data in the form of XML stanzas. Then all you need is a Javascript (or whatever) onXMLRecieved() function that takes the new XML and applies it to the DOM.

      I saw a proof-of-concept demo of this over a year ago. It would be nice to see it integrated into Mozilla...

      --
      I am TheRaven on Soylent News
    11. Re:Can AJAX finally bring us "push technology" by Anonymous Coward · · Score: 0

      click the red x before the page refreshes.

    12. Re:Can AJAX finally bring us "push technology" by KilobyteKnight · · Score: 1
      AJAX applications that load data do it by polling, exactly the same as meta refresh tags and timer-based javascript refreshes have been for 10 years.

      Polling... yes.
      Exactly the same way... no.

      Ajax is not the end all of programming technologies, it is, however, very useful. I'm completing a rewrite of an internal project for work using xajax. The user interface is so much better than before it's amazing. It has allowed me to add the little usability pieces that just aren't possible with traditional methods. For example, dynamically generated drop downs based on live user input similar to the "To:" field on gmail.

      Yes, it could have been done without Ajax, and in fact it was. However, the look, the feel, and the ease of use for the end user has improved dramatically.
      --
      When will Windows be ready for the desktop?
    13. Re:Can AJAX finally bring us "push technology" by Anonymous Coward · · Score: 0

      Sorry doesn't work. The red X is disabled. Tested on www.cnn.com with Firefox 1.0.7.

    14. Re:Can AJAX finally bring us "push technology" by doublec · · Score: 3, Informative

      Yes and No. One approach is to use have the client initiate an AJAX request to the server but the server does not send data immediately. It delays until there is stuff to push. It can either continue to push as needed (I send Java which gets evaled by the client) or it can close the connection and have the client re-connect. It then goes back to the delayed response.

      This is better than client polling in that it's not so bandwidth unfriendly. It has the downside that browsers only have a limited number of connections that it uses and this eats one of them up (Some versions of IE only use 2 connections). This could prevent other AJAX or normal HTTP requests from occurring.

      The same problem exists with the 'hidden IFRAME' approach. One interesting workaround is to have a hidden flash applet on the page whose sole purpose is to create a persistent connection to the server. The server can send data to the flash applet which then calls javascript callbacks on the web page. This does not eat up a browser connection as flash has its own connection pool. As it's a normal socket you can also use any protocol for the events you want. The downside is that if the user goes through a strict firewall that only allows outgoing http traffic on port 80 you're stuck.

      I describe some of the options here: More on Ajax and Server Push

      Paul Colton, the author of the AFLAX library, implemented the persistent socket idea here: AFLAX and Persistent Connections. It uses AFLAX which allows easy communication from Javascript to an embedded flash applet.

      The approach I've gone for is to use the flash idea, falling back to a delayed AJAX call response, then to a hidden IFRAME depending on browser support. This approach does what you want - allowing the server to push to the client.

    15. Re:Can AJAX finally bring us "push technology" by catalyst · · Score: 1

      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.justfuckinggoogleit.com">justfuck inggoogleit</a><br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;....no, but seriously, google's customizable homepage does all of this, and i wouldn't call it cumbersome in the slightest. i have it open all day, as a low-bandwidth and low-real-estate aggregator that allows me to keep an eye on everything important to me, from the <a href="http://www.nyt.com">nyt</a> to <a href="http://www.somethingawful.com">sa</a>.

    16. Re:Can AJAX finally bring us "push technology" by catalyst · · Score: 1

      doh!

      *sigh*

    17. Re:Can AJAX finally bring us "push technology" by misleb · · Score: 1

      While I am generally not one to hype AJAX, your first 3 points are nobrainers with ajax. You just set a Javascript timer to periodically poll the server and replace esxiting div's or whatever with new content. Super easy.

      As for gluing them together, I think that is beyond ajax. You'd probably have to design your own webpage that glued them together and hope they don't change the format of the data any time soon.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    18. Re:Can AJAX finally bring us "push technology" by misleb · · Score: 1

      I imagine a browser querying specific bits of data is a lot less of a load than a user hitting "refresh" on the browser periodically.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    19. Re:Can AJAX finally bring us "push technology" by MindStalker · · Score: 1

      No he is saying NAT (Network Address Translation) makes conneting to a client without a constant open connection virtually impossible.

    20. Re:Can AJAX finally bring us "push technology" by adamruck · · Score: 1

      I AGREE!

      I have this book, and I am writing ajax for production use a work right now. If there was an easy way to set up server side interrupts, we could have our pages do much cooler things, and it would actually probably be much easier to write.

      Basically what this means is that along with doing async requests, ajax would have to open a socket, either a plain socket, or sslv2/sslv3 or whatever, and then the client side scripts on the server could write things to this socket.

      The tricky part would be how the flow control happens on the client side. With normal sockets usually the both the server AND the client fork/make another thread. So on the server side, one thread would listen for incoming requests, and one would write stuff to the socket. This is no problem for most server side scripting languages. On the client side, one would render pages, do javascript/dom stuff, etc, the other would listen for commands on that socket.

      Right now there is no such thing as fork()/pthread_create() in ajax. Implementing this DIRECTLY would basically mean writing an entire new langague. They would have to hack up a simple small api for reading that socket, defining the end of a message, defining a function to call when we recieve a message, defining how that funtion call interacts with the flow of the rest of the javascript, etc.

      In my experiance, adding something like this is NOT trivial. When you start changing the flow of execution of your script, lots and lots and lots of things break. Then again, I have not personally ripped appart any browsers lately.

      --
      Selling software wont make you money, selling a service will.
    21. Re:Can AJAX finally bring us "push technology" by adamruck · · Score: 1

      Polling is ok for somethings, really not good for others.

      What if you had a number of people in a chat room written in ajax. You would have to poll very frequently, every few seconds or so, for each person in that chat room. If your chat room gets any number of users, you going to be pushing a lot of traffic, most of which would be avoided if we could do server side interrupts.

      What if you have a call center, and you have a thing on your page that is showing incoming calls, this is another case where you would have to poll very often, on the order of every second or two. If your call center has more than just a few people, once again, it adds up pretty quick, and once again, this could be avoided with sever side interrupts.

      Sure we could write a non browser application to do this, but then we would have to screw around with supporting all sorts of different operating systems, and also it would completely eliminate the old "log in the call center software real quick and see how things are going and say hi from some random computer"

      --
      Selling software wont make you money, selling a service will.
    22. Re:Can AJAX finally bring us "push technology" by tbedolla · · Score: 1

      Hello Chris...I was reading the slashdot article that you have linked to your site. Are you familiar with the JSR-168 specification (portal/portlet) and if you are, could you give me your opinion on AJAX's role in a portal environment. What I'm thinking/wondering, if this is an updating technology that could work well within a portal paradigm.

      (I'm a former programmer/architect that has moved to the CTO ranks and I haven't programmed in ~3+ years...still trying to stay up on latest developments)

      --

      "Everything in the universe is clouded by the impositions of the mind"
    23. Re:Can AJAX finally bring us "push technology" by TheRaven64 · · Score: 1
      Push doesn't require you to be able to make a connection to a client. It requires you to be able to send arbitrary data to a client at any time you choose. XMPP allows this, and has no problems with NAT, since the client connects to their XMPP server and remains connected.

      Even without NAT, push technology requiring the server to initiate connections would be broken by things like dynamic IPs and people configuring firewalls not to allow incoming connections.

      --
      I am TheRaven on Soylent News
    24. Re:Can AJAX finally bring us "push technology" by misleb · · Score: 1

      Yes, pushing has its benefits. I was just addressing the desires of the parent poster. Too bad you can't make generic TCP connections in Javascript. Then again, maybe that isn't such a bad thing. :)

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    25. Re:Can AJAX finally bring us "push technology" by doublec · · Score: 1

      I think AJAX would just be another tool used to build portlets. The idea being that an individual portlet can use AJAX to make requests to the server and update parts of the portlet without the entire portlet having to be updated.

      I'm not sure how portlet containers behave in the way they update the page though. When a portlet needs to be updated does the whole page update? Or do JSR-168 portals use AJAX behind the scenes to only update the specific portlets? From the looks of the spec it seems that AJAX could be a useful tool for portlets. At the very least, they'd be useful for writing the portal, which aggregates the portlets.

    26. Re:Can AJAX finally bring us "push technology" by jovlinger · · Score: 1

      That's what I was thinking too. (not that I have any acronyms for it).

      Basically the client just makes an XML request equivalent of "tail -f", and the server periodically just sends one more packet down the TCP pipe.

      In order to do this over http, you might have to lie about the content-length (make it very large, and then close the socket when done), but that should be ok.

      I'm sure someone must have implemented streaming over http before?

    27. Re:Can AJAX finally bring us "push technology" by David+Gould · · Score: 1

        web browsers are mighty big hammers now, but many problems still aren't nails.

      Well said. But still, any variant on the hammer/nail saying requires me to invoke my own version:
      "A sufficiently powerful hammer is capable of transforming any problem into a nail."
      --dgould's First Law
      --
      David Gould
      main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
    28. Re:Can AJAX finally bring us "push technology" by TheRaven64 · · Score: 1

      This is easy in theory over HTTP, but difficult in practice. The reason is HTTP proxies. Many of them don't forward the reply to the client until the stream is closed, or have other bugs/features that are encountered with open-ended connections like this (such as closing the connection if the data rate drops below a certain threshold to stop people DoSing them by running a large number of slow connections through them until they run out of file descriptors).

      --
      I am TheRaven on Soylent News
    29. Re:Can AJAX finally bring us "push technology" by Ignominious+Cow+Herd · · Score: 1

      Let me guess. The project is The WWWheel of Fortune - starring Pat XajaX and Vanna #FFFFFF!

      --
      Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
    30. Re:Can AJAX finally bring us "push technology" by John+Hurliman · · Score: 2, Informative

      That whole technology relies "You keep a TCP/IP connection to your XMPP server open while you are online", which is already doable with HTTP. The client makes an AJAX call to the server, and if the server has data to return it sends it back immediately, otherwise it waits and holds the connection open until $TIMEOUT. If $TIMEOUT is hit it sends a "no data" message to the client, and the client reconnects again each time. This is how http://www.meebo.com/ implements pseudo-push to create the webgaim bridge, and apparently it scales up to the tens of thousands with a few decent servers, but not sure how many users each machine can effectively support.

      One day IPv6 will solve all this, and I can have news pushed to my browser in my flying car. Until then polling and pseudo-push seem to work all right.

    31. Re:Can AJAX finally bring us "push technology" by Anonymous Coward · · Score: 0

      Despite the high moderation of the parent post, you've totally missed the point of AJAX. It isn't to just update pages with a time delay.

      The point of AJAX is to split the implementation of user interfaces between server and client in such a way to make the interaction much smoother.

      The client does not have all the data. The server takes a while to generate it. Instead of regenerating the whole page and sending a new one, and instead of the client sending data to the server and waiting for a response, AJAX allows you to ask the server for a response, and NOT WAIT for it, and allow the user to continue interacting. Meanwhile, some time in the near future, the server gets around to responding, and the client can update the page with the new information without making the user wait or start over.

      Pages that merely use javascript to update without the use of the Asyncronous part of JAX feel slow and klunky. Pages that do it right can integrate quick response time of the client with large or multiple access remote databases and do something that otherwise would not be possible.

    32. Re:Can AJAX finally bring us "push technology" by Anonymous Coward · · Score: 0

      Yes, you can.

      In fact I released a webfront to my ICQ clone, here is the screenshot:
      http://www.licq.org/Gifs/licq_licqweb_usage.jpg

      Messages and changes in status get sent to the user in real-time, all thanks to Ajax, Web2.0, whatever you wanna call it.

    33. Re:Can AJAX finally bring us "push technology" by saden1 · · Score: 1

      Polling it can do, but AJAX is so much more than that. It enables interactivity much the someway a thick client desktop application does. Whether the execution of the code is being done on a remote location or a local system is really irrelevant. I'd even go so far as saying, if done right, it can make a large portion of thick client desktop applications space obsolete.

      --

      -----
      One is born into aristocracy, but mediocrity can only be achieved through hard work.
    34. Re:Can AJAX finally bring us "push technology" by TheRaven64 · · Score: 1
      There are several differences:
      • Keeping a connection open to every client is not very scalable. You will run out of file descriptors, and if you don't you'd better make sure your TCP/IP stack can handle it.
      • With XMPP, each client needs one connection, not one connection per remote app.
      • With XMPP, each app server just needs one connection per remote user's server.
      • With XMPP, the user can remain registered with the server and be notified of updates without needing to connect directly even when the machine moves IPs (e.g. a laptop moving between home, work, and a mobile network).
      --
      I am TheRaven on Soylent News
    35. Re:Can AJAX finally bring us "push technology" by ChrisGilliard · · Score: 1

      You can do push with AJAX using persistant http connections using XMLHTTP. This is very useful and allows you to do basically any type of interactive application.

      --
      No Sigs!
    36. Re:Can AJAX finally bring us "push technology" by SiliconEntity · · Score: 1

      People today are too young to remember, but "push" has always been about polling. What was the classic "killer app" for push, circa 1997? Anyone remember something called PointCast? It was the biggest thing on the net back then. You'd subscribe to the channels you were interested in and presto, real time information came pouring into your PC. But behind the scenes, the PointCast client was POLLING the server to find out if there was new data available! It always worked that way.

      Push was more of a conceptual shift than an actual technology where servers would send data to clients unannounced. The same concepts would work fine with Ajax.

    37. Re:Can AJAX finally bring us "push technology" by killjoe · · Score: 1

      If you are going to use XMPP why use a browser at all?

      --
      evil is as evil does
    38. Re:Can AJAX finally bring us "push technology" by Matje · · Score: 1


      If you're willing to use Flash there is actually a very nice way to implement push in a webpage.

      Through a simple Flash movie you can set up a continuous two-way connection with an text or XML server. You can call Javascript from Flash and vice versa so the Flash movie on the client is nothing more than a message gateway. Best of all, you are garantueed to receive a client-disconnected event on the server if the browser is closed/crashes/obliterated or moves away to another page. I've used this techniques a couple of years ago to implement reliable locking and notification in a webbased groupware email client (we wanted to provide immediate notification of incoming messages to a group of people will assuring that only one person was typing a reply at any one time). I'm using this technique now to implement a realtime machine monitoring tool.

      One drawback is the server application though: you need to roll your own (alhough you could implement a stock server and plug in an application-specific module) and host it on the same server as the webserver. Flash will only allow you to connect to that server. So this is mainly useful for intranet situations where you can actually install a server app.

    39. Re:Can AJAX finally bring us "push technology" by rawg · · Score: 1

      Actually, the problem is with MSIE. Mozilla does have a socket type connection that can provide push. But since MSIE doesn't do it... Another way is to create a socket with Java and use the Javascript gateway to update the DOM. This worked for me until I tested it on XP/MSIE. Then it failed. The current solution I'm using is AFLAX. it seems to work really well. Keeping a socket open to the server and pushing data over. I've had a connection up for a week without a problem. It works on almost all browsers that I've tested so far. The requirement is that the client needs to have Flash 8 installed.

      --
      The above is not worth reading.
    40. Re:Can AJAX finally bring us "push technology" by Jerf · · Score: 1

      Touché!

  11. The book by dantheman82 · · Score: 3, Informative

    I ordered it recently from Bookpool.com and although they claim that it's out of stock, I still ordered it and recevied it not too long after. Otherwise, if you'd rather get it a little sooner, try out Amazon.

    Also, a very interesting resource is available through Pragmatic Programmer, a beta book which means you can get PDF updates as they are written until it is shipped in hard copy in Feb. 2006. Already a book of 160+ pages, they already had a section on creating your own version of Google Maps (and more relating to SAJAX and other PHP implementations). The beta book, while only a little extra, is highly recommended!

    --
    This sig donated to Pater. Long live /.
    1. Re:The book by dalutong · · Score: 1

      it is at my borders books store here in silver spring, md -- so if anyone is looking check your local store.

      --

      What comes first, finding a teacher or becoming a student?
    2. Re:The book by Anonymous Coward · · Score: 0

      hmm, I ordered it from amazon.com more than a month ago. A week ago I received an email that it had been shiped, but it still haven't arrived so I'm not sure if ordering it from amazon.com will be any faster than bookpool.com

  12. Not efficient. by Anonymous Coward · · Score: 0

    I mostly noticed how my PC (2.8ghz and doing nothing else) paused for a moment as the Ajax component started to do something. Excellent!

  13. Good read so far by jenkin+sear · · Score: 1

    The central idea behind Ajax is pretty good IMHO- moving as much of the presentation-tier processing as possible to the client system. It's certainly a cleaner design- separation of concerns means you can get away from some of the nastier (and kludgy) template languages like PHP, Cold Fusion, and their ilk. You can also see a future where JSP, Velocity, and ASPX pretty much go away from the application stack- yes, you still need some templating system to produce the XML or javascript that your application is consuming, but it dramatically decreases in importance. Further, your application tier code can devote itself to modeling your business logic, and not get distracted by trying to simultaneously serve the right stylesheet to Mac IE5 users while calculating shipping to uzbekistan...

    The alarm bell ringing in my brain is that all of this is structured around a fairly blunt tool in javascript. It does a great job at what it is designed to do- but it seems to require coercion to handle some more sophisticated needs. When I start building a large, complex application, I really prefer to have namespaces to compartmentalize things. It seems like you need to use tricky external libraries to gain the features needed for external support- with the classic issues around leaky abstractions that this causes.

    The book has been a good read so far (I'm halfway through)- but already, it seems like they are bending over backwards to get around the lightweight nature of the language. I'm not arguing for strong typing- but encapsulation would probably help people write better bug-free code. Anyone out there know if there's any reasonable prospect for these structural issues in javascript being addressed at the language level instead of the library level?

    --
    What a strange bird is the pelican, his beak can hold more than his belly can.
    1. Re:Good read so far by RetroGeek · · Score: 2, Insightful

      The central idea behind Ajax is pretty good IMHO- moving as much of the presentation-tier processing as possible to the client system.

      Which to me sounds like a stab at re-inventing Java applets.

      All the problems you describe (name spaces, libraries, etc) are already solved in Java. In addition, you are not at the mercy of browser JavaScript bugs.

      The only downside is the initial startup time for the Java applet, as the local JVM must be loaded, THEN the applet.

      As for the JVM version, you can check for this in your applet before you start the dependant code, and you can ask the user to d/w the JVM.

      The technology Java Web Start provides an easy to use framework.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    2. Re:Good read so far by Anonymous Coward · · Score: 0
      The alarm bell ringing in my brain is that all of this is structured around a fairly blunt tool in javascript. It does a great job at what it is designed to do- but it seems to require coercion to handle some more sophisticated needs.

      I'm no java expert and I don't know didly about AJAX but having said that, why not just use java instead of javascript? My understanding is that pretty much any java code can be run within a browser unaltered. The only difference between a "normal" java program and one to be run in a browser is that the browser version has a few lines of additional initialization code that has to be run at startup.

    3. Re:Good read so far by TWooster · · Score: 2, Interesting

      Well, if you're running web applications, a good bit of IP is in the code, which is client visible. I suspect the best way around all of this is to develop a strongly typed language which compiles down into javascript. Javascript then becomes the intermediate language rather than first-crack. Additionally, the compiler can name variables and functions things that have no relation to the underlying logic of the code, making it much more painful to reverse engineer. (Much like reverse engineering a .NET program, except skipping the translation into human readability.)

      Additionally, you could compile with optimizations to meet the capabilities of different browsers. Hell, toss in a little bit of encapsulation in the language "libraries" to avoid all of those layer/div issues. Etc, etc.

      Javascript is good at what it does, it just wasn't meant to do quite that much.

      Also, anyone wonder why there isn't a "valid CSS" to "IE broken CSS box model" translator? Maybe I ought to write that...

    4. Re:Good read so far by jenkin+sear · · Score: 1

      Sure, we could use JWS and applets; I've written quite a few. And there's no doubt that java is a better systems language than javascript.

      But for some reason, the world has pretty much rejected both technologies. It's probably a combination of things- you need some level of skill before you can just start messing around with java (maybe an IDE, but at least an understanding of how to invoke a compiler and all that). Of course, it's also easy to blame M$ for their adopt and extinguish policy- adopt a craptastic JDK version and let it sit there like a festering boil for seven years until everyone gives up.

      I guess if I were designing an app and could control the execution environment, I'd much prefer to use SWT and communicate back to a remote server with RMI, SOAP, XMLRPC or some such- but if I had to write something that worked in most available browsers, I think I'd see a better compatibility mix from an Ajax / Javascript environment.

      --
      What a strange bird is the pelican, his beak can hold more than his belly can.
    5. Re:Good read so far by oni · · Score: 1

      separation of concerns means you can get away from some of the nastier (and kludgy) template languages like PHP, Cold Fusion, and their ilk.

      What?? How do you plan to produce all that pretty xml if not with a server-side language?

      I use AJAX with coldfusion all the time. I have an AJAX Service (is that what we're calling them?) that returns the answer to a FAQ question. The AJAX app shows the list of questions. When the user clicks one, it calls the service. The service has to query the database to get the answer to that question. The service is written in coldfusion. php or perl or whatever would work too.

    6. Re:Good read so far by jenkin+sear · · Score: 2, Interesting

      Right- that's my point, actually.

      Your cold fusion code is now acting an application tier language- it receives a simple query (give me the answer to my FAQ question number 3), and it queries the DB, formats the result as XML, and goes back to sleep.

      However, a classic cold fusion site handles the page layout, loads in whatever resources are appropriate for that locale (english, german, japanese, whatever), queries the database, formats the results as a bunch of table tags, and outputs everything.

      So you've effectively split your tasks into three tiers- presentation tier (in javascript), application tier (in cold fusion), and data tier (mysql or whatever). You're using cold fusion as middleware- I'd suggest that this is a fine strategy for a one or two developer site, but that you may wish to look to a more maintainable / suitable language for middle tier development- but that's just my $.02.

      --
      What a strange bird is the pelican, his beak can hold more than his belly can.
    7. Re:Good read so far by RetroGeek · · Score: 1

      something that worked in most available browsers, I think I'd see a better compatibility mix from an Ajax / Javascript environment.

      Huh?

      Using JavaScript you are at the mercy of the Web browser and its implementation. At the most basic AJAX level, IE and Mozilla/Firefox use different methods to instantiate the object which actually does the background communication!

      All MS needs to do is change their method, and now you are re-writing all your client side apps to test for yet another method.

      Not that I am not using this, but it is only for light interaction.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    8. Re:Good read so far by JulesLt · · Score: 2, Interesting

      Mozilla hace already started implementing some parts of the next version of the ECMAScript spec into JavaScript, and it looks like ActionScript 3.0 has actually gone from being behind JavaScript to being ahead (support of packages and namespaces). The issue, of course, is with what IE and jScript bothers to do (probably nothing if it undermines the XAML/Windows Presentation layer thingy). I still have that same alarm bell ringing, in that you're definitely using a spoon to slice a steak. The browser was never really designed for running dynamic applications, but we've ended up with a set of tools that just about allow it, and enough customer demand to make it worth the effort, but that still doesn't make it the right tool - it's just one millions of people already have. The main plus-side, of course, is that point of 'no installation'. Then again, some Ajax pages are becoming absolute monsters to download that they may as well be apps. So that makes me think of what else is out there that is better at dynamic applications - i.e. actually designed for developing them - and I ended up wondering how long it will be before we rediscover the Java Applet - there's got to be a good reason why Google are pushing rollout of the Sun JVM with the toolbar . . .

      --
      'Capitalists of the world, unite! Oh ... you have' (League Against Tedium)
    9. Re:Good read so far by estebanf · · Score: 1

      just wait here... java applets die by their self mediocrity. They were slow, ugly, long loading and insecure. It doesn't matter that they were wrote in java (great language), it's the crappy framework what sucked.

      --
      DON'T STEAL MUSIC!
    10. Re:Good read so far by jenkin+sear · · Score: 1

      Of course, it might be easier to just compile Firefox / Gecko as an activeX control and embed it in IE... then you could hack in an updated ecmascript interpreter.

      --
      What a strange bird is the pelican, his beak can hold more than his belly can.
    11. Re:Good read so far by jenkin+sear · · Score: 1

      Unfortunately, that's not the case. When running in the local browser, the applet needs to live within very different security constraints, and is running on an unpredictable version of the Java virtual machine.

      You can easily port a Java applet to be a standalone java application, but the other path is much harder.

      This is also arguable by observable evidence: Why do Google Maps, Gmail, Oddpost, Microsoft Live, et al seem to all be using Ajax techniques- and none of them are using java applets? I haven't seen a major site rely on a java applet for several years now.... there must be a reason beyond geek fashion for this.

      --
      What a strange bird is the pelican, his beak can hold more than his belly can.
    12. Re:Good read so far by misleb · · Score: 1
      As for the JVM version, you can check for this in your applet before you start the dependant code, and you can ask the user to d/w the JVM.



      What if the new VM breaks another applet which only works with the older VM? I've seen it happen more than once before. In my experince, applets are extremely picky about the JVM version. Applet interoperability is far worse than javascript interoperability. Plus, applets have the small problem of not interacting with the rest of the page. I'll pass on the applets, thanks.



      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    13. Re:Good read so far by Anonymous Coward · · Score: 0

      Okay, you may well be right. As I said, I'm not that Java or AJAX enlightened, however...

      When running in the local browser, the applet needs to live within very different security constraints,

      I thought that *was* the whole point of Java in a browser. That it *did* provide you with a secure "sandbox" and that guarantees *were* made by the Java platform as to what could and could not be done.

      and is running on an unpredictable version of the Java virtual machine.

      Well, I think this argument could be made about any software platform. You (the user) need to stay somewhat current with releases or you get left behind. Having said that, Java has reached a pretty mature and stable point in its API. Version differences will probably becuase much less an issue than say five years ago.

      This is also arguable by observable evidence: Why do Google Maps, Gmail, Oddpost, Microsoft Live, et al seem to all be using Ajax techniques- and none of them are using java applets? I haven't seen a major site rely on a java applet for several years now.... there must be a reason beyond geek fashion for this

      I was responding the the OPs concern with javascript. Not the use of AJAX techniques or practices. Is AJAX tied to just javascript? I don't know if it is or isn't. That was why I suggested java rather than javascript. Also, my experience has been that most majority projects and people consistenly pick the inferior means or tool to solve problems. For a long time there was a misconseption that javascript == java. Many people choose javascript or some other means over java simply because there is less of learning curve than that required for java. Many people who do "web" apps have never written a C++, or Java program. Also, for every case sited above you could probably find couter examples of equally impressive "applets" written in Java.

    14. Re:Good read so far by Anonymous Coward · · Score: 0
      I was responding the the OPs concern

      Ha, ha. Jenkin, you were the OP... my bad. That's what I get for not paying close enough attention!

    15. Re:Good read so far by Anonymous Coward · · Score: 0

      you may wish to look to a more maintainable / suitable language for middle tier development

      such as?

  14. Hype by mr.newt · · Score: 1

    the hype may be underselling the prospects for this new buzzword

    I'm pretty sure the way hype works is someone says that the current level of excitement about a product is underselling it- this is no different. Particularly, saying that something isn't hype and exaggerating it even further are not good ways to stop hype. It is by definition overselling something. If it isn't hype, just say it isn't hype.

    And this is before I even add in my opinion that AJAX is indeed hyped way beyond its usefulness already.

  15. Is anyone else sad this caught on? by PhrostyMcByte · · Score: 0

    XMLHttpRequest isn't very intuitive.

    The other better technologies which have been in development will now have an impossible time getting ground to stand on. I fear we will never get out of this now :(

    1. Re:Is anyone else sad this caught on? by Miniluv · · Score: 1

      This has always been my problem with the Internet. Supposedly the best technology wins, but in reality the good enough and already here technology tends to win. Occasionally we get gems like HTTP, but more often we get crap like SMTP.

    2. Re:Is anyone else sad this caught on? by Anonymous Coward · · Score: 0


      I don't know why AJAX caught on either. once you get the XML, you have to jump through tonnes of hoops to massage the info into usable formats.
      I've actually been doing something very similar (and eisier) to this for years.

      since NS 3.0 you've been able to use the img.object to send one way info back to server at any time.

      add the img.onload and img.onerror and pass back a 1x1 invisible gif on success or nothing on failure and I'd have a simple pass/fail reporting procedure on that method

      IN IE 4+ I'd us a hidden IFrame to make requests requiring complex return values from the server. it could be completely in Javascript, for updating form elements or Javascript and HTML and pass up the contents of wrapper elements to be directly plugged into the main page.

      NS 4.x let me do thew same thing with an ILAYER (I'd hide the ILAYER tag in an IFRAME and have the best of both worlds).

      Prior to those, going way back to NS 2.0 1px high control frame at the bottom of the "app" to return javascript for form apps.

    3. Re:Is anyone else sad this caught on? by ForumTroll · · Score: 1

      I'm with you on this one. In my opinion, Ajax looks like one big nasty hack and definitely not a clean optimized solution to the problem. I can just imagine the mess of Ajax infested applications I'm going to have to try and debug in the future. I've seen way to many developers just trying to use Ajax for anything and everything recently whether it's appropriate to the situation or not.

      --
      "A Lisp programmer knows the value of everything, but the cost of nothing." - Alan Perlis
    4. Re:Is anyone else sad this caught on? by Anonymous Coward · · Score: 0

      I don't disagree with the basic premise you're making about which technology wins but I don't think that it's believed that the "best" (assuming that by best you mean technologically superior) tech wins. I think the most useful and customer focused tech wins which in its own way is the best tech. Part of being the best is being practical, here now, and customer/user focused. Technologies that pander to the geeks and nerds of a market segment never do as well as those that are first to market and pander to the common user. This isn't a bad thing it's just how free markets work.

    5. Re:Is anyone else sad this caught on? by Anonymous Coward · · Score: 0

      Just testing to see if this disables the italics.

    6. Re:Is anyone else sad this caught on? by Doctor+Crumb · · Score: 1

      So, what better technologies would you recommend? SOAP? Something else entirely?

    7. Re:Is anyone else sad this caught on? by Steven574 · · Score: 1

      Very good point. I'm afraid that business folk dont realise the potential dangers of unstructured unweildy application that can only be maintained by the original programmer. The fact there's a buzzy new word to band about (i.e AJAX) means the technology is bound to get miss-applied. Akin to what happended with EJB. Still as I've said elsewhere AJAX probably has uses for projects that lean towards the fancy web-site rather than complex business web-application solutions. At least I hope so!

  16. A peeve of mine mine by nothingbutcoupons · · Score: 0

    "The fundamental ingredients in Ajax are in-browser JavaScript, Cascading Style Sheets, the browser's internal DOM model and asynchronous HTTP requests." DOM Model = Document Object Model Model This is just like NIC Card and PIN Number.

    --
    Nothing But Coupons - Your no-frills site for online coupons and discou
  17. Free AJAX T-Shirt! by ChaserPnk · · Score: 2, Informative

    OK, I know this isn't much of a deal, but it's still good if you buy a lot of books. If you buy AJAX in Action and another Manning book from major bookstores, you'll get a free AJAX T-shirt. A list of bookstores has been posted.

    I don't work for Manning, but I'm so in love with their books. The Java GUI programming book alone is worth a million to me. I refer to it almost everyday. I've looked at similar O'Reilly books and they don't even come close! I'm about to purchase Manning's .NET book pretty soon as well.

    Happy reading.

    --

    "A diplomat is a man who always remembers a woman's birthday but never remembers her age." -Robert Frost
  18. ugh by Andrewkov · · Score: 1

    If that lame mime reference is any indication of how this book is written, I'll take a pass on it. ;-)

  19. Read the FAQ by nizo · · Score: 2, Funny
    ...mime performance on a radio show...

    If you are having mime problems perhaps this will help?

  20. testing testing by Anonymous Coward · · Score: 0

    testing testing 123

  21. mark my words by hedge_death_shootout · · Score: 0, Flamebait

    AJAX is great, but it only really comes into its own when married with another brand new technology:

      HAHA - ("HTML And HTTP Applications")

    Keep your eyes peeled - AJAX + HAHA is going to be huge!

  22. 9/10? by syrinx · · Score: 0, Troll

    Surely you mean 8/10?

    --
    Quidquid latine dictum sit, altum sonatur.
  23. Clear your mind by Billosaur · · Score: 1

    From the review: You will learn how to ensure your app is flexible and maintainable, and how good, structured design can help avoid problems like browser incompatibilities. Along the way it helps you unlearn many old coding habits.

    To quote a famous 900-year old green swamp-dweller, "you must unlearn what you have learned."

    This sounds intriguing. Anything that could help mitigate the problems of interfacing and data presentation on the web would be a blessing.

    --
    GetOuttaMySpace - The Anti-Social Network
    1. Re:Clear your mind by Hognoxious · · Score: 1

      So let me get this right: you judge a platform by whether or not it includes a Star Wars quote. Sheesh.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  24. Javascript namespaces by brunes69 · · Score: 4, Informative
    "Namespaces in Javascript are dead simple, because of function scoping:
    window.MyNamespace = new Object() {
    function NamespaceMethodA() {
    // alert('hi');
    }

    function NamespaceMethodB() {
    // do b code...
    }
    }

    NamespaceMethodA() // Causes exception

    MyNamespace.NamespaceMethodA() // works.

    Want to "import" a namespace? Include this function in one of your base .js files

    function import( namespace ) {
    for( i in namespace )
    window[i] = namespace[i];
    }

    You can now do import(MyNamespace) and all it's members will be locally scoped.

    The problem in Javascript is not namespaces - it is the fact that there's no way to mark a method/variable as protected/private. So you need to resort to old C-style crap like appending _ to private members if you want to enforce your contracts.

    1. Re:Javascript namespaces by statusbar · · Score: 1
      The problem in Javascript is not namespaces - it is the fact that there's no way to mark a method/variable as protected/private. So you need to resort to old C-style crap like appending _ to private members if you want to enforce your contracts.

      It turns out that Javascript really is a cool dynamic language with more features that most people think. protected/private are possible. see http://www.crockford.com/javascript/javascript.htm l

      --jeff++
      --
      ipv6 is my vpn
    2. Re:Javascript namespaces by ray-auch · · Score: 1

      Private members are also perfectly possible using closures.

      The fact that a lot of people don't understand how, doesn't mean the language has no way to do it.

      Javascript is not C(++) or java. Unfortunately (perhaps) it looks similar enough that a lot of people never go beyond the bits that do look like C/Java.

    3. Re:Javascript namespaces by Anonymous Coward · · Score: 0
      Interesting info about approximating public/private in javascript:

      http://www.crockford.com/javascript/private.html

    4. Re:Javascript namespaces by brunes69 · · Score: 1

      Those are not public and private members, they are just ways of hackishly emulating them using closures.

      And there are still things that this does not provide you with, you can't make real private member in Javascript. If you define it in a closure, then it is not the object's scope anymore, so it cannot access it's members natively using the 'this' object. If it can access it's members, then it is available to all external access too, so it is public.

      You can't have an object do both, it is impossible. People get around this by passing in their own 'this' references to privately created functions in closures, and somehow think that this means Javascript supports private methods. This is insane.

  25. Compatibility by kstumpf · · Score: 4, Insightful

    AJAX represents a new paradigm in UI design for web applications. I don't think there's much question about AJAX's value. You will see two problems though: 1) browser compatibility, and 2) bad code and interface design.

    You have to think hard when deciding if your client base is ready for it. The same browser issues exist with AJAX that exist for any other "new" client-side technology. By relying on it, you will exclude visitors.

    As for my second point, get ready for a lot of bad AJAX. People have a hard enough time designing interfaces as it is (think of all the bad ones out there), and building dynamic ones that work like people expect them to will be that more complicated.

    1. Re:Compatibility by PietjeJantje · · Score: 1

      Very insightful and to-the-point.
      This will spawn a while new generation of "Killer websites" which are cognitive disasters.
      The whole point of AJAX is IMHO not the XML or Javascript, but only and only XMLHttpRequest, which can return data and logic, thus enabling real interfaces. Frankly, I prefer doing most logic server side and not use XML (overhead!), yet for the user it's the same effect. But there is no interface and there are no standard libraries which are really, well, standard. Everybody is developing their own, and thus their own interface and code base from scratch, while 99,9% of them should be kept away from that like David Siegel should be from writing webdesign books. We'll see the "photoshop bevel" effect; give the people tools to make crap, and they will make crap. This is very important, because the cognitive paradigm of a single page with back and forward is so strong that it kills of framed sites and flash sites, but if everyone starts making their own crap once again, the whole browing eperience of people might fall apart.
      However, just as Jacob Nielsen and the likes tamed the web and the David Siegels, this might also happen here. I don't think it's a reason to dismiss AJAX. On the contrary, in a couple of years we'll look back and say how incredible silly, outdated and cumbersome the old web was with these stupendous delays and re-rendering when clicking on things.

  26. Italics by Anonymous Coward · · Score: 0

    Um, dummy editors - the entire page is in italics because you forgot to close your markup...

  27. Italics by alta · · Score: 1

    Can someone insert an [/i] tag after the bn.com link up there?

    --
    Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.
  28. See it in action on Yahoo Mail Beta by gasmonso · · Score: 2, Informative

    If you're fortunate enough to see it in action on Yahoos's new email, you will be impressed. You can take a look here http://www.ajaxian.com/archives/2005/09/yahoo_mail _beta_1.html.

    gasmonso http://religiousfreaks.com/
  29. Where have I heard this before? by Minwee · · Score: 1

    "Mr. Chappell, Ajax seems to have the momentum of a runaway freight train. Why is it so popular?"

  30. God spoke to me by Animats · · Score: 1
    1)Sept 2003: I was down Pittsburgh, and I heard a voice that said,"Good News". It confused me, but I felt compeled to come home to my old church.

    With the Holosonics Audio Spotlight, you can now make people think God is talking to them! Range from 20 to 200 meters. And the speaker is just a flat black disk about a foot in diameter.

    It's really clever. It works by projecting audio as two ultrasonic signals, which produces a very narrow beam. You can't hear the ultrasonic components, but the difference between them becomes audible some distance from the speaker, because air isn't entirely a linear medium. Some museums now use these things, so that the recorded message for a display is only audible in a small area. We're going to be seeing more of these very soon; the price is about to drop.

    So if you hear voices in your head, start looking around for 1' diameter disks pointed in your direction. Move around a bit; the beams are very narrow.

    1. Re:God spoke to me by petermgreen · · Score: 1

      what exactly makes you say the price is about to drop?

      patent expiry?
      insider information?
      some technical development?
      just a hunch?

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    2. Re:God spoke to me by Anonymous Coward · · Score: 0

      Isn't it obvious? God told him so.

    3. Re:God spoke to me by Animats · · Score: 1
      what exactly makes you say the price is about to drop?

      Press release about a consumer version.

      There's another company making these "parametric loudspeakers" now. We're going to be seeing a lot of these things, since they offer a new, annoying way to deliver ads in public spaces.

    4. Re:God spoke to me by surprise_audit · · Score: 1
      they offer a new, annoying way to deliver ads in public spaces

      About 25 years ago a guy where I worked set up an ultrasonic receiver alongside a numeric-keypad operated lock. The transmitter wasn't complicated - just a square-wave generator, the ultrasonic transducer, a battery and a pushbutton. I made one myself out of parts from Radio Shack.

      Where am I going with this?? About $5 worth of parts gets you a device that ought to be capable of disrupting the incoming ultrasonic beam... OK, so it will take some fiddling to optimise the jamming effect, but it should be possible.

  31. *yawn* by Anonymous Coward · · Score: 0

    Someone wake me up when there's a cross-platform graceful-degrading _standard_ for javascripted web apps.

    In the meantime I've got another buzzword for you: HTML5.

  32. Only the term is new. by prestidigital · · Score: 0, Redundant

    Ajax is not new. It is also not limited to JavaScript or XML. As long as scripting languages have been able to talk to embeddable controls (small "c"), one has had the ability to make calls to embedded objects that can make asynchronous transactions and return the results to web pages. My colleagues and I have been doing "AJAX" since 2001.

  33. AJAX is ok but... by jar240 · · Score: 1
    ...I prefer Comet.

    Chris

    --
    "You can drive out Nature with a pitchfork, but It always comes roaring back again." - Tom Waits
  34. Broken HTML? by Xarius · · Score: 1

    Disclaimer: I use Opera

    Has anyone else noticed that the entire part of this page past the end of the article is in italics?

    How the hell can you miss a closing tag so easily?

    Off-Topic I know, but it's the first really broken HTML slipup I've seen on Slashdot.

    --
    C17H21NO4
    1. Re:Broken HTML? by Mitch+Monmouth · · Score: 1

      Indeed I can confirm: Also broken in MSIE 6.0.

  35. Sorry, but by Strixy · · Score: 0

    If it has Java in the title anywhere... I'll pass. It probably has a PDF plugin as well.

  36. Real-world usage by m2pc · · Score: 2, Informative
    I am a developer for a huge PHP/SQL project and we are creating our 2nd generation system using AJAX. As a server/client developer this technology is allowing us to create a much better user experience.

    I agree that AJAX has its downfalls ("back button" breaking, JavaScript usage, etc.) but most of these issues are present in "web sites" not "web applications". With a real Web Application, you have more control over the user in terms of requirements, etc. than a public web page.

    To get around state change issues, we designed the system to load initial state values on page-load, then update page elements dynamically with AJAX. This cuts down on travel time to/from the server, and if the user hits the "Refresh" button, the state isn't broken.

    1. Re:Real-world usage by Vladislas · · Score: 1

      That's also a good idea, for Accessibility or for those with JS turned off. Personally, I code everything as though JS didn't exist, and then add all that extra functionality on top. In AJAX, I go so far as to simply send back a stripped down version of the page from the server, with its MIME type set to text/xml, parse it and update the AJAX-enabled page accordingly. Saves time and extra work of making up a new XML schema, and also makes life easier if you use Struts. It's as simple as mapping a page to itself.

      --

      Sig Sig Sputnik
  37. and of course... by Anonymous Coward · · Score: 0

    ...it's on an article about web development. Go figure!

  38. If it doesn't focus on the technologies being used by Tetravus · · Score: 3, Interesting

    it's useless.
    AJAX is a simple concept. Really, it is. Getting three different coding paradigms to work together harmoniously is not so simple. Throw in available AJAX libraries, JSPs and Atlas pages and you've got layers upon layers of coding cruft that need to be understood before a functional, stable, web-app can be built.

    If this book stays at the architecture astronaut level without ever delving into the why of the code structure of the example programs, then it may serve as a cookbook but certainly not as an informative manual that can provide a baseline from which coders can build their skills.

    Perhaps the book is better than the reviewer makes it out to be, but he offers no real justification of the 9/10 score awarded, so it's hard to say. Just for giggles, I should note that when Richard Stevens' seminal Advanced Programming in the Unix Environment, 2nd Ed. (being possibly the most comprehensive and useful programming book I've ever read) was reviewed it also received a 9. How do these two books compare?

  39. A Shorter, More Direct Alternative by kimanaw · · Score: 5, Interesting
    I read the sample chapters of the reviewed book and was underwhelmed. Chapter 4 spent way too much time trying to sound "impressive", with lots of UML diagrams and Design Patterns references. Plus, 615 pages for AJAX ? Unless 400 of those pages are weblinks to online references, I'm afraid its just killing a lot of trees.

    I just picked up Foundations of Ajax, and its a good, focused 273 pages, of which nearly half is resources and tools for implementing. I haven't had a chance to download and try out the examples, but the reference links all look like great resources. While I wish they'd skipped the usual Chapter 1 "Here's the history of the web" that any reader of the subject matter already knows, all in all, its a great way to cut thru the BS and get rolling with the AJAX concepts.

    In summary:

    • If you want to learn UML, buy a UML book
    • If you want to learn Design Patterns, buy the GangofFour book.
    • If you already know how to put together a webpage, write some Javascript, and maybe a little CSS, and just want to understand how it all to hangs together in AJAX, then Foundations of Ajax is probably a better choice than "Ajax in Action".
    --
    007: "Who are you?"
    Pussy: "My name is Pussy Galore."
    007: "I must be dreaming..."
  40. AJAX inthe Real World by Heembo · · Score: 5, Informative

    In may ways, that book is out-of-date. Here is what is working for me *today*. There are many possibiliites, but my focus is Rapid Application Development - and these tools help me rock and roll, fast.

    Last week I was tasked to replace several standard (but sometimes complex) HTML business forms with an AJAX solution. Here are the best tools I found after lots of research time. This is bleeding edge; but functional in Opera, Safari, IE XP, FF XP, FF OSX, no small feat.

    1) AJFORM - submit a form via Javascript using HTTP post or get without refreshing the page. (next release in a few days, keep an eye on it, its brilliant and easy to use) http://redredmusic.com/brendon/ajform/ 2) YOUR SERVER CODE - I use Java, but anything including ASP, CF, PHP - its all works. (Standard HTTP). Just needs to spit out XML, easy feat. 3) GOOGLES XPATH LIB - those of you who use Sarissa, drop it - she does not support Safari. Google's XPATH lib does, well, on all browsers you need. http://goog-ajaxslt.sourceforge.net/ - this is the best and easiest way to "search into" XML data. You can use native DOM calls, but it takes about 10x as much time to get it right.

    With AJFORM and Googles XPATH lib on the client, I was able to quickly and effectively start making business forms in AJAX that were "scarry fast" and WOW'ed all the folks who are paying the bills! YAY!

    Whats your architecture for AJAX?

    --
    Horns are really just a broken halo.
    1. Re:AJAX inthe Real World by guet · · Score: 1

      I've just done a site in Ruby on Rails, which includes nice javascript libraries for AJAX stuff (I think it's from here), and you can use the AJAX stuff without using Rails.

    2. Re:AJAX inthe Real World by zobier · · Score: 1

      I am currently using the following function. It performs a request, parses the result from text/query-string format into an associative array then passes this to your callback function following your other arguments. I tried to have a global httpRequestObject that I could re-use each time a httpRequest was performed but IE doesn't like it that way. I decided to use query-string format because it's simple, easy to read and some existing server-side scripts return values this way. I used eval as while it may be considered evil, it's very convenient. I tried to create a regex that would parse the query-string into an associative array in one go but I didn't come up with anything elegant.

      function httpRequest ( url, callback, params ) {
      var httpRequestObject;
      if ( window . XMLHttpRequest ) {
      httpRequestObject = new XMLHttpRequest ( );
      } else if ( window . ActiveXObject ) {
      try {
      httpRequestObject = new ActiveXObject ( 'Msxml2.XMLHTTP' );
      } catch ( e ) {
      try {
      httpRequestObject = new ActiveXObject ( 'Microsoft.XMLHTTP' );
      } catch ( e ) { }
      }
      }
      if ( httpRequestObject ) {
      httpRequestObject . onreadystatechange = function ( ) {
      if ( httpRequestObject . readyState == 4 ) {
      if ( httpRequestObject . status == 200 ) {
      var response = httpRequestObject . responseText . split ( '&' );
      var responseLength = response . length;
      var what = /(.*)=(.*)/;
      var that = 'response [ \'$1\' ] = \'$2\';';
      var field;
      for ( var i = 0; i < responseLength; i ++ ) {
      eval ( response . shift ( ) . replace ( what, that ));
      }
      if ( params ) {
      params += ', ';
      }
      eval ( 'callback ( ' + params + 'response );' );
      }
      }
      };
      httpRequestObject . open ( 'GET', url );
      httpRequestObject . send ( null );
      }
      }

      --
      Me lost me cookie at the disco.
    3. Re:AJAX inthe Real World by Heembo · · Score: 1

      Pretty cool man - so this is how you send data to the server...

      What are you using for server code?
      What does your server code spit back, xml?
      What libs are you using for xml parsing?
      You usin' XSLT or just straight Javascript to map data-to-ui?

      --
      Horns are really just a broken halo.
    4. Re:AJAX inthe Real World by zobier · · Score: 1
      Pretty cool man - so this is how you send data to the server...

      Send and retrieve. E.g.
      <input onblur="httpRequest('get_something.php?id='+this.v alue,'updateSomething','\'something\'');" />
      <input id="something" />
      <script type="text/javascript">
      function updateSomething(id,result){
      something = document . getElementById ( id );
      something . value = result [ 'something' ];
      }
      </script>
      So I can use my httpRequest from the GP post to update document elements without a refresh. I.e. change the options in a select based on another input. I'm currently using it to update a list of suburbs and a state based on a postcode, not the kind of thing where you want to send all the data to the client in the first instance.

      What are you using for server code?

      PHP.

      What does your server code spit back, xml?

      text/query-string so my get_something.php?id= script will return something like something=this&something_else=that

      What libs are you using for xml parsing?

      I'm not using XML, too much mussing around and scripting overhead for such a simple use as what I'm doing. text/query-string is simple and it only takes a few lines to parse it into an associativ array. So you end up in your callback function with, like, result [ 'something' ] == 'this' && result [ 'something_else' ] == 'that'

      You usin' XSLT or just straight Javascript to map data-to-ui?

      Javascript to use my result to effect my document/form.

      --
      Me lost me cookie at the disco.
    5. Re:AJAX inthe Real World by Heembo · · Score: 1

      Dude, This is a righteous architecure. It's so simple and straight-forward, and already I can think of client-side support libraries to make this all-the-more rapid to code. How sweet! I'm going to stick to xml since I have so much legacy xml server code, but I'm very thankful you took the time to show us what you are up 2! :)

      --
      Horns are really just a broken halo.
  41. Poll and Pull slowly by jhliptak · · Score: 2, Informative
    You can only do one thing with AJAX: change a section of a screen with data from a server without reloading the entire page.

    What does that mean for push? It means that you can't do it. There is no real way to establish a connection from server back to the client.

    So then what's the excitement all about? There are two things you can do with AJAX that a "normal" web app can't do:

    • You can poll a server and update a portion of your web page. This method of polling can provide all four of your requests. The downside is that your polling and making requests you don't need.
    • You can pull slowly. This is a technique where you make a request and you don't expect to get a reply until there is new data. So you draw your page, make a request for newer information and when it becomes available, the server will finally reply. The downside here is that there is a limited number of unresolved requests that most web browsers will allow and your server needs to be very smart about thread and socket allocation.
  42. Ajax in action... by PietjeJantje · · Score: 0, Offtopic
    Ajax join Arsenal in the final 16

    Tuesday, November 22, 2005 Posted: 2159 GMT (0559 HKT)

    AMSTERDAM, Netherlands (Reuters) -- Ajax reached the Champions League knockout phase as two second-half goals by substitute Nigel de Jong gave them a 2-1 win over Sparta Prague in Group B on Tuesday.

    De Jong struck after 68 minutes with a powerful close-range header and grabbed his second in the 89th when he struck a low 16-meter drive past keeper Jaromir Blazek.

    Sparta captain Martin Petras got a late consolation for the visitors who battled until the end but lacked the firepower up front to trouble the Dutch side.

    With one match left Ajax have 10 points from five games and will finish second behind Arsenal, who have 15 points after beating FC Thun 1-0 with a late Robert Pires penalty.

    http://edition.cnn.com/2005/SPORT/football/11/22/c hampions.groupb/

  43. AJAX is Open-Source Lotus Notes? by sanman2 · · Score: 1

    So aren't the main attractions to Ajax that it has Lotus Notes type of functionality, but without that pricetag?

  44. My problem with Ajax... by Cow+Jones · · Score: 1
    ... is not the technology (which isn't new, as several others have already commented) or the hype (which is fine by me), but the way this buzzword has come into existence. The article that started it all is "Ajax: A New Approach to Web Applications", written by Jesse James Garrett. I admit this is somewhat irrational, but from the moment I saw the guy's smug face, I was on my guard. The article confirmed my suspicions - he puts up some pretty diagrams explaining something that people have been doing for years, gives the thing a catchy name, and goes down in history as The Man Behind Ajax. Mission accomplished. The acronym AJAX doesn't even describe the thing well: the XML-part is absolutely optional, and often does nothing more than slow down performance and "put XML into the application somewhere".

    Maybe he deserves some credit for giving it a name. Maybe. All I know is that every time someone mentions Ajax as the "next big thing" (and maybe even puts up a link to that horrible article again) it sets my teeth on edge.

    /rant

    --

    Ah, arrogance and stupidity, all in the same package. How efficient of you. -- Londo Mollari
    1. Re:My problem with Ajax... by Anonymous Coward · · Score: 0

      Agreed. Ajax (and DHTML) are just specific applications of Javascript, not some new technology.

      I build a fair number of interactive web apps, and always get asked stuff like, "Is that DHTML?", etc. I always answer "Uh, sure I guess. It's just page manipulation through Javascript".

      When was it decided that technology combinations required their own nicknames? What's next? A shell script that writes to stdout is a "Dynamic Terminal" app?

  45. Reminder about browser abilities. by dghcasp · · Score: 2, Insightful
    Don't get me wrong, AJAX is really cool. But if you develop your site using it, you'll be making your site inaccessable to anyone using MacOS9 or older browsers on Windows or *nix.

    From the records of the site I maintain, about 6% of all accesses are from browsers that can't handle AJAX.

    Incidently, from my over-optimistic decision to do all the layout for the site in CSS, those 6% also took 75% of the time and are responsible for 1/2 of the .css file being "hacks." Never again. Tables rule.

    1. Re:Reminder about browser abilities. by Bogtha · · Score: 3, Informative

      Don't get me wrong, AJAX is really cool. But if you develop your site using it, you'll be making your site inaccessable to anyone using MacOS9 or older browsers on Windows or *nix.

      Nonsense.

      Best practice with Javascript is to develop a site that doesn't use Javascript, and then add the Javascript in such a way as to be backwards compatible. AJAX, being a form of Javascript, is exactly like this.

      Some developers cut corners and write code that isn't backwards compatible. That's their decision, but it's got no bearing on whether or not AJAX itself is backwards compatible. AJAX is definitely backwards compatible. Visit Google Suggest in Lynx. It works fine. If you visit a site that uses AJAX and is not backwards compatible, then it is the fault of the site developers for misusing AJAX. It's not an intrinsic limitation of AJAX.

      All you are doing by saying that AJAX is not backwards compatible is scaring some people off AJAX, and making others give up on backwards compatibility. The former will result in less usable websites, and the latter will result in less compatible websites. Neither of these are good things. Please refrain from saying that AJAX is not backwards compatible. It is. You don't have to choose between AJAX and backwards compatibility, so don't mislead people into thinking that they do.

      --
      Bogtha Bogtha Bogtha
  46. Awesome book. by dep01 · · Score: 1

    Sitting right here on my desk right now. I highly recommend it.

    --
    "hey, could you pass me a paper towel? er.. I mean... DEPLOY ABSORBTION PANEL!"
  47. Is Ajax the next big thing or is Google? by heroine · · Score: 1

    The hype is supposed to be around a small programming technique but it feels like the only reason anyone cares about Ajax is because Google's outstanding advertising uses it in some capacity. But isn't it really advertizing that's big?

    A few years ago multithreading was the next big thing, but no-one starts a company today to specialise in multithreading. Now multithreading is called Asynchronous JavaScript+XML and we're supposed to think it's more substantial than multithreading because no-one can be told what it is without experiencing it for themselves, taking a red pill, and learning everything there is to know about CSS, JavaScript, XML.

    Based on the appliications, it's multithreading and it's just as hard to see entire companies revolving around it today as it was in 1997.

  48. Ajax Killed Himself by laoc00n · · Score: 5, Insightful

    Take a reliable, stateful transport protocol (TCP) and lobotomize it so that connection state gets thrown away. This is http. Take a platform-independent object technology (Java) and lobotomize it so that dumb xml data structures get passed to "stateless" objects (in other words, procedures), and all processing must happen at one end of the connection. This is Web applications. Take gui technology and lobotomize it so that screens must refresh one page at a time. This is a browser. So: having gone from a world of functional, stateful, distributed applications engineered to a true software model, we are now back (despite all the self-congratulatory rhetoric about "objects") to procedural programming and dumb terminals (meaning Web browsers). In other words, 1970s technology with pictures. Any half-wit can see that this situation is broken. How do we fix it? The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place. Brilliant.

    1. Re:Ajax Killed Himself by Anonymous Coward · · Score: 1, Interesting

      agreed.

      The thing that annoys me is the "holy grail" this solution appears to be to many people.

      It's still asynchronous. You still have to wait for a server response.

      The only difference is that your browser will never know the status of the request until the Ajax request is returned.

      It can be useful, but it's not the solution by a long shot.

      Infact, it's even worse than page refreshed IMO. At least in the current "way of things," it's easy to know when the application fails to complete the request and it's easy to guage the progress of a request with visual in-browser cues.

      Ajax is not going to bring the "desktop" to the web. the web isn't a desktop environment to begin with. it's a very different monster and I hope we won't all be disappointed by making it something it isn't.

      I'm a web applications developer and I know this. Am I crazy?

    2. Re:Ajax Killed Himself by Stormy+Henderson · · Score: 1

      Is Ajax a big mess compared to what it could be? Sure. Am I glad we have it? You bet.

      If we had to wait for all the browser makers to come together to design, from scratch, an entirely new web architecture that has all the features we want, and that does it simply and elegantly, we'd still be waiting in 2040, using IE 6 features.

      Ajax gives the web a big shot in the arm at a time when it sorely needs it, and it gives it to us now.

    3. Re:Ajax Killed Himself by dasil003 · · Score: 3, Interesting

      Take a reliable, stateful transport protocol (TCP) and lobotomize it so that connection state gets thrown away. This is http. Take a platform-independent object technology (Java) and lobotomize it so that dumb xml data structures get passed to "stateless" objects (in other words, procedures), and all processing must happen at one end of the connection. This is Web applications. Take gui technology and lobotomize it so that screens must refresh one page at a time. This is a browser. So: having gone from a world of functional, stateful, distributed applications engineered to a true software model, we are now back (despite all the self-congratulatory rhetoric about "objects") to procedural programming and dumb terminals (meaning Web browsers). In other words, 1970s technology with pictures. Any half-wit can see that this situation is broken. How do we fix it? The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place. Brilliant.

      Oh please, not this tired argument again! What you software engineering nazis are forgetting is that HTTP and HTML were designed to transmit static content. In that regard the protocol and the markup language are a tremendous success. HTML and HTTP are incredibly scalable and easy to use, which means getting more done in far less time. Remember that most of the web is static information. In fact, web infrastructure was so dead simple and easy to work with that web applications have flourished. It's not like there weren't competing technologies, and if they were the panacaea you seem to think, no doubt they would have done better in the marketplace.

      The real problem here is your inability to think outside your own comfort zone.

      Take a platform-independent object technology (Java) and lobotomize it so that dumb xml data structures get passed to "stateless" objects (in other words, procedures), and all processing must happen at one end of the connection. This is Web applications.

      This sentence is complete gibberish. Java is platform independent? Pretty close maybe, but you still have to test it for every target platform. There are advantages to having your application running on your server. Dumb XML data structures? No, we pass view data to the browser... maybe XML to be processed via JavaScript, maybe HTML/CSS for raw output, maybe an image, maybe a string. Why pass bloated objects and more code to be tested on every target platform when we can just pass the data we want the user to see? "stateless" objects? Just because HTTP is stateless doesn't mean web applications are. This is a separate issue from object-orientedness, which also has nothing to do with underlying protocols. all processing must happen at one end of the connection? View processing can be done client-side via Javascript which is very much optimized for that type of code. Meanwhile the bulk of your application code stays on the server in a controlled environment where it is secure. Don't underestimate the value of running your code in only one place.

      You seem to think being able to pass Java objects to a remote computer would be some kind of revolution in web development, but it would introduce a whole slew of issues, and for what? Not much we can't do just as easily now (unless you only know Java).

      Take gui technology and lobotomize it so that screens must refresh one page at a time. This is a browser.

      HTML + CSS is orders of magnitude simpler than presenting typical content through a GUI. Remember, the web is first and foremost about content. Name one other format that you can edit in a text editor and get anywhere near the power of HTML and CSS. Not PDF, Not Word Docs, Not Illustrator Files, Not Quark Files. Web browsers are not GUI technology. The fact that people can use it as a suitable replacement for GUI technology is a testament to

    4. Re:Ajax Killed Himself by Jack9 · · Score: 1

      Interesting post. Only, I disagree with what you list as strengths.

      No Installation (false)
      Easy content creation (content is always easy and irrelevant to platform)
      Global hyperlinking system (true, hence URL...)
      Speedy interaction (false)
      True rapid development (so is VB, also bad)
      Standard navigation/bookmarking scheme (reiteration of previous point cause yur out of good things to say)

      Working with Java or RealBasic or any other half-assed language with comparable use/capability makes Web Developers (like me) cry. The Web is 70's tech with millenium minds milking it. Like all software platforms that are 'hanging-on', something else will use it, then replace it.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    5. Re:Ajax Killed Himself by legirons · · Score: 2, Insightful

      The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place. Brilliant.

      I suppose the reason is, who do you trust?

      e.g. I look at xmlHTTPobject (or whatever it's called) and wonder, "how can they allow that, after all the fuss about ensuring that cookies aren't cross-domain"

      As I see it, AJAX is competing against things like Java, .NET, and ActiveX. Basically, the alternative is a popup window saying "Do you trust 123technologies to run this program? [Yes] [No]".

      And the population here is divided into (a) people who wouldn't install untrusted software if it were recommended by Gabriel Himself, and (b) people whose computers won't run because they're clogged-up with spyware.

      As you say, there are loads of better technologies if you trust the application writers. But who does?

    6. Re:Ajax Killed Himself by laoc00n · · Score: 1

      Oh please - not another true believer saying "Oh please" and pretending to refute an argument by using dramatic words like "tired" to imply that it has already been refuted.

      1) I made no assertion one way or the other about HTML and HTTP being suitable for particular purposes. Eulogize all you want about the wonders of the Web. It has nothing to do with my point.

      2) Yes, Java is "pretty close" (in your own words) to being platform independent. So if my sentence is gibberish, then you are also spouting gibberish. In either case, I used the term "platform independent" simply as an adjective describing Java. Had you been able to hold my entire sentence in your little head at once, you would have seen that my point was about "object oriented" vs. "procedural," not "platform independent" vs. "platform dependent." So again, you are driveling on about irrelevancies.

      3) I don't care whether your data structures are XML or PMS. An intelligent reader would have discerned my point: they are *data structures*, not objects. An object can also be just data if you want it to be; in fact, serialized Java objects (as an arbitrary example) *are* just data, in the sense that only the object *state* is serialized (so your rant about "Why pass bloated objects and more code . . .," etc. is simply wrong). The point is that real software gives you a choice.

      4) My contention is precisely that Ajax attempts to simulate an object-oriented model by layering hideously complicated sets of stuff on top of a pre-existing structure that is not itself object oriented (or, more precisely, used to be object oriented until it was lobotomized). So where you go on about "object orientedness" having "nothing to do with the underlying protocols," I thank you for your support.

      5) Yes, we all know that Javascript puts "view" code in the browser. Bully for you. And I apologize for not being sufficiently excited that my Web applications force me to take nearly the entire processing load on my server while the client's 3GHz machine sits idle waiting for a picture to paint. I will try to imitate your macho stoicism by meditating on the fact that my application code has the privilege of staying "in a controlled environment where it is secure." While I do this, I will also try to avoid any unpleasant questions about the security of my browser.

      6) You go on quite a bit about Java objects and such. I couldn't care less about Java in particular, but what you say (namely, that Java cannot do "much we can't do just as easily now") is absolutely true (though it's a bit beyond me why it needs stating that Java can't do anything that software can't do). Ajax, on the other hand, is capable of doing considerably less.

      7) Yes, HTML is simpler than writing a gui. Perhaps you can explain how this relates to what I said.

      8) Regarding dumb terminals, go learn what a metaphor is. I forgive you for not knowing. As you say, "This is pure ignorance."

      But honestly. Why pick nits at a time like this. You have provided me with a profound revelation. Your point about "abstraction" has helped me see the light. I realize now that I have been misled all my life concerning the meaning of this word. I always thought it had something to do with encapsulating logic so that people could write more functional applications. I see now (with your help, for which I am deeply grateful) that it's really about encapsulating things so that people can write *less* functional applications. I'm going to sign off now so that I can pan around my google map and reflect on how awe-inspiring it is.

      You are so right. I'll stop pining for my compilers immediately and join the herd.

    7. Re:Ajax Killed Himself by Phoenix+Rising · · Score: 1

      Got a grudge much?

      HTTP was designed to be stateless while retaining the reliability of TCP. This is a Good Thing. Maybe you don't like it, but it's still good.

      Neither the server nor the client side is necessarily stateless in AJAX; the server has its session object, and the client has a persistent JavaScript object store and DOM. Processing appropriate to the client end takes place on the client end, and processing appropriate to the server side takes place on the server side; a real programmer can even make the two co-operate in maintaining a common state.

      And, most importantly, you miss the whole point about AJAX concepts; under AJAX, you don't refresh entire screens, unless you're changing to a new application. The concepts behind DHTML are the same as those you'd apply to a GUI package like TCL/TK, GTK+, or Java, but screen objects are designed to be user-modifiable via CSS.

      The result is a site-configurable, distributed, secured access application.

      --
      Let us live so that when we come to die, even the undertaker will be sorry -- Mark Twain
    8. Re:Ajax Killed Himself by awol · · Score: 1

      Amen. Why people just won't open a freakin' port instead of trying to drive 1,000 angels through port 80 (or 443) I will never understand. Push, even polling, is a beautiful thing if the client can just send you back a little bit of meaningful context in a lightweight way.

      --
      "The first thing to do when you find yourself in a hole is stop digging."
    9. Re:Ajax Killed Himself by laoc00n · · Score: 1

      Yes, I have a grudge against all of the institutional stupidity that drives the technology industry.

      1) I made no comment whatsoever about http's reasons for being stateless. If you think it's a "Good Thing," I couldn't care less.

      2) If you actually read my posting, you will find that I also said nothing about ajax being stateless. I said that it layers a lot of complicated nonsense on top of the existing Web mess in order to compensate for capabilities that the underlying layers engineered out.

      3) "Processing appropriate to the client" does *not* take place on the client in an ajax "application." What takes place on the client is whatever processing the framework allows.

      4) Yes, a "real programmer" (as you put it) can make Ajax clients and servers cooperate to some extent. A real programmer can also write a 3-d game in assembly language.

      5) If, again, you actually read my posting, you will see that I say nothing about ajax refreshing entire screens. Refer to #2. I agree, however, that someone has missed the whole point.

    10. Re:Ajax Killed Himself by helix_r · · Score: 1


              * No Installation
              * Easy content creation
              * Global hyperlinking system
              * Speedy interaction
              * True rapid development
              * Standard navigation/bookmarking scheme


      I really take exception with "true rapid development". Web apps are ALWAYS more difficult than the equivalent in client apps.

      Also, there is way too much emphasis these days on web-apps. So much, in fact, that managers and developers feel the pressure to roll out "web-apps" even for simple in-house CRUD apps. I am in one of those situations. I dread having to deal with jsp's that are a train wreck of javascript, taglibs, scriptlets, html, css and "browser compatibility issues". AJAX techniques only fuck that up even more.

      Most development is not "for the internet", it is for in-house apps where you really DON'T NEED a web app.

    11. Re:Ajax Killed Himself by dasil003 · · Score: 1

      reiteration of previous point cause yur out of good things to say

      That's funny, because it seems I said a lot while you said nothing other than "I disagree".

      So you think people like to download and install software, and you think that everything should be written in a verbose language with bloated APIs using cumbersome engineering techniques, and you think that content creation is an afterthought that can be accomplished equally well on any platform. That doesn't make you anything more than elitist.

      I have a clue for you. Any moron can list 100 flaws with the web, but it takes a genius to come up with something better and get market penetration. In the meantime you can cry sour grapes about how the web is shit, but I'll be out there running my own business and developing applications that people actually use. When something better comes along, I'll be there because I don't have some idealogical ties to the 'one true way' of doing things.

    12. Re:Ajax Killed Himself by dasil003 · · Score: 1

      Web apps are ALWAYS more difficult than the equivalent in client apps.

      Only if you don't know how to use any frameworks. Writing a web app in raw PHP is like writing a client app drawing directly to the screen and capturing clicks and keystrokes. Of course GUI toolkits are going to be more mature having been a core area of commercial development over the past 25 years while the web has only been heavily prospected for 10.

      Most development is not "for the internet", it is for in-house apps where you really DON'T NEED a web app.

      Well as long as your company has one standard platform, and there are no outdates machines, and you have suitable infrastructure for automatic deployment and upgrades.

      If you have pointy-haired bosses telling you to do everything based on buzzwords without even taking your opinion into account, then you should be looking for another job, not griping about technology trends.

    13. Re:Ajax Killed Himself by dasil003 · · Score: 1

      I made no assertion one way or the other about HTML and HTTP being suitable for particular purposes. Eulogize all you want about the wonders of the Web. It has nothing to do with my point.

      Okay, well if it had nothing to do with your point then why even mention that HTTP is a 'lobotomized' form of something else?

      Had you been able to hold my entire sentence in your little head at once, you would have seen that my point was about "object oriented" vs. "procedural," not "platform independent" vs. "platform dependent."

      Nice ad hominem attack. That really proves your intelligence.

      Um, in case you didn't read your own comment, you said that the web is procedural because dumb data is passed to 'stateless' objects. I explained that this is nonsense because there's nothing stateless about web applications. Yes, HTTP is stateless. Therefore web applications implement state at a higher level. You write the backend in Java, PHP, Ruby, Perl or any other language which supports any number of programming paradigms. You write your frontend in Javascript (if you need it) which is fully object-oriented. Where's the procedural code?

      An intelligent reader would have discerned my point: they are *data structures*, not objects .... The point is that real software gives you a choice.

      As indeed I did. But what you didn't explain is why you need to pass objects to the client? Since everything is happening on the server, the only thing passed to the client is presentation. Maybe it's straight HTML, or maybe it's in XML format so that it can easily be coerced and inserted via Javascript. The idea that software is not 'real' unless it's a client-server architecture with code being transmitted across the network is extremely narrowminded.

      My contention is precisely that Ajax attempts to simulate an object-oriented model by layering hideously complicated sets of stuff on top of a pre-existing structure that is not itself object oriented (or, more precisely, used to be object oriented until it was lobotomized).

      Honestly, have you ever written a web application? If all your code is object-oriented, how is it that then magically it is lobotomized by a transmission protocol and suddenly procedural. There's plenty wrong with web development, but I'm afraid you're not getting it.

      Yes, we all know that Javascript puts "view" code in the browser. Bully for you. And I apologize for not being sufficiently excited that my Web applications force me to take nearly the entire processing load on my server while the client's 3GHz machine sits idle waiting for a picture to paint. I will try to imitate your macho stoicism by meditating on the fact that my application code has the privilege of staying "in a controlled environment where it is secure." While I do this, I will also try to avoid any unpleasant questions about the security of my browser.

      You're just highlighting the difference between regular GUI apps and web apps. They both have their advantages. I'm not saying traditional apps are dead. Your problem is you don't seem to think there is any value to keeping your code on your server, or distributing your application by means of a URL that anyone can type in to instantly access your application, or tight integration with tons of other applications on the same platform. Or maybe you just think there is a better way of achieving these benefits. Well call me when the better solution is out there. In the meantime I'll be making my living on the web.

      Ajax, on the other hand, is capable of doing considerably less.

      Yeah, and getting it out to the masses. What good is your ideal solution if no one uses it?

      Yes, HTML is simpler than writing a gui. Perhaps you can explain how this relates to what I said.

      Gladly. Most web applications are content related. Manipulating and presenting this content is core to the web app, so naturally using a platform that supports

    14. Re:Ajax Killed Himself by syousef · · Score: 1

      I'll bite.

      HTML + CSS is orders of magnitude simpler than presenting typical content through a GUI.

      You've never designed a good GUI with a RAD have you? Web pages, or GUIs are just as easy to design. It all depends on having good, efficient, flexible tools for building your GUI.

      People will be shopping on amazon, networking on myspace, bookmarking on del.icio.us, deleting outlook and switching to webmail, getting directions on Google maps, and otherwise making use of the web while you pine away for your IDE and compilers. Sorry the computing world is passing you by.

      Perhaps, but the guy's right. People who get paradigm happy during the early years of their career I can understand. But 30-50 year olds who still think every new technology is fantastic, and that they better jump on that band wagon or it'll pass them by...well that's just sad!

      Ask yourself what couldn't be done with 10 year old technology that can be today. Sure you can leverage faster processors, graphics etc. but fundamentally none of these new technologies are offering any new capability, and that's what the problem is here - increased complexity at huge cost for zero benefit.

      Perhaps you've never been introduced to abstraction before. Abstraction is what makes it possible to code in your pet language like Java.

      Abstraction for abstraction sake leads to incredible waste. Instead of abstracting everything, ask yourself if you're ever REALLY likely to want to change that feature you're making pluggable for instance. You don't want an application that's a jack of all trades and master of none. Spend the time building actual real functionality into code, and use abstraction as a tool, instead of a way of adding 30 new layers that you'll never use to the application, and making it confusing to follow anything that's going on.


      Instead of pointing out the things that web applications are missing, I challenge you to figure out a way to add all the benefits and features of web applications to "true software model":

              * No Installation


      Oh you have a magic web browser, that requires no installation do you? Or are you using an operating system that happened to install a web browser when you installed it.


              * Easy content creation


      The content is easy to create because there are tools available. You must be young to think that HTML was the first tool to allow "easy content creation">


              * Global hyperlinking system



              * Speedy interaction

      TCP is quick. No matter what you send over it you're going to be limited by the speed of this interaction. Web page rendering is actually still quite slow despite years of web browser development.


              * True rapid development


      For true rapid development you need drag and drop positioning, and the ability to link events and/or actions to code behind it quickly. I've seen some good WYSIWYG HTML editors, but none that handle for example custom tags in JSP.


              * Standard navigation/bookmarking scheme


      Well anything can become a standard if you get enough people to adopt it. In any case all you mean is HTTP URLs are standard. So what, they're only useful because there's already so much software out there that understands them.


      People will be shopping on amazon, networking on myspace, bookmarking on del.icio.us, deleting outlook and switching to webmail, getting directions on Google maps, and otherwise making use of the web while you pine away for your IDE and compilers. Sorry the computing world is passing you by.


      Everything you've written above has been done in the mid 90s. Webmail isn't new nor does it require AJAX. Samme with the rest except perhaps google maps you have NEED live updating. Wake up and smell the hype!

      --
      These posts express my own personal views, not those of my employer
    15. Re:Ajax Killed Himself by syousef · · Score: 1

      So you think people like to download and install software, and you think that everything should be written in a verbose language with bloated APIs using cumbersome engineering techniques, and you think that content creation is an afterthought that can be accomplished equally well on any platform.

      So you're saying the only options:
      a) The web + today's latest fad AJAX
      b) Something big and bloated and overengineered?

      That's a narrow view. I thought there were lots of languages, tools, and ways of presenting content, all with their advantages and disadvantages. But I guess I stand corrected.

      Any moron can list 100 flaws with the web, but it takes a genius to come up with something better and get market penetration.>/I>

      Yes sometimes when I use the web it feels like I've been penetrated by the market.

      When something better comes along, I'll be there because I don't have some idealogical ties to the 'one true way' of doing things.

      No you'll be too busy saying the web is good and standard and we don't need anything new. You're discouraging people from using anything other than the web with that post right there.

      Things go in cycles. Web pages will be unpopular at some point. So will thin client. So will design patterns. Everything goes through cycles (it doesn't just evolve).

      --
      These posts express my own personal views, not those of my employer
    16. Re:Ajax Killed Himself by syousef · · Score: 1

      Only if you don't know how to use any frameworks. Writing a web app in raw PHP is like writing a client app drawing directly to the screen and capturing clicks and keystrokes. Of course GUI toolkits are going to be more mature having been a core area of commercial development over the past 25 years while the web has only been heavily prospected for 10.

      Sounds like you're saying web apps aren't ready for prime time on the one hand, and that's why they're slower, but on the other hand they're better so nyer!

      In any case you're seriously confusing tool maturity (and 10 years is plenty of time to mature) with complexity and architecture.

      Client apps are much quicker to build. I've worked on both, and I've used plenty of frameworks for both. If you haven't seen that you're either writing web apps much quicker than anyone else I know, or you've never seen true client RAD at work.

      --
      These posts express my own personal views, not those of my employer
    17. Re:Ajax Killed Himself by laoc00n · · Score: 1

      >> I made no assertion one way or the other about HTML and HTTP being suitable for particular purposes.
      >> Eulogize all you want about the wonders of the Web. It has nothing to do with my point.

      > Okay, well if it had nothing to do with your point then why even mention that HTTP is a 'lobotomized'
      > form of something else?

      Quoting myself: "The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place."

      > Nice ad hominem attack. That really proves your intelligence.

      Gee, I'm sorry. I didn't realize that when you called me a Nazi you meant it in a nice way.

      > Um, in case you didn't read your own comment, you said that the web is procedural because dumb data
      > is passed to 'stateless' objects.

      And your response to this was, "This sentence is complete gibberish. Java is platform independent? Pretty close maybe."

      > I explained that this is nonsense because there's nothing stateless about web applications. Yes, HTTP is
      > stateless. Therefore web applications implement state at a higher level. [etc.]

      Quoting myself (for the third or fourth time now): "The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place."

      > But what you didn't explain is why you need to pass objects to the client? Since everything is happening
      > on the server [. . .]

      You've answered your own question here.

      > The idea that software is not 'real' unless it's a client-server architecture with code being transmitted
      > across the network is extremely narrowminded.

      Show me where I say this. Getting into a discussion with you about what's real and unreal would obviously be very foolish.

      > Honestly, have you ever written a web application? If all your code is object-oriented, how is it that then
      > magically it is lobotomized by a transmission protocol and suddenly procedural. There's plenty wrong
      > with web development, but I'm afraid you're not getting it.

      Again, I believe you've been listening to the voices in your head rather than to me. Can you point out where I say that a transmission protocol makes things procedural? When you say, "you're not getting it," which of us are you speaking to?

      > Your problem is you don't seem to think there is any value to keeping your code on your server [. . .]

      Of course there's value to doing this - if that's what is appropriate for my application.

      > or distributing your application by means of a URL that anyone can type in to instantly access your
      > application

      Where did I say this? Quote me, please.

      > or tight integration with tons of other applications on the same platform.

      Ah, then maybe I don't get it after all. Maybe you could show me the setting that allows me to drag an "object" from my google map onto a message I'm composing in gmail and have the object ask me if I want to include directions from the recipient's house. A theoretical explanation will suffice.

      > Or maybe you just think there is a better way of achieving these benefits. Well call me when the better
      > solution is out there.

      Okay. What's your number? Seriously.

      Look, I'm going to be nice for a moment despite all the names you called me. I am not criticizing people who write Web applications. I am not even criticizing (at least not stongly) the Web as it was originally conceived. I am, instead, saying that Ajax (as a technology, not as a way to make a living) is like trying to paste a Chevy Suburban onto a blender in order to produce a space shuttle. It simply violates common sense. Yes, you can make it do certain things, and I expect we'll probably see a lot more of

    18. Re:Ajax Killed Himself by Jack9 · · Score: 1
      That's funny, because it seems I said a lot while you said nothing other than "I disagree".
      I simply disagreed the first time. You went on and I called you on repetition. Sorry you're butthurt.

       
      In the meantime you can cry sour grapes about how the web is shit, but I'll be out there running my own business and developing applications that people actually use.
      Nowhere did I imply that I don't develop for the web. I specifically mention that I DO (sadly, solely). I won't tout (HTTP) web as a good platform, when my definition of a good platform includes a way to alter every layer...not just the colors of the presentation. My opinion that the web is a technically weak for apps, is a distinction my post makes, from your stated opinion at the time. You seem to have revised it.

       
      Any moron can list 100 flaws with the web, but it takes a genius to come up with something better and get market penetration.

      I believe it took a number of geniouses and a bit of luck to make the web useful and subsequently popular. I don't see how that's relevant to an assessment of merit. We're often put in the position of having to use what's available as a pragmatic measure, regardless of quality, without regard to it's development history. I don't understand the venom, when I'm simply pointing out what you have downplayed, and admittedly agree with. AJAX is another layer on a weak model. yay!

       
      you think that content creation is an afterthought that can be accomplished equally well on any platform
      I don't know where you got a snapshot of my thoughts, but I _do_ think content is independent of platform. My creative department is also independent of platform. I specify a format, they provide the content. Attempt a meaningful arguement or an embarassingly obvious example and I'll respond. I'm willing to be convinced but I don't think it's worth expounding on this.
      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    19. Re:Ajax Killed Himself by laoc00n · · Score: 1


      Thanks.

      It's encouraging to know that there are still some sane people out there.

    20. Re:Ajax Killed Himself by mcrbids · · Score: 1

      Wow. Very sardonic. Point-by-point:

      Take a reliable, stateful transport protocol (TCP) and lobotomize it so that connection state gets thrown away. This is http.

      Hm. A system that reliably transfers files from server X, Y, and Z simultaneously to your computer. Three at once. Reliably. Sounds kinda cool, no?

      Take a platform-independent object technology (Java) and lobotomize it so that dumb xml data structures get passed to "stateless" objects (in other words, procedures), and all processing must happen at one end of the connection. This is Web applications.

      Perhaps you're confusing Java and Javascript?

      Take gui technology and lobotomize it so that screens must refresh one page at a time. This is a browser.

      So, before the browser, what technology was available that:

      1) was cross-platform,
      2) allowed bits of information from all over the world to be rendered togeter,
      3) Included pictures and sound as well as text,
      4) Did all the above cheaply and reliably.

      I don't remember it, either.

      So: having gone from a world of functional, stateful, distributed applications engineered to a true software model, we are now back (despite all the self-congratulatory rhetoric about "objects") to procedural programming and dumb terminals (meaning Web browsers).

      What world are you thinking we came from? I remember when Kermit file transfer was a big advance...

      In other words, 1970s technology with pictures.

      Your car uses a technology that's now provably thousands of years old - the wheel. Do you complain about the age of this technology, or do you simply accept that it works?

      Any half-wit can see that this situation is broken.

      Perhaps only half-wits see it this way. How did you post this article again? Oh, yeah, using 70s technology! But you did it, didn't you? I read it, I responded. Neat, huh?

      How do we fix it? The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place. Brilliant.

      I'm glad you agree. It's not everyday that you end up with an application that:

      1) Works no matter where you are,

      2) Requires no additional install to work,

      3) works with data from servers around the world,

      4) Delivered in real time, on request,

      5) Using stock, commodity hardware and communications technology.

      I agree with your assessment: BRILLIANT!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    21. Re:Ajax Killed Himself by aug24 · · Score: 1

      The sensible programmer will code up some kind of visual cue that a request has been submitted. As data is received back in chunks (You do know asyncronous http gives you partial updates, right?), this can be reflected with an update to that visual cue. You just have to do it yourself rather than use the (single) bar provided by the browser).

      Now, the only thing AJAX brings to the user experience is the ability to allow the user to continue what they are doing (non-user-experience benefits are low data compared to full page refresh, for example, but that's just css/xslt really!). This ability to work on is therefore what must be leveraged in order to make AJAX worthwhile. If you don't leverage that, you don't need an AJAX solution!

      My current application allows the user to move objects around a page (changing table ordering, div object positions etc) while the changes are mirrored back to the session bean on the server and persisted without interrupting them, thus changes can be immediately seen and acted upon by other users without repeated page refreshes. Think Gantt chart style project planning.

      I think your complaint is basically "Wah, I have to handle the progress bar myself!". Not a problem ;-)

      Justin.

      --
      You're only jealous cos the little penguins are talking to me.
    22. Re:Ajax Killed Himself by Ponyegg · · Score: 1

      Booo.... you used the 'leverage' word, go stand in the corner :-) Other than that absolutely, the application you use as an example would be well placed to use the frequent non full page refresh. Right tool for the right job, I just wish we didn't need yet another buzzword to give existing technologies... but then again I guess that's a whole different debate.

    23. Re:Ajax Killed Himself by aug24 · · Score: 1
      Sorry, sorry, I meant utilise. Really.

      J.

      --
      You're only jealous cos the little penguins are talking to me.
    24. Re:Ajax Killed Himself by dasil003 · · Score: 1

      Quoting myself (for the third or fourth time now): "The Ajax answer is to keep all of the lobotomized bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the capabilities that were hacked off in the first place.

      Um, state is kept in sessions through the use of cookies. It has nothing to do with AJAX. Cookies are not perfect (they may be turned off), but they are a far cry from Byzantine.

      You've answered your own question here.

      So what you're trying to say is that server-based applications are garbage? That's not a foregone conclusion. If you need a smart client code a smart client, that doesn't mean there aren't benefits to doing things the other way.

      Can you point out where I say that a transmission protocol makes things procedural?

      I can't point out anywhere where you say how web applications are procedural, I was just trying to guess at your meaning. You just say "dumb xml data structures get passed to "stateless" objects (in other words, procedures)". Only where are the stateless objects? The backend code is all object-oriented and stateful, and the JavaScript code has the current view as its state. Where's the procedural code?

      So you're saying that if all of us clever technology types put our heads together, no one will be able to devise a content scheme that has more capability than HTML while remaining compatible with HTTP?

      Web applications are about the most expensive development effort the world has ever seen. So my answer, with respect to any reasonable alternative, is, "less than the cost of a Web application."


      Of course someone can come up with a better idea. But that's 1% of the problem. Then you have to implement it on every platform and have it shipping with every computer.

      Also where do you get the idea that web applications are so expensive? This is just your impression. The web's limitations may be its downfall when it comes to rich interfaces, but it's a strength when it comes to speedy development and deployment of simple apps.

      On the other hand, I would like you to explain how asserting that something is badly designed constitutes pretention.

      No your disdain due to an assertion that I'm following a herd is pretentious.

      I also never said that Web applications are "a poor copy of traditional client applications.

      Are you for real? Or am I just not allowed to summarize? The whole gist of your arguments was that web applications are a 'lobotimization' of older technologies. I just assumed client applications, but maybe you were referring to something else. Either way, your arguments by themselves are not cohesive, I have to extrapolate somewhat to argue at all.

      And in the midst of your pragmatism, how hard do you work to blind yourself to the debilitating design flaws inherent in the technology that supplies you with a living?

      There's no need to blind myself to any flaws. That those flaws are debihilitating is simply your unsubstantiated opinion. The web grew up organically and so things like AJAX are clearly not ideal, but on the other hand they get the job done. The fact is that most things people want to do on computers do on the Internet do not require complex interfaces. You can point out a million ways web applications could be better, but ultimately they work pretty well and they're pretty easy to develop. You've pointed out several flaws, but you haven't made a case for why they are so debihilitating. Either you are not comfortable with the web app paradigm and the associated tools, or you are only interested in things that the web isn't good at. My point is not that the web is good at everything, but rather its very good at a large number of things that a large number of people are interested in using.

      You came out firing about what garbage web apps were because they were lobotomized versions of pre-existing technology. The web is designed as ligh

    25. Re:Ajax Killed Himself by laoc00n · · Score: 1

      > Wow. Very sardonic. Point-by-point:

      Point by point:

      > Hm. A system that reliably transfers files from server X, Y, and Z simultaneously to your computer.
      > Three at once. Reliably. Sounds kinda cool, no?

      I never said that it wasn't, nor that there were not good reasons for doing things this way at the time.

      >> Take a platform-independent object technology (Java) and lobotomize it so that dumb xml data
      >> structures get passed to "stateless" objects (in other words, procedures), and all processing must
      >> happen at one end of the connection. This is Web applications.

      > Perhaps you're confusing Java and Javascript?

      Perhaps you are. A Web application takes an object-oriented language and forces you to write stateless procedures on the server. It then passes xml data structures to those procedures from the client.

      >> Take gui technology and lobotomize it so that screens must refresh one page at a time. This is a
      >> browser.

      > So, before the browser, what technology was available that:
      >
      > 1) was cross-platform,
      > 2) allowed bits of information from all over the world to be rendered togeter,
      > 3) Included pictures and sound as well as text,
      > 4) Did all the above cheaply and reliably.
      >
      > I don't remember it, either.

      I should hope not, because it didn't exist. Refer to my first comment, above.

      >> So: having gone from a world of functional, stateful, distributed applications engineered to a true
      >> software model, we are now back (despite all the self-congratulatory rhetoric about "objects") to
      >> procedural programming and dumb terminals (meaning Web browsers).

      > What world are you thinking we came from? I remember when Kermit file transfer was a big advance...

      Yes, indeed. These were low-tech applications built from pieces that were suited to the purpose. The original Web, by and large, was also built from suitable components. The problem is that it was too successful. We now have a situation where, in order for any application to gain distribution, it must somehow run in a browser - an object whose original function was simply to display content. What if gopher had been the successful application? Would it make any sense to continually paste more and more pieces onto gopher clients while claiming that it's the One True Way to write networked applications? Or would it make more sense to concede that the model had grown by aggregation, and perhaps it was time to consider other approaches?

      >> In other words, 1970s technology with pictures.

      > Your car uses a technology that's now provably thousands of years old - the wheel. Do you complain
      > about the age of this technology, or do you simply accept that it works?

      It's fairly clear that my comment was about function, not age. Web applications lack true interactivity (among many other things), and are, metaphorically, similar to the 1970s model of mainframe computing.

      >> Any half-wit can see that this situation is broken.

      > Perhaps only half-wits see it this way. How did you post this article again? Oh, yeah, using 70s
      > technology! But you did it, didn't you? I read it, I responded. Neat, huh?

      Not very. Message servers have existed for decades.

      > It's not everyday that you end up with an application that:
      >
      > 1) Works no matter where you are,
      >
      > 2) Requires no additional install to work,
      >
      > 3) works with data from servers around the world,
      >
      > 4) Delivered in real time, on request,
      >
      > 5) Using stock, commodity hardware and communications technology.

      These comments are about the Web, and as I've said already, I never disputed any of it. If, on the other hand, we're talking about Ajax proper (the subject of my posting), we could add:

      6) is hideously complex to implement, to the point where most developme

    26. Re:Ajax Killed Himself by laoc00n · · Score: 1

      >> Quoting myself (for the third or fourth time now): "The Ajax answer is to keep all of the lobotomized
      >> bits and build increasingly Byzantine layers on top of the existing mess in order to re-introduce the
      >> capabilities that were hacked off in the first place.

      > Um, state is kept in sessions through the use of cookies. It has nothing to do with AJAX. Cookies are not
      > perfect (they may be turned off), but they are a far cry from Byzantine.

      I'm sorry, I don't see anything about "state" in here, and I don't see where I said that cookies are Byzantine.

      > So what you're trying to say is that server-based applications are garbage? That's not a foregone
      > conclusion. If you need a smart client code a smart client, that doesn't mean there aren't benefits to
      > doing things the other way.

      Of course I'm not saying that server applications are garbage. I'm saying that application programmers should have choice.

      > I can't point out anywhere where you say how web applications are procedural, I was just trying to guess
      > at your meaning. You just say "dumb xml data structures get passed to "stateless" objects (in other
      > words, procedures)". Only where are the stateless objects? The backend code is all object-oriented and
      > stateful, and the JavaScript code has the current view as its state. Where's the procedural code?

      There is no context between the client and server, unless (as you point out) it's stored in cookies and session objects. We have therefore sacrificed the inherent statefulness of the underlying technologies (TCP and OO programming) and created additional mechanisms to make up for the loss.

      >> So you're saying that if all of us clever technology types put our heads together, no one will be able to
      >> devise a content scheme that has more capability than HTML while remaining compatible with HTTP?

      >> Web applications are about the most expensive development effort the world has ever seen. So my
      >> answer, with respect to any reasonable alternative, is, "less than the cost of a Web application."

      > Of course someone can come up with a better idea. But that's 1% of the problem. Then you have to
      > implement it on every platform and have it shipping with every computer.

      I never said (or implied) anything about any of this.

      > Also where do you get the idea that web applications are so expensive? This is just your impression.

      No, it's a fact. And it's very easy to see why: standards that are implemented differently in every browser and back-end, lack of interoperability (for example, take an arbitrary company X and try to plug its SOAP client into company Y's server), and absurd proliferation of technologies for achieving even simple tasks.

      > The web's limitations may be its downfall when it comes to rich interfaces, but it's a strength when it
      > comes to speedy development and deployment of simple apps.

      This, again, was not my point, but I'm in partial agreement with what you say. Web applications are easy if they're *very* simple.

      >> On the other hand, I would like you to explain how asserting that something is badly designed
      >> constitutes pretention.

      > No your disdain due to an assertion that I'm following a herd is pretentious.

      It might have been if I'd said it. Saying that I'm bothered by herd behaviour is not the same as saying that you are following a herd.

      >> I also never said that Web applications are "a poor copy of traditional client applications.

      > Are you for real? Or am I just not allowed to summarize? The whole gist of your arguments was that web
      > applications are a 'lobotimization' of older technologies. I just assumed client applications, but maybe
      > you were referring to something else. Either way, your arguments by themselves are not cohesive, I have
      > to extrapolate somewhat to argue at all.

      You d

  49. < /i > by 0kComputer · · Score: 1

    did it work?

    --
    Top 10 Reasons To Procrastinate
    10.
  50. for the noob... by cyberbob2010 · · Score: 1

    (and I am almost afraid to ask this) ...what is...what is Ajax?

    --
    We seldom regret saying too little but often regret saying too much.
    1. Re:for the noob... by Anonymous Coward · · Score: 0

      Ajax

      Wikipedia is your friend.

  51. Re:Feyenoord Ajax by from+mars · · Score: 0

    Can You Imagine a Beowulf Cluster of These? Err... no wait...

  52. A plesant Ajax-style diversion by int19h · · Score: 1

    From the webpage:
    Welcome to
    Ajax in Action
    This is a pleasant Ajax-style diversion from the main web page for our book. We hope that you enjoy it.

    [...]

    For those who didn't notice, this was all written in a horribly obtrusive pop-up, that greedily filled up all my precious screen-estate, just after moving the mouse cursor over a small image. How on earth can we trust these people with reviewing AJAX for us? I know I can't.

    On the serious side, AJAX seems to have the potential to bring lightweight[1] applications straight to your browser, with all the advantages and disadvantages that follows.

    [1] (with the option of having heavyweight applications behind the lightweight curtain, of course)

    It's difficult to make predictions, especially about the future, but I'll try anyways:
    We have dynamic times ahead when it comes to web-applications, and I'm sure we haven't seen the last of AJAX.

  53. This breaking news just in: Franco is still dead! by uxo · · Score: 2, Funny
    "The majority of the book is for programmers engaged in the development of web applications..."

    Well, yeah, because if your application doesn't involve a web browser then AJAX will be about as useful as a screendoor on a submarine.
  54. Good Scheme so far by Anonymous Coward · · Score: 0

    "You're using cold fusion as middleware- I'd suggest that this is a fine strategy for a one or two developer site, but that you may wish to look to a more maintainable / suitable language for middle tier development- but that's just my $.02."

    Like Scheme for example.

  55. But can it fix HTML? by Anonymous Coward · · Score: 0

    let's try a /i tag

  56. Is AJAX secure (https)? by MexicanMenace · · Score: 1

    Thanks for the links. I was just working on a small app that snowballed into a large app and allowing object associations via the UI (form submit) without refreshing was the next thing I hoped to add.

    Now, I thought I'd read somewhere that this reqest only occurs under http, not https. So that even if the page itself is https, the info travels to and from the client via http, thus unsecured. Is that the case or is it possible to use AJAX securely?

    1. Re:Is AJAX secure (https)? by Heembo · · Score: 3, Informative

      I forced the URL to HTTPS and it worked just fine. The browsers already support HTTPS and that translates directly to JavaScript.

      I make sure the initial page it HTTPS to start with. I do not know how to have a HTTP page, and a HTTPS Javascript transaction.

      Here is another link that talks about the same issue. http://www.experts-exchange.com/Web/Web_Languages/ JavaScript/Q_21636735.html

      PS: GREAT QUESTION! VIVA SECURE SOLUTIONS! :)

      --
      Horns are really just a broken halo.
    2. Re:Is AJAX secure (https)? by Baricom · · Score: 1

      I do not know how to have a HTTP page, and a HTTPS Javascript transaction.

      This is just a wild, totally unconfirmed guess, but it might be JavaScript security blocking the call because it's going to a different server. I believe http://www.foobar.com/ and https://www.foobar.com/ are as different as http://www.google.com/ and http://www.msn.com/ as far as JavaScript is concerned.

    3. Re:Is AJAX secure (https)? by Heembo · · Score: 1

      Ah, but if the referencing page is HTTPS, Javascript will continue to use HTTPS. The need to have a HTTP page, and a HTTPS Javascript transaction is one I have not seen yet - I just make the page HTTPS! :)

      --
      Horns are really just a broken halo.
  57. Sometimes /. is like the PETA of lost causes by WrongByDefinition · · Score: 1

    Just because something is innovative, it doesn't necessarily follow that it is in fact progressive. It's as sad as getting a black-and-white plasma TV and thinking you've got game.

    AJAX is just a collection of workarounds in a fancy box. Sure, it might be good for tiny apps where you want to spare your users a few page refreshes, but unless your company name ends in *oogle or *ahoo, you'll be hard pressed finding the resources to design/develop/cross-browser-debug/maintain anything complex. It has no dedicated IDE, no modern component set, no state management (iframes == workaround), no rich media tools, no cross-browser compatibility...and that's just off the top of my head.

    But hey, I love that AJAX exists, and I think everybody should use AJAX!

    After all, the more anachronistic web developers who use AJAX, the fewer who will use Flex, meaning there will be that many fewer *truely* bleeding edge web applications to compete with.

    All I can say is 'fight the power, you anti-proprietary, anti-flash /.ers' and leave the RIA work to us misdirected Flex developers!

    --------

    Cynicism is just arrogance wrapped in distain.

  58. web applications by opencity · · Score: 1

    I under stand this is flamebait but ...

    Javascripts' endless browser issues have left me with too many scars. I can avoid this trauma, eliminate XML bloat (or not, as I choose) and write fully functional web aps in ... Flash (!?!). Sticking to Flash 5 I reach most of the nets browsers no problem. For standalone and custom I force the client to install the latest plugin and I can use all my (admittedly hacky but that's my problem) functions. I can even make a really annoying intro with loud bad music and no 'skip' button. (let's see AJAX do THAT)

    As this is slashdot, we may soon approach Goldwin's Law. Gentlemen, start your flamethrowers ...

    --
    Physics is like sex: sure, it may give some practical results, but that's not why we do it.
  59. Nice but heavy by kyndig · · Score: 1

    Ajax is a nice approach at web development; but developers are losing sight of the heaviness that comes with the extra features. While I find the features of drag-n-drop, dynamic tree menus, sliding menus, and interactive one-time-load pages to be nice, it does not justify the additional load time required to include these features.

    How longs does it take to load the web page. That should still be amongst the foremost concern to the webmaster. When you use AJAX (javascript/xml/css) your browser must still download the content. Even content that is not currently in use is downloaded and only used upon demand. How then does this minimise the total size of the page? It doesn't. A user will wait about 3 seconds for a page to load at max. Once you begin getting past that point for the page-load time, you are risking losing that visitors interest. AJAX is a good approach for dedicated traffic use. Examples being: allowing a user to dynamically design their profile page with drag-n-drop features, permitting a logged in visitor to manage their blog entries through drag-n-drop and dynamic category creation with real-time folder image representation, and other such user-specific features. These features are handy and a visitor is seeking the interaction that allows for a little extra page-load time. But to require all users to wait for your AJAX aproach to load an interactive calendar that half your traffic will not use is bloat.

    Take it from top websites which understand this. Yahoo! is a prime example. Visit their page and browse around. Do you see DHTML/AJAX heavy feature-bloating? Not at all, instead you see simple CSS, minimum graphics and fast page loads. The only location you do see those heavy features is in user-specific areas.

    This aproach though has been around for several years that I am aware.

    --
    My Thoughts, Kyndig
    1. Re:Nice but heavy by Anonymous Coward · · Score: 0

      Load time is important, but if you're designing an application, the purpose isn't the same as a web page. I'm currently designing an AJAX application for a Publishing company and the idea is that they can actually accomplish work in their browsers in a more natural way than the "fill in the form/hit the submit button" web page paradigm.

      Users are accostomed to waiting more than 3 seconds for an application to launch and once they get used to the concept of an application in their browser, I don't think load time will be that much of a problem. (Unless of course the developer is trying to write an office suite in Javascript : )

  60. HAHA's not flamebait by handslikesnakes · · Score: 1

    There actually is a technology called HAHA. I'd link to it, but unfortunately it's a rather difficult acronym to search for. Basically the idea is to use XmlHttpRequest to get HTML and dump it straight on the page (rather than processing XML or JSON with Javascript to get the final HTML). I think the idea (of calling it HAHA) originated with one of the microformats guys.

    Personally I think the idea (of getting HTML from the server) is too bloody obvious to need an acronym, but what do I know?

    1. Re:HAHA's not flamebait by hedge_death_shootout · · Score: 1

      All I can say is there must be some highly sensitive AJAXers out there if my fairly lame joke came out as flamebait!

    2. Re:HAHA's not flamebait by Anonymous Coward · · Score: 0

      It works pretty good for me. :-)
      I don't have to do lame-ass work-arounds for bizarre browsers, it simply works for everyone.

  61. You don't know (A)JAX sh*t. by dbdweeb · · Score: 2, Interesting

    How many replied without even reading the book? I started it a month ago with the pre-release PDF made available before the book was published. (This book was the number 1 seller on Amazon just last week.)

    My complaint is that the book is LONG on theory and SHORT on small, reproduceable code snippets. It's not until chapter 9 that you get into meaningful code and most of that is dependent on technologies you may not care about like SquealServer and VisualBasic. The last thing I want to have to do is install half a dozen things in order to get some sample code going. It seems the book is not so much about AJAX as it about "The software development process." It drones on about design patterns and MVC. The book is also very verbose saying in 100 words what could be said in 10. Good software engineering discipline is needed of course (especially with Javascript), but this book beats it to death where it should just relate it to AJAX and move on.

    All the excitement about AJAX is warranted considering the stupidity of webapp development heretofore. It's really dumb to have to regenerate an entire web page when you just want to return some additional data or reflect a state change. How many production, revenue generating web pages have I seen where the mere click of an HTML select input causes the entire page to be redisplayed? Zillions. This stupidity is overcome by asynchronous part of AJAX. Do you know asynchronous JAX shit? That's the salient improvement over mere DHTML. There's a ton of websites desperately needing richer UI's and people who know asynchronous JAX shit will be in demand.

    1. Re:You don't know (A)JAX sh*t. by aztechClanIII · · Score: 0

      don't take it personally, most of these guys are still thinking they're gonna MetaRefresh their tables and use JS for mouseOver on links

      ajax plus caching is the bomb, now if only we all had time to program up those objects in Javascript. Well I don't, so I'm waiting for this : http://www.morfik.com/

  62. OMFG Client Server Apps by Bobbysmith007 · · Score: 2, Insightful

    AJAX... Woo!! After 20 years of toil and effort we have managed to recreate the Client Server application model that held us strong all through the days before the PC. Cool. I love the hype around the reinvention of 30 year old tech, on a new platform

  63. Re:Feyenoord Ajax by laurens · · Score: 1

    Funny, that.

    Standen Eredividie.

  64. ajax ajax ajax..... by shrewd · · Score: 2, Funny

    it's all i'm hearing about lately... here in Australia (i don't know about ca us or uk) ajax is a cleaning product with some sort of grit in it to make cleaning easier.... i'm having trouble disassociating the word with this powerful cleaning agent....

    1. Re:ajax ajax ajax..... by Anonymous Coward · · Score: 0

      it's the same here in america...

  65. Buy it here by Anonymous Coward · · Score: 0

    Save yourself some money by buying the book here: Ajax in Action. And if you use the "secret" A9.com discount, you can save an extra 1.57%!

  66. About your proposed revolution by guet · · Score: 1

    We'd all love to see the plans.

    1. Re:About your proposed revolution by laoc00n · · Score: 1

      It seems you already have religion, so why do you want a revolution? Or maybe you were reading the wrong posting because mine only implied a wish: that "technology" people stop acting like herd animals and actually fulfill their reputation as independent thinkers. Or is that hype too?

    2. Re:About your proposed revolution by guet · · Score: 1

      It seems you already have religion, so why do you want a revolution? Or maybe you were reading the wrong posting because mine only implied a wish: that "technology" people stop acting like herd animals and actually fulfill their reputation as independent thinkers. Or is that hype too?

      Independent thinking is actually pretty easy and really quite commonplace, in fact I believe every teenager ever born has indulged in some of that; it's persuading other people to adopt your ideas and making them work that's hard. Hence the reference to Revolutions, which usually seem like a better idea before them than they do after.

      As to hype and religion, I'm not interested in either : ) If you're going to complain about the slow progress made in Web apps, and the limited utility of AJAX at least come up with an alternative.

    3. Re:About your proposed revolution by laoc00n · · Score: 1

      Independent thinking is not at all easy. I have never known a teenager to do it; on the contrary, teenagers are among the strictest conformers on earth.

      Is your point that revolutions are hard, therefore everyone should just conform?

      But if you were really making an honest request to see an alternative to Ajax, then fair enough. The fact is that there are many alternatives (once you start considering the problem from its root). If you would like to see one that *really* works, I'd be glad to show you. Unfortunately, I'm not willing to discuss it in this forum.

      There's a contact link on my company's Web site: www.ektasis.com. If you send an e-mail through the link, I'll be glad to invite you over for some show and tell.

  67. Ajax books come to the masses by Anonymous Coward · · Score: 0

    Great to see Ajax in Action out there. It is a nice size volume, and talks about important ideas in Ajax.

    There are other books out too, such as Foundations of Ajax, and the new Pragmatic Ajax (http://pragprog.com/titles/ajax) done by the Ajaxian guys (http://ajaxian.com/)

  68. Ajax in action? here! :) by zeank · · Score: 0

    http://jwchat.org/ (what the ... is meebo?)

  69. Possibly not the best choice, currently by thpdg · · Score: 1

    It's funny this review should come up, as I thumbed through this book in BN last night. It took me a minute to find it, because it's on sale for 20% off, and was on a special display.
    However, after looking through it, and comparing it to the only other available title, I went with the other book. That book is Foundations of Ajax from APress by Ryan Asleson and Nathaniel T. Schutta. That book is only about half the size for the same money, but seemed to have a bit more to it. Rather than covering so much theory about why you'd want Ajax and how an Ajax system might work, Foundations of Ajax actually gets to the point and shows some real and made up examples. Although no CD of source was included, the examples are available from the APress website. Most were so basic, they could be easily implemented in any existing project as a test, or for permanent use.
    I haven't finished it, so I can't give a full review, but I recommend giving it a closer look before deciding to purchase either!

    --

    -Patrick

    "They never stop thinking about new ways to harm our country and our people, and neither do we."

  70. this book is unnecessary by illuminatedwax · · Score: 2

    You want to learn the secret of AJAX? Here's everything you'll need to know without buying some technology-of-the-month (year?) book:

    THE XMLHTTPRequest FUNCTION IN JAVASCRIPT DOWNLOADS SHIT

    The rest should be obvious if you are a competent programmer.

    --
    Did you ever notice that *nix doesn't even cover Linux?
    1. Re:this book is unnecessary by Anonymous Coward · · Score: 0

      so you must be the guy who started writing AJAX then? After all, it's OBVIOUS...

    2. Re:this book is unnecessary by illuminatedwax · · Score: 1

      It is obvious once you know that the XMLHttpRequest command even exists - but knowing it exists is the hard part - it was added as an afterthought and it doesn't help that Javascript has absolute shit for documentation.

      --
      Did you ever notice that *nix doesn't even cover Linux?
  71. Buzzwords, the Red Pill, and Web Development by SigmoidCurve · · Score: 1
    I was leafing through this book at B&N the other day and was intrigued, but in the end I was too "embarrassed" to buy it. AJAX is the bandwagon of the moment and so, any and all technical merits aside, it's too hard to get involved now just on the basis of a couple of very successful prototypes (Microsoft OWA, Google Maps).

    Prepare yourselves because within 12 months you will see that for every well-executed, appropriately-applied, ground-breaking AJAX design, there will be a hundred haphazard, broken, ill-conceived sites using AJAX on principle, at the directive of clueless PHBs and excited marketing departments.

    Ultimately it does seem quite inevitable that AJAX-style development will forever change the web development landscape, for the better: there are real advantages with enough technical merit to overcome the status of being a fad. Still, I'd like to see some serious evolution of the toolsets available - not merely third party APIs, but full-fledged development environments to get away from the tired old dog that is JavaScript.

    I must echo many comments I've seen here and elsewhere by interested programmers who, but for the sake of having to code in JavaScript, would otherwise readily embrace this new paradigm (ok let's just call it a trend for now). JavaScript is about the worst language imaginable for serious development. Sure it's great for image rollovers, form validation, and intermittently grabbing an XML file from the server. But what AJAX is asking us to do is to turn these loose collections of one-off functions into a true, genuine application. Pardon me for being a little concerned about that prospect.

    Now if browser makers would just supply a Python interpreter to run client-side code, not only would I buy the book and the T-shirt, I'd swallow the pill, drink the cool-ade, and get "AJAX" tatooed on my forehead.

    czep

    --
    Dictionaries are for loosers.
  72. OMFG LINUX! by Anonymous Coward · · Score: 0

    "Cool. I love the hype around the reinvention of 30 year old tech, on a new platform"

    Have you heard about Linux yet?

  73. We Need APAX by SigmoidCurve · · Score: 1
    What we really need is "Asynchronous Python and XML".


    Down with JavaScript!

    --
    Dictionaries are for loosers.
  74. AJAX N00b Q by fatmal · · Score: 1

    This is off topic, but I figured that there would be few AJAX-experienced people reading this. I have a question regarding AJAX that I haven't been able to find a definitive answer for. Is it possible to refresh page elements (in an iframe?) from a server-side script or even database trigger? As an example, if the database receives a new uploaded document which matches an end-users pre-defined search criteria, can this document (or at least a notification) be 'pushed' to that user without any action on their part (refresh etc)?

    1. Re:AJAX N00b Q by aztechClanIII · · Score: 0

      they were talkin about this in an earlier thread, but it was annoyingly misled. basically, the short answer is no. The long answer is that nothing does a true PUSH, not even your blackberry most likely!! ;) That being said, if you make your requests more lightweight (for example, not refreshing the whole page and using caching techniques), then you could likely emulate a push well enough to suit your needs in AJAX.

    2. Re:AJAX N00b Q by rednuhter · · Score: 1

      use JavaScript to poll the server, when you get the response that a new page is available use standard Javscript to update the Iframe.

      --
      ERR 411[Max number of witty sigs reached]
  75. Push... by Symbha · · Score: 1

    Show me a push technology, and I'll show you a pull technology in disguise. There is no 'real' push in the web. It's either an open connection, or a pull.

  76. Hyped Buzzwords, Marketing Ploys, Lame Salesmen by v3xt0r · · Score: 0

    "This time the buzzword is Ajax and it's moving so fast that you can almost hear the sonic boom."

    uhh, I don't hear any sonic booms... it sounds more like a bunch of IT Marketing kacks' heads exploding from trying to grasp what they are now trying to sell.

    AJAX is a buzzword. You can update content in your browser without refreshing your page (woo hoo). You can ruin your site by using these techniques in areas that it should not be used (yay). You can decrease your search engine exposure by polluting your front-end web pages with these techniques (that's right baby!).

    Great Stuff!

    Anyone who buys a book about AJAX is a brainless tool!

    --
    the only permanence in existence, is the impermanence of existence.
  77. Concerns regarding AJAX by mw13068 · · Score: 1

    I've seen a demonstration of AJAX at a conference, and it has some interesting features, but my concerns about it are:

    1. I hate JavaScript.
    2. I'm not sure how accessible applications built with it are. Meaning that if someone is blind and using a screen reader, or even someone with a non-standard browser, is trying to use the application, will they be able to?

    Anyone with experience with AJAX and accessibility please comment.

    1. Re:Concerns regarding AJAX by Pestilence · · Score: 0

      There are already quite a few sources of information on degrading an Ajax application gracefully for weird browsers. There's no reason those techniques can't be used to give an ajax application the same accessibility as a 'normal' site, but it would have to be written for it. Here's a link to a good article on the subject:

      http://particletree.com/features/the-hows-and-whys -of-degradable-ajax/

  78. A"HAX" by XBL · · Score: 2, Funny

    AJaX (Asychronous JavaScript for XML) is a Microsoft-originated hack to basically hang open a HTTP connection that receives events containing XML. It is a hack MS invented for web-based Outlook. Unfortunately it is now the hot new thing.

    It takes very smart people at MS, Yahoo, Google, etc to make complex AJaX applications actually work well. It takes only a kiddie to get simple AJaX to work. The middle ground where there are mediocre programmers/web developers building medium-sized AJaX applications is where this will all fail in the end. The only saving grace would be some very smart and solid libraries built into web-apps, but I still have my doubts over the long term.

    Mozilla and Apple worked together to create a element for doing bitmap drawing into web pages. I would suggest that they work together again to create something far beyond what AJaX can do. I am talking about something on the scale of melding Jabber IM, HTTP server (Apache of course), and the web browser together into a smart, extendable, standardized (Jabber is IETF), and revolutionary framework. Apple even supports Jabber already in their OS X Server and clients so they believe in half of the technology that I am proposing already.

    For example, imagine if you logged into Slashdot and the account behind it all was Jabber. The resource would be the web session. You can go across pages and it doesn't matter on what "page" an open socket is created because it's existing at a lower level. Events are sent back to the browser and the browser determines from the XML on what to do with the data. It could update a section of the page to post a new story, a new comment could be added dynamically, a sidebar could be updated, etc. Your account could also integrate with Jabber clients so Slashdot users can IM each other via the same account, just a different resource. That is only a small, simple example of what would be possible.

    Yet, 90% of browsers are still IE. However, don't killer apps fix problems such as this? I believe the web browser + Jabber could be a killer app.

    P.S. It's time for HTML to be upgraded or replaced to make rich web interfaces easier and accessible. How about XUL? About about WhatWG? These things would make our life much easier as developers and users. JavaScript too, needs a kick in the butt. It's time to make some awesome web sites that say "This website requires something other than IE. Here are your options..." Make the tide turn.

    P.P.S. To accomplish the above goals, we may need to think beyond what we know as a website with web pages. Maybe something better thought of as a "web experience".

    Eric

  79. AJAX.. poorly named by josepha48 · · Score: 1
    I think AJAX has been poorly named. It implies asynchronous, but synchronous is also possible to do. So shouldn't it have been called ASJAX? Or pronounced AssJax?

    I've started adding this stuff into parts of my web app. Why? Because it was a good way to update part of a dropdown menu. Imagine going to a site where you have 4 or 5 dropdown menues. Each menu is dependant on the selection of the previous one. Well that's what I have done, without the full page refresh.

    Which brings us to the real benifit of AJAX. The fact that you do not have to refresh the whole page to update part of the page. I have actually been told by several web surfers, that when a FULL page refresh occurs they get confused as to where they were. Mostly because they have a slow connection and notice it alot. Using AJAX one can refresh this part of a page without a full page reload.

    The other advantage is bandwidth savings. Instead of having to send ALL the page data, you only need to send part of the page data. The part that needs to change. This saves web server load as well as browser and network traffic.

    I like the technology, lets hope it does not get sucked into a patent dispute and screw up the acceptance in apps.

    --

    Only 'flamers' flame!
    Does slashdot hate my posts?

    1. Re:AJAX.. poorly named by rednuhter · · Score: 1

      One of the big problems with AJAX is surfers will not know that content is being refreshed.
      If I visit a slow non-AJAX web page and click a button I can see that the request has been sent for the page and often something will come back pretty soon, like the page title to let me know that the server is producing the content (hopefuly) followed by the new page content.
      If a non-AJAX web page fails i.e. a server timeout or internal error then I get an error.
      With AJAX the programmer is going to have to impliment a BUSY and ERROR GUI interface for ever app and every surcumstance, and my guess is most will be to lazy to do so.
      Bye bye user experience unless you run big ass servers with loads of developers /support like maps.google.com

      --
      ERR 411[Max number of witty sigs reached]
    2. Re:AJAX.. poorly named by josepha48 · · Score: 1
      First off it will depend on what you use ajax for. Its not going to be for everything, but it certainly has its place in the web. First off you can as a web designer require a fast internet connection. I certainly require this for my web app.

      Second, within AJAX, you have access to the status code that is returned by the server. So you can do a if you are like me you would create 2 javascript functions that take the URL and the data and then either do a POST or a GET. Within these functions you create the object ( another function optional ) and then you check the status code and perform the necessary steps. If it is coded right you do not have to recode this each time you need to use it.

      The point is that developers should be focusing on reusable code, and with that in mind this stuff gets built into the components. If developers do bad coding with AJAX, they are going to do bad coding with whatever tech is out there anyway.

      --

      Only 'flamers' flame!
      Does slashdot hate my posts?

  80. i? by gomel · · Score: 1

    i?

    --
    Fight Frist Psoting!
    Browse Slashdot with 'Newest First'!
  81. Write As If JavaScript Were Never Invented by Anonymous Coward · · Score: 0
    Best practice with Javascript is to develop a site that doesn't use Javascript, and then add the Javascript in such a way as to be backwards compatible. AJAX, being a form of Javascript, is exactly like this.

    So now you're writing browser-dependent code, an utter waste of time. The next browser bug in IE will crack open any security you have[Microsoft will make sure of that]. Browser upgrades kill your site.

    Best lose the JavaScript. Then you can write once and it runs forever.

    This is even more true now that Microsoft has decided AJAX is theirs.

  82. Ajax is Rocket Science (according to Microsoft) by MarkMac · · Score: 1

    If it is so "simple", why did Microsoft call it "Rocket Science" :-)

    http://www.governmententerprise.com/news/showArtic le.jhtml?articleId=174400424

    "... the most important part of our strategy with Atlas is to the take the rocket science out of Ajax and make it easier for our customers to create more compelling experiences on the Web."

    If it isn't Rocket Science, does that mean Microsoft thinks its developers are simpletons?

    1. Re:Ajax is Rocket Science (according to Microsoft) by houseofzeus · · Score: 1

      That comment doesn't indicate that they think their developers are simpletons. It indicates they think their customers are.

    2. Re:Ajax is Rocket Science (according to Microsoft) by Anonymous Coward · · Score: 0

      Nothing we haven't heard in the parent comment before. This is just the Web 2.0 version of "I understand technology X so why would I need to learn how to use it better?"

  83. Well...... by gbutler69 · · Score: 0

    I created a little Java applet that is called from JavaScript....this little applet does nothing than act as a Socket Proxy (both UDP and TCP) for "Push" type of interaction....it is *very* small and add very little to the overall bandwidth...also, once downloaded is cached and used by all my AJAXey applications without a problem....works rather nicely....has allowed me to access data through a legacy, developed in-house message passing system based on UDP that obtains data from Mainframes via COBOL and crud like that.....

    --
    Over-the-top Response Guy! Giving "Over-the-Top Responses" since 1970.
  84. In a word, yes by Anonymous Coward · · Score: 0

    I'm a former dickhead who moved up to full-fledged asswipe. Anyway, good to see you used the word 'paradigm'. Shades of 1999.

  85. It's nothing new, really... by Anonymous Coward · · Score: 0

    I work for the large online division of a famous global broadcaster...

    The people who are refusing to give any budget to rework our core templates to make them web standards compliant... are the same people who suddenly keep using the phrases "Web 2.0" and "AJAX" in every meeting.

    Any developer worth their salt has known about this kind of hack* for a long time. We're pleased we can finally deliver it AND be able to point at our browser support matrix and show most people will get the benefit. But only IF it is actually a beneficial piece of tech to employ on a specific project.

    The only people getting excited are trouser-wearing geeks** - and those foolish enough to listen.

    * It is a hack. The whole Web 2.0 concept is a hack. XHTML is not designed to deliver GUIs. It's designed to deliver documents. Sure you can do some cool stuff. But it's still a shonky big hack. People seem to think because we can ditch for layout that everything else is fine and dandy.

    ** They say they're geeks, but they also always wear the latest branded clothing and when questioned firmly appear to know very little about technology. But they're Geeks(tm) man - at least, that's what the Execs think. Five years ago the fuckers would have been in Marketing.

  86. Private Variables in Javascript ARE dead simple... by gbutler69 · · Score: 1, Interesting

    Here's how I create classed in JavaScript....(using the power of closures)

    var create_class = function() {

       /* Private Methods */
       var methods = {
          method1 : function( self, pp, p ) {
             /* Self = This */
             self.prop1 = p;
             /* pp is the Private Properties */
             pp.pp1 = p;
          },
          method2 : function( self, pp, p ) {
             alert( pp.prop1 );
          }
       }

       var constructor = function ( parms ) {
          /* Private Properties */
          var pp = {
             pp1 : null,
             pp2 : null,
             pp3 : null
          }
          /* Inherit */
          this.uber = my.parent.constructor;
          this.uber( parms );
          delete this.uber;
          /* Public Methods */
          this.method1 = function( p ) { return methods.method1( this, pp, p ); };
          this.method2 = function( p ) { return methods.method2( this, pp, p ); };
          /* Public Properties */
          this.prop1 = null;
          this.prop2 = null;
       }
       return constructor;
    }
    var myClassConstructor = create_class();
    delete create_class;

    var instanceOfMyClass = new myClassConstructor( { p1 : val1, p2 : val2, p3 : val3 } );

    instanceOfMyClass.method1( "Hello World" );

    alert( instanceOfMyClass.prop1 ); // Displays Alert with "Hello World"

    instanceOfMyClass.method2(); // Displays Same thing

    --
    Over-the-top Response Guy! Giving "Over-the-Top Responses" since 1970.
  87. Amusing, but mostly wrong. by Stu+Charlton · · Score: 1

    The situation is broken? Not at all. It's just that people can't apply their shiny dream paradigm (whether the Windows/Mac GUI, or objects, or whatever) to the distributed / networked world. Most of your points are, at best, half-truths.

    The fundamental reasons for all of these quirks come down to two observations: concurrency is hard to get right & distribution is hard to get right.

    1. HTTP doesn't throw away connection state and hasn't for 6+ years since HTTP 1.1 KeepAlives & pipelining

    2. "objects" still matter. But they were designed for single user systems. Multi user systems imply concurrency. That changes things. Object oriented people wanted their hammer to make everything look like a nail -- well sorry, it doesn't work that way. Yes, OO is still useful, just in certain contexts (like, a request or session scope).

    3. Stateful v. stateless objects are somewhat of a red herring. it's really always been about shared vs. local data. shared data can be a concurrency bottleneck. If you want shared data objects, that's what an RDBMS or ODBMS is for.

    4. GUI's were not designed with the network in mind. The first client/server GUIs that did deal with a network tended to suck, as they didn't make it clear to the user what a request and a response was. So you'd get bizarre brain freezes, lags, cryptic errors, etc. The browser sucks less because it makes the network apparent to the user.

    Transparency can be a useful goal, but it doesn't work with distributed systems. Distribution is fundamentally different from local computing, and should be treated as such. Abstractions yes, transparency no.

    --
    -Stu
    1. Re:Amusing, but mostly wrong. by laoc00n · · Score: 1


      1) The fact that you can keep a connection open and send multiple requests in one message does not make HTTP stateful. In any case, it's fairly obvious that I was making general observations about the evolution of Web technology, not inviting arguments about trivia.

      2) I very clearly made no attempt to defend object-oriented technology, and the issue of concurrency has nothing to do with why Ajax is badly designed.

      3) I made no assertion about how data should be shared, though your implication that RDBMS can solve all data-sharing problems is rather strange.

      4) I made no attempt to defend GUIs, most of which suck.

    2. Re:Amusing, but mostly wrong. by dasil003 · · Score: 1

      I'm sorry, but you need to step up and defend your own points. 80% of your responses are "I never said that or that or that". Just because he did not literally quote you does not mean you did not imply all those things.

    3. Re:Amusing, but mostly wrong. by laoc00n · · Score: 1

      I do not have to defend any remark that I never made.

      If you think that I implied something, then you'll have to tell me what it is.

  88. simple reason by Stu+Charlton · · Score: 1

    Ports have very little information about the intent of a request. It's just a number, and there only are so many available for TCP/IP. A URI, on the other hand, is much more descriptive. By relying on higher level protocols such as HTTP, you have a lot of metadata about the request and the ultimate target resource. This can then lead to finer grained audit and access control.

    --
    -Stu
  89. AJAX vs. Java Applet ?? by harmic · · Score: 1

    Seems to me, this was the concept of a Java applet as well: write a mini-application that can be launched from a web browser, giving all the advantages of distributed client server type processing without the headache of application installation on every machine. Of course a well written java application would make use of threading to fetch data in the background as well.

    What are the pros and cons of each approach?

    • Java is already compiled (albeit into something that has to be interpreted or JIT compiled) and should run faster
    • Java requires a JRE to be started: this eats memory and takes time. OTOH Javascript is usually built in to the browser, but it does have to parse the script as it goes.
    • Java has an enourmous base API, plus you can find millions of libraries for various functions. I hazard a guess that is not as true for JS (but I am no expert).

    Am I wrong - is AJAX something really new? Or is it just substituting Javascript for Java, and manipulating the DOM rather than constructing your interface with Swing components? (Both AJAX & Java can use XML as a data interchange format).

    1. Re:AJAX vs. Java Applet ?? by Steven574 · · Score: 1

      Absolutely right. This is what came to my mind when I first got wind of AJAX.

      It seems to me that the whole layered abstractions that go into a 'well designed' app has jumped up a tier with AJAX. For example the server-side is reduced to nothing more than a persistance engine and HTTP some sort of labotomised JDBC communication channel! For little benefit too - no descent development tools - no debugger - no true Object Orientation.

      It'd be madness to use it for any heavyweight business applications. It probably has it's place to the leightweight stuff (those apps leaning more toward web-sites than web-apps. e.g. Google Maps).

      The thing is Java Applets are seriously out of fashion. Plus, you don't have to be in the business too long to see the attention and hype a new buzz word can generate. Time will tell...

  90. Re:Firefox bug 312418 by mewphobia · · Score: 1

    Word! If you use firefox and want this fixed, vote for bug 312418 or add a comment to it.

    https://bugzilla.mozilla.org/show_bug.cgi?id=31241 8

    Hyperlinks are disabled from slashdot so you'll have to cut and paste this link to a new browser window.

  91. A big sigh by Mitch+Monmouth · · Score: 1

    Don't get me wrong, AJAX has greatly improved web applications.

    But how sad is it that we've finally approached some level of responsiveness and interactivity in web applications through the desperate accumulation of hacks, when there are many great technologies and languages out there that could accomplish the same thing in a reasonably well designed environment. At this advanced stage of modern languages and development practices, we have resorted to hacking an ill-conceived scripting language on top of a bloated layout language to become the standard of client/server interaction.

    Here we have the developers and users just drooling over being able to click on a button and get an instant response. And it takes this giant hack to get there. Does this cause anyone else to let out a big sigh?

    There is obviously nothing new about what AJAX does, only the widespread platform on which it can easily run and the free as in speech nature of the technology. Other than that, it sucks donkey balls. There is nothing inherently good about the AJAX way of doing things.

  92. Most people want computing not computers by Aron+S-T · · Score: 1

    In the debate over whether Ajax is hype (it is) or the next best thing since sliced bread (it is that too) many are forgetting this simple fact: most people are interested in computing (i.e. the power of applications that computers provide us) not computers (i.e. being a sysadmin in order to get computing facilities). Yes it is true that AJAX in particular and the Web in general are implementing technological ideas that are decades old and in a worse way than some of the older alternatives. But all the older alternatives require people to "have" computers which means that on some level they need to be sysadmins. All the crap that is happening now in terms of internet security problems etc. starts and (mostly) ends with the fact that, through no fault of their own, non-technical people are forced into the role of sysadmin against their will.

    The promise of the Internet in general and the Web specifically, is that it gives people access to computing without having to be a sysadmin, and most importantly in a distributed environment - pervasive access to data and applications wherever you happen to be. The computer will fade away into the background - no one will know there is a computer there at all. They would just have computng service devices. The hype is only that we are promised it would be here yesterday, when it fact it is still many tomorrows away. But AJAX is one more step down that road and it works now. Sure in ten years we will think it is way primitive. But think of the World Wide Web in 1995 and look where it is now. Was it hyped in the dot com era? You bet. Is it revolutionary in the context of computing? Yes, because the way people work and play with computers has fundamentally changed in the past ten years because of the Internet and the Web.

  93. Closures don't make a member private by brunes69 · · Score: 1
    If you define a function in a closure, it is only available to objects within that closure, That is not the same thing as a private member of a data object. You can't use them in the same way, it is a totally different thing.

    For example, take this object, which has some services I want public, and one I want private:

    function myObject() {
    this.dataMember = 0;

    this.somePublicService = new function() {
    //Call the private service
    this._somePrivateService();
    }

    this.somePublicService2 = new function() {
    //Call the private service
    this._somePrivateService();
    }

    this._somePrivateService = new function() {
    this.dataMember++;
    }
    }

    Now, pray tell, how do I make that private method truely "private" using a closure, while maintaining it's scope within the object correctly? You can't. If you define it inside a closure, it is private to that closure only, and it's scope will no longer include the object, so you can't access the object's members.

    1. Re:Closures don't make a member private by ray-auch · · Score: 1
      Simple.

      You can access any local variable in scope inside the constructor from the private method - arguably this should include "this" but it doesn't - so convention is to just assign the instance to a private variable (self).
      function myObject() {
       
          this.dataMember = 0;
          var self = this;
       
          somePrivateService = function() {
              self.dataMember++;
          }
       
          this.somePublicService = function() {
              somePrivateService();
              return (self.dataMember);
          }
      }
      Alternatively if you don't need to access "public" variables / methods from the "private" method, you don't need to do this, so just make datamember private in your example. Any "public" methods declared in the constructor can access any "private" members.
      function myObject() {
       
          dataMember = 0;
       
          somePrivateService = function() {
              dataMember++;
          }
       
          this.somePublicService = function() {
              somePrivateService();
              return (dataMember);
          }
      }
  94. Thats hackish and not a private member by brunes69 · · Score: 1

    Closures do not create private members, they just ar ea way of scoping things. You can do the exact same thing in C or Java by wrapping things in { }.

    But they do not create private members. The fact that you have to pass the object instance in as the 'self' argument illustrates this fact. All you have there are some generic private functions, they are not within the object scope of the object you constructed, so they aren't private methods.

    All they are is privately scoped static utility methods that operate on objects that are passed into them. It's not the same thing.

  95. Re:So.. Actually by nazsco · · Score: 1

    > I guess we are in for a much cleaner internet?

    Why do you call more browser alert's about bad coded javascript poping up every time you move the mouse a "much cleaner internet"?