Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Foundations of Ajax

samzenpus posted more than 8 years ago | from the clean-programming dept.


Craig Maloney writes "You've no doubt heard about Ajax. Practically every new and exciting application on the web uses some form of Ajax. Google's suite of applications (GMail, Google Maps, etc.), Amazon's A9 search engine, and Netflix use Ajax interfaces to give the user a better browsing experience. By using some pretty basic innovations to current technology, browsers can now deliver content in ways unimaginable only a few short years ago. Foundations of Ajax provides developers who haven't taken the time to look into Ajax a hands-on guide for quickly leveraging these technologies in their own applications." Read on for Craig's review.

Foundations of Ajax starts with a brief history of interactive web-applications, starting from the crudest CGI and Java Applets, and chronicling various interactive technologies (Javascript, Servelets, ASP, PHP, Flash, DHTML, and the various XML browser languages like XUL, XAMJ, etc.). Ajax seems like another acronym in a sea of acronyms, but the authors quickly point out why Ajax can help with the development cycle. Ajax allows the server to validate the user's input, without creating ugly and messy JavaScript validation rules, and it allows the server to use the same rules for input validation on both the client and the server. Unfortunately, Ajax does break some of the conventions users have grown accustomed to in using traditional web applications. XMLHTTPRequest requests aren't stored in the browser history, and it can be confusing to the user to determine what changed on the page after refresh. Issues aside, the book is very encouraging on the prospects of using Ajax in web applications, and invites the reader to use Ajax where it makes sense.

Chapter 2 talks about the request method that makes Ajax possible: XMLHTTPRequest (XHR). The XHR methods are explained with several examples that detail the fundamentals occurring with the request. The examples are very clear, and the entire process is laid out in careful detail, although the Dynamic Object Model (DOM) is mentioned, but not explained until the end of the chapter.

Chapter 3 delves into server communication. It's interesting to note that the authors haven't instantiated a server yet for their Ajax communication, and for the balance of chapter 3, the server is replaced by text files. It's not until the GET/POST examples that the authors start using Servelets. While it may seem strange for the authors to be talking about client/server programming without instantiating a server, it does allow the developer to get their proverbial feet wet without battling server configuration issues. The chapter starts by introducing innerHTML, but then moves to using XML DOM for data transfer from the client. From there, the authors demonstrate a few examples of the server sending XML to the client, and the client sending XML to the server. Happily, the authors weren't content to leave us parsing XML using JavaScript, instead they finish up the chapter by introducing the JSON framework with a few examples.

Chapter 4 is really where the book starts doing very interesting examples with Ajax. It's also, coincidentally, the largest chapter in the book, and the chapter readers will find the most useful reference examples. The book steps through the creation of examples of Simple date validation, Reading response headers for a simple ping application, Dynamically Loading List Boxes, Automatically Refreshing Pages, Progress bar (a personal favorite), Tool tips, Accessing Web Services using REST, and Auto complete. Each example is introduced with a real-world working application as an example (such as the auto complete feature of the Google search engine), and could easily be implemented in a developer's application. I found myself thinking of ways to enhance my code using these techniques.

Following chapter 4's examples, the chapters on creating a developer toolbox, testing scripts using JsUnit, and debugging Javascript seem a bit of a let-down. Chapter 5 outlines various packages for helping JavaScript coders to better spot errors in their code, and create documentation using the JavaDoc-like application JSDoc. There is also a mention of an application for crunching and compressing JavaScript code, as well as the excellent Web Developer Extension. Rounding out the chapter is a brief history of JavaScript, and some advanced JavaScript techniques. Chapter 6 introduces JsUnit and Unit Testing. Chapter 7 talks about JavaScript debuggers, such as Microsoft's Script Debugger, and the very powerful Venkman. The Venkman tutorial is very good, and would be a great starting point for anyone wanting more information on how to use this great tool.

Chapter 8 rounds out the book with the typical "for more information" sites to visit. However, in true Steve Jobs "One more thing" fashion, the authors not only plug their Ajax Framework, but also create a browser-based, Macintosh-like Dashboard application with four widgets. I was all set to finish the book, but the authors quietly slipped the best for last in the final pages of the book, bringing out a complete Mac OSX-like "Dashboard" windowed-environment in a browser complete with the drag-and-drop elements I've most associated with Ajax sites. This is by far the most complicated project in the book, and it make for an excellent ending to an already fine book.

Foundations of Ajax is a great starting point for developers wondering how they can incorporate Ajax into their own web-based projects. One minor gripe I had with this book was the examples looked pale in comparison with their real-world models, but design is hardly the focus of the book. Where Foundations of Ajax shines is it's no-nonsense introduction, implementation, and expansion of the basics of Ajax programming, leaving the reader confidently ready to utilize the concepts within. The authors have seen the potential of Ajax, and competently convey their expertise and enthusiasm for this technology."

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

cancel ×


Sorry! There are no comments related to the filter you selected.

Wow (1)

EraserMouseMan (847479) | more than 8 years ago | (#14828811)

Not even one mention of "Web 2.0"!

Re:Wow (1)

Craig Maloney (1104) | more than 8 years ago | (#14828859)

That was by design. I hate the term Web 2.0, and will personally spoon out the brains of anyone who uses the term with a straight face.

Re:Wow (1)

MPHellwig (847067) | more than 8 years ago | (#14828906)

You've got my vote!

Re:Wow (1)

pHatidic (163975) | more than 8 years ago | (#14829099)

Heh, I don't see why people have such a hatred of everything that can't be quantified. Just because it can't be measured, doesn't mean it doesn't exist.

Re:Wow (1)

Craig Maloney (1104) | more than 8 years ago | (#14829209)

It's because it's used whenever the speaker wants to sound like they've got the inside track on whatever is new or exciting. Unfortunately it's been so overused when describing new and exciting things, it's lost all of it's novelty and excitement. Now, when I hear the term "Web 2.0", my "bullcrap" meter is engaged instinctively.

Re:Wow (1)

Tumbleweed (3706) | more than 8 years ago | (#14829173)

I hate the term Web 2.0, and will personally spoon out the brains of anyone who uses the term with a straight face.

Fantastic. What do you do to people who use the term Web 3.0?

Re:Wow (1)

jcgf (688310) | more than 8 years ago | (#14829404)

They get the same spoon treatment, with the additional humiliation of being sodomized by a goblin.

Re:Wow (1)

Misch (158807) | more than 8 years ago | (#14829363)

I, for one, welcome our new brain spooning overlords...

Re:Wow (1)

Ingolfke (515826) | more than 8 years ago | (#14829694)

I hate "Web 2.0" too. How can you simplify such a cross-section of intrensic and diversion paradigm shifts and technology consequence bubbles into a single simplistic phrase like "Web 2.0". Answer: you can't. We're at a major technoecosocial crossroads here... let's keep the plan flying, our eyes focused on the goal, and remember that doers do and winners win.

Re:Wow (0)

Anonymous Coward | more than 8 years ago | (#14830198)

Need for clarification before you remove the spoon hanging on your nose:

Are you talking Web 2.0 as in:

1) Internet2
2) Google's project for a new Internet protocol
3) China's new Internet

We can't determine how much of a negative reinforcement your spoon happens to be until you make yourself clear.

Re:Wow (1)

Ingolfke (515826) | more than 8 years ago | (#14829636)

Tim O'Reilly has the trademark on the phrase "Web 2.0".

demo? (1)

Douglas Simmons (628988) | more than 8 years ago | (#14828812)

could someone kindly link a page that demos ajax's features?

Re:demo? (1)

bryanthompson (627923) | more than 8 years ago | (#14828844)

Google suggest [] is a simple one.

Re:demo? (1)

iluvcapra (782887) | more than 8 years ago | (#14828880)

GMail [] and Google Maps [] are the obvious ones.

Re:demo? (1)

RoBorg (957597) | more than 8 years ago | (#14828925)

Here ya go :D

World Airport and Airspace Database [] - Really cool if you like looking at aeroplanes and airports

GeoNews - News with geographical data [] - See global news feeds parsed for place data and plotted on a map.

Both these projects use Google Maps - the second one has a few special features added, like a custom zoom tool and locator beacons. I'm going to make the source available as soon as I neaten it up a bit and write some documentation.

Re:demo? (1)

Dionysus (12737) | more than 8 years ago | (#14828944) [] has some interesting scripts (like drag-n-drop)

Re:demo? (1)

IAmTheDave (746256) | more than 8 years ago | (#14829002)

To the author(s) of the book and everyone else - AJAX is an acronym, for Asynchronous JavaScript And XML (or more appropriately, Asynchronous JavaScript + XML). Unfortunately, the book [] does not recognize this.

More unfortunately, Adaptive Path, the coiners of the original term/acronym also do not [] .

Unless I'm missing something...

Re:demo? (1)

IAmTheDave (746256) | more than 8 years ago | (#14829060)

Damn not previewing. My comment was meant to imply that BEING an acronym, AJAX should be in all caps, just like HTML, XML, etc. Not "Ajax".

Re:demo? (1)

Deinhard (644412) | more than 8 years ago | (#14829125)

From a page on IBM Developer Works [] : "The phrase was coined by Jesse James Garrett of Adaptive Path ... and is, according to Jesse, not meant to be an acronym." (emphasis in the article).

Re:demo? (1)

IAmTheDave (746256) | more than 8 years ago | (#14829976)

according to Jesse, not meant to be an acronym." (emphasis in the article).

It's nice if, in retrospect, you don't want a word to be an acronym, but as popular as certain words get, they are and will still be acronyms, like RADAR, which is often represented as "Radar" or "radar" in terms of capitalization in print media.

The fact is that AJAX (or Ajax) is in fact a direct derivation of the first letters of the words it represents, and thusly is, like it or not, an acronym. Further, I would think it improper to allow developers to use AJAX without understanding the actual underlying meaning. Many assume AJAX is just fun with DHTML, but it's not, and the fact that it is not is right in the acronym.

I guess since Jesse actually coined the term, he can turn around and say "nah, forget the acronym and just use the word" but it's a derivitive of the first letters of a phrase, and I'm pretty sure that's the basic definition of an acronym [] .

Re:demo? (1)

platos_beard (213740) | more than 8 years ago | (#14830086)

If it was NOT meant to be an acronym, then where the hell did it come from?

Personally, I find Ajax just as annoying a term as Web 2.0.

Re:demo? (1)

shoolz (752000) | more than 8 years ago | (#14829152)

Are you sure about it being an acronym? From the Adaptive Path site [] :

"Q. Why did you feel the need to give this a name?

A. I needed something shorter than "Asynchronous JavaScript+CSS+DOM+XMLHttpRequest" to use when discussing this approach with clients."

Moving target (1)

fak3r (917687) | more than 8 years ago | (#14828815)

While I appreciate this review, is the book really neccessary? AJAX moves very quickly, with new/better examples popping up everyday. Maybe it's me but I find less of a need for technical books and magazines since I can get all of my information from the internet. The personal example I'll use is Sys Admin; great magazine but I haven't leanred much from it during the last year. If I want to learn a specific server app or hack it's just easier and more up to date to grep it online.

Re:Moving target (1)

Stoolio (958177) | more than 8 years ago | (#14829160)

Yeah, but reading from a book is easier than a laptop when you're on the toilet.

But you are right about how quickly books can become outdated.

Re:Moving target (1)

booch (4157) | more than 8 years ago | (#14829781)

Call me an old fogie (I'm not THAT old!) but I prefer real books in a lot of circumstances. Especially when trying to get a full/complete understanding of a topic. Reading a few hundred pages on-screen gets to be painful on the eyes. And it's easier to take a book a lot of places - outside, on a plane during take-off, the toilet, on a date. ;)

Now if it were a reference manual, then I'd be more likely to agree. But even there, a lot of us like to lay the hard-copy book down on our desks while we program. Just last night at the local Ruby user group, the guy behind me pulled out his well-worn copies of the Ruby and Rails books. [Come to think of it, you were probably there -- I just don't know what you look like.] He even had good memory of where in the book and on the page the info he was looking for. Don't underestimate the mind's use of physical information.

Re:Moving target (1)

rs79 (71822) | more than 8 years ago | (#14830020)

"Call me an old fogie (I'm not THAT old!) but I prefer real books in a lot of circumstances.".

You're not old you just haven't gone paperless yet. It is difficult.

If you already know cgi programming and don't know ajax all you need is this:

Rasmus' 30 second AJAX tutorial. []

It's just call back functions for the web; most good programmers could pick this up in an hour. I looked at the 30 second tutiorial and only needed to understand the syntax, it's obvious what it does. That took 11 seconds not 30.

Re:Moving target (1)

kimanaw (795600) | more than 8 years ago | (#14830063)

As someone who's read the book (and previously commented on it here), this book is just what the title says, "Foundations". It is not a comprehensive analysis, nor does it attempt to lead the reader through graduate level UML and design pattern analysis like some other massive tomes. It delivers the basic concepts, shows a few nice examples, and provides lots of links to sites doing interesting things w/ AJAX.

So I'd say, yes, the book is neccesary. Rather than meandering all over the web trying to figure out "what this AJAX stuff is all about", you can grab this little book, have a nice quick afternoon's read, and then do a much more targeted browsing session to fill in the details. It certainly helped me bootstrap into developing AJAX applications.

So... (1)

Eightyford (893696) | more than 8 years ago | (#14828834)

So, is there an IDE like Visual Studio for AJAX, or are we expected to wade through pages of HTML and Javascript like in the old days of the web? In my opinion, GUI applications are best developed inside GUI applications.

I totally agree. (1)

C10H14N2 (640033) | more than 8 years ago | (#14828974)

Like, this one, perhaps. []

Re:I totally agree. (1)

ScottyH (791307) | more than 8 years ago | (#14829049)

Correct link []

Re:So... (1)

Bovarchist (782773) | more than 8 years ago | (#14829054)

Perhaps it is because I've been chained to MS technologies so much over the years, but my personal experience has been that GUI applications are best written by hand. HTML that is generated by the GUI in FrontPage is atrocious. DreamWeaver's code is much better, but still not as clean as what you can accomplish in VIM (or jEdit, notepad, etc.) And I've never seen anything that did better than DreamWeaver. I haven't had a chance to play with Atlas yet, but considering Microsoft's track record with HTML, I doubt it will produce clean code.

Re:So... (1)

Bogtha (906264) | more than 8 years ago | (#14829107)

In my opinion, GUI applications are best developed inside GUI applications.

Ajax applications are not GUI applications. They are web applications, and the web isn't tied to a single type of interface.

People who pretend the web is GUI-only usually end up building things that are fragile and inaccessible, not just for the people who don't use GUIs, but power-users and people using alternative user-agents as well (e.g. search engines, UserJS/Greasemonkey scripts, etc).

Re:So... (1)

wjsteele (255130) | more than 8 years ago | (#14829115)

Microsoft has a project called Atlas [] that does exactly that. Bill

Re:So... (1)

wjsteele (255130) | more than 8 years ago | (#14829153)

Sorry, hit the damn Submit button instead of the Preview button.

The correct link is here: Atlas []


Re:So... (1)

clydemaxwell (935315) | more than 8 years ago | (#14829659)

Like visual studio? Thanks, I want to 1) understand my code and 2) have it work.
Ugh, fucking visual studio and fucking .NET programmers.

Re:So... (1)

killjoe (766577) | more than 8 years ago | (#14829773)

An IDE for AJAX? Heavens no. Take the Ruby on rails approach. Try like hell to avoid javascript. ROR has it all nicely abstracted so you don't have to deal with javascript (mostly)

Re:So... (1)

MikeyTheK (873329) | more than 8 years ago | (#14830234)

Yes, and it's called Morfik. You should join the Explorer's program and give it a try.

I feel sorry for all the trees... (1)

helix_r (134185) | more than 8 years ago | (#14828877)

I feel sorry for all the trees that have to be cut down needlessly so that developers can try to keep up with the latest crappy technology that will obsolete in less than 2 years.

On the bright side, at least its under 300 pages long.

It's a conspiracy! (1)

AnonymousPrick (956548) | more than 8 years ago | (#14828966)

The lumber industry, paper mills, and O'Reilly publishing are all it together! Create a new programming language and Presto! More revenue for all!

Re:It's a conspiracy! (1)

merreborn (853723) | more than 8 years ago | (#14828988)

The lumber industry, paper mills, and O'Reilly publishing are all it together! Create a new programming language and Presto! More revenue for all!

That explains the book on slash... []

Re:I feel sorry for all the trees... (1)

merreborn (853723) | more than 8 years ago | (#14828970)

I feel sorry for all the trees that have to be cut down needlessly so that developers can try to keep up with the latest crappy technology that will obsolete in less than 2 years.

As if the 100 romance novels published every month are any more worthy...

Re:I feel sorry for all the trees... (1)

helix_r (134185) | more than 8 years ago | (#14828987)

Romance novels...?

Yeah, but at least some people get off on romance novels. The same cannot be said for the computer-book-du-jour.

Re:I feel sorry for all the trees... (1)

merreborn (853723) | more than 8 years ago | (#14829080)

Yeah, but at least some people get off on romance novels. The same cannot be said for the computer-book-du-jour.

Speak for yourself, you insensitive clod!

Re:I feel sorry for all the trees... (1)

revscat (35618) | more than 8 years ago | (#14829333)

... and if they're getting off on romance books it's probably by themselves, which means they aren't breeding. Therefore romance novels are good for the environment.

Re:I feel sorry for all the trees... (0)

Anonymous Coward | more than 8 years ago | (#14829339)

"Yeah, but at least some people get off on romance novels. The same cannot be said for the computer-book-du-jour."

Or can it? ;)

Re:I feel sorry for all the trees... (1)

hotdiggitydawg (881316) | more than 8 years ago | (#14829608)

You must be new here.

Re:I feel sorry for all the trees... (1)

3mpire (953036) | more than 8 years ago | (#14830082)

because once people have web apps that behave like client apps they'll decide "thats crappy" and go back to postbacks for every interaction with the server and all the developers who learned how to do things async will be kicking themselves. brilliant!

What level? (1)

danikar (896514) | more than 8 years ago | (#14828898)

I know PHP/Javascript/HTML relitivly well. Do you think this book would be an easy read for me. Or would I really have to sit down and try. Heh, got the book for christmas and just looking for time to read it.

Re:What level? (1)

Craig Maloney (1104) | more than 8 years ago | (#14828961)

I think the book may be more of a sit-down book for you, only because there's a bit of it that relies on Tomcat and JSPs. Outside of that hurdle, you'll likely find it pretty easy to work through. There's not that much to Ajax, all told, but this book will help you piece together the various parts to make it work better for you.

Hope this helps!

Re:What level? (1)

Parham (892904) | more than 8 years ago | (#14829617)

I was in the same position as you... just read through online tutorials and you'll pick it up in a few hours. There's no need to sit through an entire book. With the tutorials you'll pick up the basics and then from there you can decide how much MORE you want to learn. I don't think most people want to get up to the google maps API level anyway.

And (-1, Troll)

Anonymous Coward | more than 8 years ago | (#14828905)

everything written using it sucks ass compared to a properly written program using the host windowing API. Let's get it over it, already, o disciples of the almighty buzzword.

see sig. (0)

SharpFang (651121) | more than 8 years ago | (#14828912)


Re:see sig. (1)

Pollardito (781263) | more than 8 years ago | (#14829063)

i've used that method and it will never be as popular as AJAX, because AJAX leverages everyone's love for XML. really it seems to work just the same, with the server sending javascript code and data structures instead of XML. be sure to add a random querystring value to the script call, or else you're going to get some monstrous caching issues :)

Re:see sig. (1)

ScottyH (791307) | more than 8 years ago | (#14829072)

Interesting idea.

I'll be sure to give this a try.

Re:see sig. (1)

temojen (678985) | more than 8 years ago | (#14829230)

doc = document.implementation.createDocument("","",null) ;
doc.onload = onload_function;
doc.onError = onerror_function;
doc.load("data/request.php?" + arguments + "&" + timestamp );
Which is the standards-compliant, non-crazy-scripty way of doing it. Also this method and yours SHOULD both respect the same-source rule. If it doesn't, it's a browser bug. Also, it won't display your data in the page by accident if you make a mistake in your stylesheet (class/name that's styled "position: absolute;" in your data).

Re:see sig. (1)

Bogtha (906264) | more than 8 years ago | (#14829562)

Which is the standards-compliant, non-crazy-scripty way of doing it.

Actually, that's not true. The load() method [] was part of early DOM3LS drafts, but was taken out before the specification reached Recommendation [] status. As far as I'm aware, there's no non-draft specification describing load(), nor plans to write one.

XMLHttpRequest, on the other hand, is part of the draft "HTML 5" specification [] published by the WHATWG, and I expect it will remain there permanently.

Re:see sig. (0)

Anonymous Coward | more than 8 years ago | (#14829577)

That should be "&", by the way, since you're banging on about standards.

new and exciting apps on the web?!?! (0)

Anonymous Coward | more than 8 years ago | (#14828913)

"Practically every new and exciting application on the web uses some form of Ajax"

There are new and exciting apps on the web? Wow must have missed them.

Chinese pee (0, Offtopic)

'aspies' are retards (958036) | more than 8 years ago | (#14828937)

Chinese pee tastes like math.

If AJAX is so amazing... (0)

Anonymous Coward | more than 8 years ago | (#14828945)

why doesn't Slashdot use it? Eh??

Re:If AJAX is so amazing... (1)

Perl-Pusher (555592) | more than 8 years ago | (#14830036)

The slashdote code base is too old but, there closest competitor [] uses it! According to this [] digg has almost the same traffic as slashdot.

yep, its a good book (2, Informative)

DeveloperAdvantage (923539) | more than 8 years ago | (#14828957)

I have actually read/worked through this book and indeed it was not only one of the first books on Ajax but also one of the better books on Ajax. Some of the portions are now a little outdated, like the discussion on frameworks, but these areas can easily be filled in with a little research on the Internet.

Ajax vs. Comet (0)

revery (456516) | more than 8 years ago | (#14828959)

I personally, use Comet, but only because it has a cool song []

Oh, that Ajax.


Re:Ajax vs. Comet (1)

AnonymousPrick (956548) | more than 8 years ago | (#14828995)

I've been trying to see if there was a website for the language, you know like Perl, PHP, etc.... This is what I found: A political [] site?

Effective Ajax Using TG (1)

hauntedspaceship (548729) | more than 8 years ago | (#14828975)

Some of you might be interested in a recent Presentation / Screencast [] given by Kevin Dangoor (creator of the TurboGears [] Python web framework) given at this year's Pycon [] . Although he does talk a bit about TurboGears, most of the talk is tips and examples on how to add functionality using Ajax without confusing users.

Re:Effective Ajax Using TG (0)

Anonymous Coward | more than 8 years ago | (#14829201)

Forget AJAX, AJAJ is the future!!!

Re:Django vs TG vs RoR (0)

Anonymous Coward | more than 8 years ago | (#14829763)

I'm thinking about investing a bit of time to learn one or two of these frameworks. Learning Ruby on Rails is pretty much a given just because of the mindshare it has. But I prefer Python over Ruby because of the vast array of libraries available for Python, so I also want to pick up a Python framework. Django and TurboGears seem to be the leading contenders. Can you tell me any reasons why I should pick one over the other? They both seem to be relativly new and under rapid development. Neither seems to be clearly ahead in the marketplace. Any reason to pick one over the other?

Only Web 2.0 Idiots... (0)

Anonymous Coward | more than 8 years ago | (#14829010)

would say those pages use AJAX. Most of the people involved in coding the sites listed are probably not lame enough to use that term. They probably just call their collective code a "web site" just like the rest of us who are sane (or insane but still coherent enough to despise the terms AJAX and Web 2.0) would call it! That's what we get for letting mcse's become "programmers"... sigh. Welcome to IT Hell 2.0.

Save $5.60! (0)

Anonymous Coward | more than 8 years ago | (#14829024)

Save yourself $5.60 by buying the book here: Foundations of Ajax [] . And if you use the "secret" discount [] , you can save an extra 1.57%!

Off Topic (2, Interesting)

TubeSteak (669689) | more than 8 years ago | (#14829069)

But is something going on with the moderator points? Or is it just a slow day (or three)?

I noticed all the stories have very few comments modded to 3 or above. And by few I mean 20. Just skip through any of the articles on the front page.

Did I not get the memo?

Re:Off Topic (1)

donnz (135658) | more than 8 years ago | (#14829630)

I'd mod you up but this new AJAX interfac /. has adopted seems quite buggy ATM

Mod Parent Off Topic (0)

Anonymous Coward | more than 8 years ago | (#14829713)

Mods obviously have nothing better to do.

Too bad they didn't use Ruby on Rails... (1)

tcopeland (32225) | more than 8 years ago | (#14829074)

...InstantRails [] makes it easy to get it up and running, and Rails definitely has AJAX support built in.

I'm using AJAX a fair bit (mostly on the admin pages) on getindi [] ; it's very handy stuff!

Re:Too bad they didn't use Ruby on Rails... (1)

monsterzero2002 (522937) | more than 8 years ago | (#14830153)

InstaRails eh? But go follow the link at it says Windows only and linux etc. on the way? What kind of sick project starts with the Windows version first? Smell a rat...

"Anything worth doing is worth overdoing..." - Lord Chesterson

Combine both.... (1)

k1980pc (942645) | more than 8 years ago | (#14829136)

I would like to see an application that can work online and offline with same ease. We, at my firm, had tried an app using java which worked standalone when network was loaded and became online when there was less congestion. Our internal network was so slow that the application was standalone most of the time. That was India and year was 2000. Now Ajax looks like a good solution for a long forgotten problem.

that word, are you sure you are using it correctly (1)

pyrrho (167252) | more than 8 years ago | (#14829138)

"... deliver content in ways unimaginable only a few short years ago"

but, but, I remember imagining it. I remember it all over the tech press... and those guys that wrote the technology, they -imagined- it! For GOD'S SAKE WE ALL IMAGINE THAT SHIT!!!!

Ajax is suboptimal (0)

Anonymous Coward | more than 8 years ago | (#14829199)

Posting anonymously since it's about my work; I've moved from doing Javascript in the late 90's early 2000's to working with Flash, and now recently back to mostly Javascript with the Ajax market boom. The reason I moved to Flash in the first place is more clear now than ever. The "Browser" ad hoc platform is horrible to develop for compared to Flash.

Inconsistent support for "Standards" across browsers, weak development tools, and worse support for Accessibility all make Ajax a freakshow. Flash is a bigger more consistent platform (more people have Flash than Ajax capable browsers) with good tools. There are Open Source Flash dev tools, but the Adobe ones are good enough to rapidly earn their cost back in productivity gains.

I understand that people are excited about Ajax, Google's apps are cool, but the fact that this excitement never translated to Flash, which has had similar cross-platform capabilities for about 5 years now shows that technological decisions aren't made on a technical basis alone.

Re:Ajax is suboptimal (1)

Craig Maloney (1104) | more than 8 years ago | (#14829350)

I think there's two reasons why people are so excited about Ajax. The first reason people are so excited about Ajax is because it doesn't require anything extra to make it work. Flash requires not only the plugin (which admittedly is pretty ubiquitous out there), but also requires a development package that isn't cross platform (at least I'm not aware if there's a Linux version of the development tools). Ajax allows the neat features to come through without having to resort to Flash. The second reason Ajax has caught on is server-side validation rules can also work on the client. One set of rules = no more trying to wrestle Javascript to do proper validation. For me, that's a huge win, as I'm no fan of Javascript.

Re:Ajax is suboptimal (0)

Anonymous Coward | more than 8 years ago | (#14829693)

The "it needs a plug-in" argument is moot to me, in part because of Flash's great ubiquity, and in part because a lot of Javascrpt is now focusing on Ajax and DHTML. (I've gone to more than one person's "cool Ajax website" and had it not work in my browser at all. Sometime's they're doing something IE specific, sometimes something Firefox specific. Pfeh)

Yeah, the professional Adobe development tools aren't on Linux, but the open source ones are. Also, I don't know of anyone who does professional client side web development that develops on anything except Windows or OS X. Server-side yes, client-side no. I'm sure there are people out there who do, but I've never met them.

Server side validation isn't unique to Ajax, as I mentioned in my original post, Flash has had the features that make Ajax be Ajax, instead of just Javascript, for 5 or 6 years now.

Also, while I'm ranting, I think the browser developers, Mozilla in particular actually, are acting irresponsibly and restarting the bad parts of the browser wars. They're starting to try and compete on features again, adding in non-standard optional elements. I think we've seen that this is a war we can't win while Microsoft controls the default browser for the majority of users. The loss will be felt by web developers, in the form of many many lost hours spent making their pages "cross browser compatible".

Re:Ajax is suboptimal (1)

Bogtha (906264) | more than 8 years ago | (#14829708)

Your premise - that developing Ajax web applications is harder than developing Flash applications - doesn't support your conclusion - that Flash is technically better.

You are assuming that Ajax web applications and Flash applications are of a similar quality - they are not. Flash applications are essentially executables that you are handed, with no choice but to run them or not run them. Web applications are documents linked together, with stylesheets to suggest a presentation and script to suggest an interaction model.

These two approaches are totally different. As a user-agent not only understands the final product, but the individual components that a web application is comprised of, it has much better opportunity to work with those components. This means that browser features that users are used to and expect to work do not break. There's a wide range of browser features that are broken in Flash applications that are not (necessarily) broken in Ajax web applications:

  • Opening links in new windows
  • Opening link in new tabs
  • Find and Find-as-you-type
  • UserJS/Greasemonkey
  • Printing (it was only a couple of hours ago I read a warning not to use my browser's Print button, but instead, the special Print command that Flash provides)
  • Various Firefox extensions
  • Right-click, "Search web for..."

If you think that it's easier to develop something in Flash, then fine. But don't pretend that what you end up with is of equal quality. You end up with something very different to a web application, so whether the quality is higher or lower depends on your particular circumstances, and cannot be generalised to the extent that you do.

Re:Ajax is suboptimal (0)

Anonymous Coward | more than 8 years ago | (#14829916)

executables that you are handed, with no choice but to run them or not run them.

If Javascript isn't executable code what is it? I've seen exploits that use Javascript, but never one that uses Flash.

Almost all those features you list are things that could be broken in Ajax depending on how it's coded and could be allowed in Flash depending on how it's coded. (Someone could develop a Greasemonkey type tool for Flash, but no one has for example, and standard printing does work in Flash, but the app you were using probably had some special print formatting that the person wanted.)

Honestly, Javascript + HTML and Flash are very similar in structure, but Flash has more features, works better cross-platform, and has better development tools. Also, it can create lower-bandwidth content (there are many options for binary data transmission) and it has built in handling for MP3s, movie files, timed animation, and resolution independent display.

Having worked in both there are 3 arguments for Ajax 1)Cellphone development 2)Existing Skillsets [we already know Javascript] and 3) Dogmatic open standards talk. The dogmatic one is really hard to swallow anymore when everything Ajax is based on an ad hoc "non-standard" standard. (The everyone emulate Microsoft standard.)

Yet Another Buzzword (1)

nganju (821034) | more than 8 years ago | (#14829258)

All "Ajax" means is that Javascript now works. I used to accomplish the same tasks (i.e. asynchronously send/receive bits of data, dynamically update tables without refreshing the whole page) using hidden frames and javascript submits back in 1999. Javascript now has built-in functions to do this so it's less of a hack, but I don't think that it merits a whole new buzzword.

Then again, I guess it's something for new startups to tout and investors to latch on to, so maybe it's more of a business/marketing buzzword than a software/technology buzzword.

"... deliver content in ways unimaginable only a" (0)

Anonymous Coward | more than 8 years ago | (#14829344)

Someday we may even be able to open whole applications and graphically view them on a remote terminal!!!! The past is the future can you say X-windows?

I don't want to "leverage" it (1)

grasshoppa (657393) | more than 8 years ago | (#14829381)

I want to use it.

Damn marketing driods

Re:I don't want to "leverage" it (1)

ukpyr (53793) | more than 8 years ago | (#14830176)

while in spirit I agree with you, to me 'leverage' has a somewhat different meaning than to 'use'. Leverage implies that you are able to something faster/better/cheaper by using it, where as 'use' doesn't have that extra meaning. At the same time, I acknowledge that it doesn't really matter and saying 'leverage' all the time makes you sound like an overpaid consultant. Not that it's bad to be one.

I've read this book and... (2, Informative)

LaptopHeaven (944393) | more than 8 years ago | (#14829398)

I picked this book up on my last trip to Vegas. I read it cover to cover. I found it to be on the elemtary side of the AJAX discussion. I was disappointed when I found most of the content, code examples and demos can be found online in different places. AJAX is just a hot topic right now, I find this book as an attempt to ride the coat tails of the AJAX phenom.

Re:I've read this book and... (1)

geekoid (135745) | more than 8 years ago | (#14829993)

You went to Las Vegas, and rad a book, cover to cover?

No wonder hookers and strippers hate geek conventions.

Dude, what happens in Vegas stays in Vegas.

OK book (5, Informative)

wanorris (473323) | more than 8 years ago | (#14829413)

I have this book. It's a pretty straightforward introduction to the topic. The central problem with it is that all the examples that use server-side components only use Java.

If you use Java, great. But the book title is misleading, and it should be called "Foundations of Ajax in JavaScript and Java."

The other caveat: the book is designed for people who want to use Ajax to spruce up an existing web page a little, not design new applications built from the ground up to use Ajax as the data transport mechanism. If this meets your needs, great. If you're looking to do bigger stuff, get "Ajax in Action" froom Manning.

Gecko DOM Reference (1)

Kozz (7764) | more than 8 years ago | (#14829415)

I also recommend that you check out the Gecko DOM Reference [] . It's a great, handy online resource which I've consulted frequently as of late for many DHTML apps and functionality.

Re:Gecko DOM Reference (1)

AKAImBatman (238306) | more than 8 years ago | (#14829677)

Well there's a bad idea. If you want your code to be cross platform, always go to the source [] for your information. Otherwise you're guaranteed to get burned. It's bad enough that Internet Exploder refuses to support DOM Events. Throwing stuff that may be Mozilla specific into the fray is a sure-fire way to make it that much worse.

Too bad ... (1)

Kozz (7764) | more than 8 years ago | (#14829793)

Too bad that "the source" is a very poorly structured website IMO where I can never find what I want. I guess I just didn't try hard enough, but I couldn't find a comparable page at W3 as the DOM index I linked at I don't want to know the fucking history, recommendations, all that bullshit. I want real information that I can take and use, right now. Where's the "pocket reference" pages?

Am I the only one who thinks it's difficult to use the W3 site as a general programmer's reference for anything at all? Whenever I think to myself, "Gee, I'd like to do this the right way, and conform to W3 'standards'", I get lost at W3 and go elsewhere for the Cliff's Notes version.

Re:Too bad ... (1)

tb3 (313150) | more than 8 years ago | (#14829999)

Yeah, seconded. I find myself going to to look up the stuff I've forgotten. The only thing worse than is Sun's That thing is a complete mess.

"What is AJAX" for beginners (0)

Anonymous Coward | more than 8 years ago | (#14829441)

Here is goes: AJAX is a techology, supported by some major sites (Mozilla, google, etc), which tries to counterpart Macromedia. Macromedia has been the best solution to dynamic content. It makes a GUI inside your browser. Netscape, google and a few others feel that Macromedia is becoming too powerful. So they are trying to come up with an alternative.

That's why AJAX was made (and hyped so much). In Reality (TM), AJAX is nothing new. It is based on the crap language called Javascript (which is a huge succes because it is supported by all web browsers and as a result it's the most PORTABLE language of all times). XML, the other hyped technolody which is just an inefficient way to transfer data (but this is counterparted by the amazing JSON innovation). And "Asynchronous". "Asynchronous" means that your browser sends data (files, passwords) to the internet without synchron.

Ever wondered why Mozilla doesn't have a "turn off all ads" button?
Because it can afford being the only browser which can support all these crazy extensions (Web2.0, AJAX, css2.0, XHTML7.5, ...), without competition. And thus you suck the ads. Keep up the hype.

Hmm, what worries me (0)

Anonymous Coward | more than 8 years ago | (#14829476)

How much does this book's approach to AJAX depend on writing Javascript? I have a good deal of experience with Javascript, and frankly, I'm sick of it. Javascript's constant browser incompatibilities are simply more than I can deal with. AJAX seems like it would allow one to avoid many of Javascript's problems by moving logic into the server, but it also seems like it is an invitation to have to write a program on the server side and then have to debug it at every step on four different browsers on two different operating systems. If AJAX suffers from the same compatibility hell I have seen with trying to write CGI with embedded javascript in the past, I am tempted to just wait to get into this AJAX thing until "rails" style libraries become robust enough that they generate browser-specific javascript for you.

I'm curious about this book, but to what extent must someone overcome crossbrowser javascript hell in this book's approach to AJAX? Is this material I would benefit from learning despite my acquired Javascript aversion?


AJAX? that some new thing? (1)

Theatetus (521747) | more than 8 years ago | (#14829481)

Is it good or is it wack?

Re:AJAX? that some new thing? (2, Funny)

linguae (763922) | more than 8 years ago | (#14830110)

Ajax is great! It cleans my hands, is tough on grime, and makes my dishes sparkling clean.

Over and over again... (0)

Anonymous Coward | more than 8 years ago | (#14829578)

You've no doubt heard about Ajax. Practically every new and exciting application on the web uses some form of Ajax.

Not this bullshit again!

Unimaginable? (1)

hikerhat (678157) | more than 8 years ago | (#14830014)

I think it is more like, when using AJAX, user interfaces are slowly creeping back up to where they were 10 years ago, before everything was crippled to work as a web form in the lowest common denominator browser. Web interfaces still have a hell of a long way to go before they are even close to the level of sophistication that rich clients were at 10+ years ago. Everything that is new was old once before.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?
or Connect with...

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>