Head Rush Ajax
barryhawkins writes "
Programmers are flooded with choices about which technologies to pursue in order to maintain a marketable skillset. Even in a particular area of programming like web applications, one must choose carefully where to invest time. Ajax, to the regret of some and delight of others, has emerged as a means of providing rich, responsive web applications that are highly cross-platform. However, when arriving home after a 10-hour day at the office programming, who has the energy to plow through yet another new facet of emerging technology? If a developer is going to invest their free time in self-driven career development, should it not be at least remotely enjoyable? Judging from the content of O'Reilly's new release Head Rush Ajax, their answer is yes." Read the rest of Barry's review.
Head Rush Ajax
author
Brett McLaughlin
pages
413
publisher
O'Reilly Associates
rating
9
reviewer
Barry Hawkins
ISBN
0-596-10225-9
summary
A learner's introduction to Ajax, Asynchronous JavaScript and XML for web application programming
Like its forerunner the Head First series, the Head Rush line approaches learning a given technical topic with the principles derived from studies in cognitive science, neurobiology, and educational psychology. It comes as no surprise that the classic approach of turgid, monotonous, visually-fatiguing tomes is not the ideal way to have someone learn a topic. Learning is aided by having variation in the way content is presented. This book moves between presentation of information, application through interactive exercises, and review questions that stimulate the reader and invite them to continue in the book's journey through Ajax. Each exercise is also tied to a storyline, where the reader has a person with an application that needs to be enhanced by the application of the skills being learned.
Head Rush Ajax scales well. Ready-to-run scripts for the more technical components of the sample applications are provided so that a reader with only a background in HTML and CSS will not experience barriers to participation early in the book. This facility does not come at the expense of the experienced web developer; anyone who knows their way around a PHP script and databases is free to write the server-side code on their own. Some readers may look upon the choice of PHP for the back-end scripts as regrettable, particularly those with Java and .Net backgrounds. However, the focus is on Ajax itself, and not the particular back-end platform providing the HTTP responses. Those who look upon that sort of thing with scorn typically view Ajax as a novelty itself, so the number of complaints about using PHP should be relatively low; the dissenting voices will have probably passed over Ajax for the time being anyway.
The author never takes himself too seriously; the informal tone of the book is comfortable, like having a conversation with one's colleagues at the office. The balance of levity and solid technical content is refreshing, making this volume of some 400 pages reach its end surprisingly soon. Retro cartoon graphics and narrative comments like "Now, everyone hates you. You're an idiot, and all this Ajax stuff was a waste of time" when a URL caching error is uncovered make for a genuinely enjoyable read.
The Document Object Model, or DOM, has long had a reputation for being an unwieldy and problematic interface to manipulate. The tree metaphor used in this book along with the series of progressive exercises present the DOM in a refreshingly approachable manner. By the end of the DOM-specific coverage, an entire application has been created that is highly dynamic yet involves no Ajax-specific coding. The critical role of the DOM in effective use of Ajax is driven home without being heavy-handed.
The choice between using XML and JavaScript Object Notation (JSON) for receiving data via HTTP responses is another entertaining treatment of a topic that is often grounds for argument between practitioners of web development. The author comes across with a pragmatic viewpoint, preferring JSON as the simpler choice that is most often adequate and does not bear the high ceremony that accompanies proper handling of XML via the DOM. Two of the sample applications choose opposite means of receiving their data, once again fleshing out a topic in a concrete manner rather than pontificating about the virtues of either approach.
The progression of the book is masterful. The types of issues that typically plague web applications are addressed in the order they tend surface during the lifecycle of a real-world application. Proper functionality is the first stage, followed by enhanced functionality, then onto issues with synchronicity, security, and more complex domain model requirements. A reader can pass through an encapsulated representation of application lifecycles by working through the book from start to finish.
The goal of Head Rush Ajax is to have the reader learn Ajax, not master it. At the conclusion, the author appropriately offers topics for further exploration in the form of two appendices. The first appendix covers Ajax toolkits, user interface libraries, DOM utilities (most of which are built plugins for the browsers in use on desktops every day), and JSON libraries. Links to the project sites provide easy access to pick up where the book's coverage leaves off. The second appendix provides deeper insight on the internals of two JavaScript utilities provided for use in the exercises throughout the book. One is an Ajax-specific set of common infrastructure for typical Ajax applications, while the other provides convenient methods for DOM manipulation. Head Rush Ajax is a most enjoyable launchpad into the world of Ajax web applications, well worth the investment in time and money."
You can purchase Head Rush Ajax from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Like its forerunner the Head First series, the Head Rush line approaches learning a given technical topic with the principles derived from studies in cognitive science, neurobiology, and educational psychology. It comes as no surprise that the classic approach of turgid, monotonous, visually-fatiguing tomes is not the ideal way to have someone learn a topic. Learning is aided by having variation in the way content is presented. This book moves between presentation of information, application through interactive exercises, and review questions that stimulate the reader and invite them to continue in the book's journey through Ajax. Each exercise is also tied to a storyline, where the reader has a person with an application that needs to be enhanced by the application of the skills being learned.
Head Rush Ajax scales well. Ready-to-run scripts for the more technical components of the sample applications are provided so that a reader with only a background in HTML and CSS will not experience barriers to participation early in the book. This facility does not come at the expense of the experienced web developer; anyone who knows their way around a PHP script and databases is free to write the server-side code on their own. Some readers may look upon the choice of PHP for the back-end scripts as regrettable, particularly those with Java and .Net backgrounds. However, the focus is on Ajax itself, and not the particular back-end platform providing the HTTP responses. Those who look upon that sort of thing with scorn typically view Ajax as a novelty itself, so the number of complaints about using PHP should be relatively low; the dissenting voices will have probably passed over Ajax for the time being anyway.
The author never takes himself too seriously; the informal tone of the book is comfortable, like having a conversation with one's colleagues at the office. The balance of levity and solid technical content is refreshing, making this volume of some 400 pages reach its end surprisingly soon. Retro cartoon graphics and narrative comments like "Now, everyone hates you. You're an idiot, and all this Ajax stuff was a waste of time" when a URL caching error is uncovered make for a genuinely enjoyable read.
The Document Object Model, or DOM, has long had a reputation for being an unwieldy and problematic interface to manipulate. The tree metaphor used in this book along with the series of progressive exercises present the DOM in a refreshingly approachable manner. By the end of the DOM-specific coverage, an entire application has been created that is highly dynamic yet involves no Ajax-specific coding. The critical role of the DOM in effective use of Ajax is driven home without being heavy-handed.
The choice between using XML and JavaScript Object Notation (JSON) for receiving data via HTTP responses is another entertaining treatment of a topic that is often grounds for argument between practitioners of web development. The author comes across with a pragmatic viewpoint, preferring JSON as the simpler choice that is most often adequate and does not bear the high ceremony that accompanies proper handling of XML via the DOM. Two of the sample applications choose opposite means of receiving their data, once again fleshing out a topic in a concrete manner rather than pontificating about the virtues of either approach.
The progression of the book is masterful. The types of issues that typically plague web applications are addressed in the order they tend surface during the lifecycle of a real-world application. Proper functionality is the first stage, followed by enhanced functionality, then onto issues with synchronicity, security, and more complex domain model requirements. A reader can pass through an encapsulated representation of application lifecycles by working through the book from start to finish.
The goal of Head Rush Ajax is to have the reader learn Ajax, not master it. At the conclusion, the author appropriately offers topics for further exploration in the form of two appendices. The first appendix covers Ajax toolkits, user interface libraries, DOM utilities (most of which are built plugins for the browsers in use on desktops every day), and JSON libraries. Links to the project sites provide easy access to pick up where the book's coverage leaves off. The second appendix provides deeper insight on the internals of two JavaScript utilities provided for use in the exercises throughout the book. One is an Ajax-specific set of common infrastructure for typical Ajax applications, while the other provides convenient methods for DOM manipulation. Head Rush Ajax is a most enjoyable launchpad into the world of Ajax web applications, well worth the investment in time and money."
You can purchase Head Rush Ajax from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I've no need of learning ajax at the moment, but if it's done by the same people who did the head first series, I may just spend the money. I know that it won't be a waste, because it will be useful somewhere down the line.
I would like to see more web frameworks include a mature AJAX framework to facilitate more dynamic interaction. To date the best I have seen so far is Echo2 which incorporate an event driven architecture that allows for seamless integration of client side events transmitted to the server side architecture.
Wow. A tree metaphor for the DOM! Now that's a new idea!
Reviewer says:
Programmers are flooded with choices about which technologies to pursue in order to maintain a marketable skillset.
A better skillset is the standard:
- Bathe frequently
- Show up on time
- Learn people skills (don't assume less experience is stupidity)
- Learn how to LEARN
Buy the book if you need to learn AJAX, not because you're afraid you're no longer on the bleeding edge of programming languages.
-nj
Save yourself $14.80 by buying the book here: Head Rush Ajax. And if you use the "secret" A9.com Instant Reward discount, you can save an extra 1.57%! That's a total savings of $15.20, or 38.58%!
As I understand it, you can choose between by-the-word and per-review compensation, but since they're both a rate of 0, you're not penalized by choosing one over the other. 8^)
Barry Hawkins site: www.alltc.com weblog: www.yepthatsme.com
I "learned" Ajax last month. Well, ok, "enough" to produce a small GUI that did some cool things, asynchronously.
I beefed up my resume on Monster.com expecting a flood of Ajax inquiries. Although 2 recruiters have contacted me recently, neither was interested in my Ajax stuff. Just PHP, Oracle, SQL server, etc.
I'm quite surprised - either I suck (alway a possbility), or Ajax jobs are not the hot thing right now.
- The Kessel run is for nerf herders. I can circumnavigate the entire Central Finite Curve in a lot less than 12 parse
If Ajax does not seem enjoyable to you, don't try to learn it as a career skill. If somebody hires you because you know Ajax then you might get stuck doing something that you don't enjoy. I do not have a large interest in web apps, but I do have interest in digital audio. So I do digital audio and MIDI stuff on my spare programming time and hope to make a career out of it some day. Follow your interests.
If you are in the market for some Ajax knowledge, you should check out Relevance LLC's reviews of Ajax books. A couple of smart guys. They have reviewed 7 books so far.
This is not the sig you are looking for...
While I tend to agree that you need to keep your skillset up, as not to appear at the bottom of the development ladder, I must say from what we have used of AJAX here at work, it is something that I would have to recommend to any developer out there that works with web applications. However, jumping on the bandwagon and learning AJAX just because its the newest and greatest thing does seem rather stupid. Keep your skill setup by Learning to learn new and exciting things while incorporating it into work. Why learn something on your own time when it can make you more productive at work, while learning it on the job?
-- Josh
"Whoopie! Man, that may have been a small one for Neil, but that's a long one for me!" - Pete Conrad
...when arriving home after a 10-hour day at the office programming...
;)
Dude, if you had just developed it in AJAX you'd get it done in half the time.
Developers: We can use your help.
"However, when arriving home after a 10-hour day at the office programming, who has the energy to plow through yet another new facet of emerging technology? "
me
anyone who doesn't is just making an excuse. get busy living or get busy dying. the choice is yours.
Amazon has it about $10 cheaper than BN.
Expert Java EE Consulting
Here's a list of 20 AJAX online tutorials:& p=2212&#entry2212
http://121space.com/index.php?showtopic=1875&st=0
It's moving so fast I'd be hesitant to grab a book yet -- YMMV.
fak3r.com
TEN
HOUR
DAY??
is that what passes for exhausting to the new crowd of code monkeys?
That is the best one can do. Chasing a new skillset as soon as you enter the market can be dangerous for some.
/environment with fair ease.
Once you have understood how programming languages work (the usual combo of C/C++/Java ought to teach you most of it) you will have a fair idea of what to expect from other programming environments. Once you have that you can pick up any new programming language
I haven't done much Ajax programming at all (I've used a combo of javascript and iframes once. Does that count?) but from what I've heard it is simply a pickle of javascript+xml+iframes. So I guess as far as the code language is concerned it shouldn't be a problem.
Odd you should mention this on exactly the day the company you're constantly shilling for delivered their latest release.
Just don't try to snort it! "Look, it's turning blue!" (I forget what movie that was from.)
What if the Hokey Pokey really is what it's all about?
... and just about any paradigm will do. However, the problem is that most developers don't have the basic skills in the basic tools of their trade:
If you need a new book every time some new acronym for a combination of those three things, you'd better check your skill set.
when the reviews for
1. allergy SOAP
2. mental block SOA
3. fractured XML cast XSL
4. on rails Ruby
?
I had another sig before, but this one is better
I realize this will remove 20 points from my geek rating to say "wow, this stuff is really easy" because we're the wizards with the black boxes that do magic stuff that confuses mortals...but jeez, this AJAX stuff is pretty simple. Do a 10 minute tutorial and say "Huh, so that's it..."
And basic AJAX skills CAN be acquired with a 10 minute tutorial if you know a little javascript and a little of any CGI-type backend (PERL, ASP, PHP, PLONE etc.)
Don't be afraid of the hype if you feel you don't have the time to learn. Any web programmer needs to know this, and it's pretty simple. Sure, you can do some weird cool stuff and get complex, but the concept is simple and you don't need to learn anything really new.
Take a tutorial now. At work. I mean, the stuff on the screen is still just magic inscriptions and incantations to the non-geeks and PHBs anyway.
Someone who's stupid enough to give his/her employer 10 hours of time, when the employer has paid only for 8, probably isn't smart enough to learn new stuff anyway.
I tried Ajax when I first heard about it, which I think was when it was first gathering mass. Initially, the responseXML DOM object was a pain in the ass and that made me stay away from it. After I accepted that it would be difficult, I moved on to sending values back with responseText. That proved to be very easy. Then, I found that constantly creating XMLHttpRequest objects and setting up the proper parameters for IE vs. Everyone Else was a pain in the ass and that made me not like it. Eventually I found out about prototype.js, which was nice. I ended up ditching it because it was a little bloated to be used for Ajax-only stuff. So, I wrote my own JavaScript Ajax "class" to handle all the sending, waiting, receiving, and callbacks. I even have it create an associative array representation of the XML and "trace" so it looks like a print_r'd array in PHP. All I have to do is set the Ajax object to a variable, call a function in the object (that specifies the file to query, the post string, and the callback function), write the callback function, and write some php. It makes Ajax painless.
My point is: If you want to "learn" Ajax, learn how it works, write a class that does the stuff you will typically do, then use the class. It'll save you tons of time, code, and frustration in the end. Ajax is actually worth using now and has helped my company separate PHP code and HTML in our intranet web apps without using a template engine, which makes our PHP guy happy that I'm not fudging with his code and makes me happy that our PHP guy isn't fudging with my design.
Totally unreliable, why waste your time?
Oooh! Ooooh! AJAX reference. That means I can legitimately mention my AJAX message board and viewer counter, that's to be found at calum.org!
Please try it out before you mod me. It's not bad, if I do say so myself.
Get your own free personal location tracker
However, when arriving home after a 10-hour day at the office programming, who has the energy to plow through yet another new facet of emerging technology?
It's called aging, kid. Welcome to the club!
Sorry, that'll be a long wait. I don't have that much free time that's not already allocated to work, family, or F/OSS participation. Thanks for being interested though; glad to hear you apparently enjoyed the review. 8^)
Barry Hawkins site: www.alltc.com weblog: www.yepthatsme.com
is Head Rush Ajax like Atom Heart Mother?
Travelling forward in time at a rate of 1 second per second.
The AJAX technique appears to be pretty simple. To me, it looks just like RPC. I've been pouring over the Google Maps JavaScript. It appears to marshall (unmarshal) native data types to (from) XML, which it exchanges with the back-end server over HTTP. The hard parts, I imagine, are in developing the XML style sheet (i.e. the RPC protocol itself) and in creating the user interface (i.e. the RPC client). The only documented samples out there mimic Google Suggest, which is pretty straightforward when compared to Google Maps. I wish better public documentation and tutorials existed.
I'm proud of my Northern Tibetian Heritage
Ajax doesn't matter until we get raw headers and server push. Until then, it's limited to server-pull, polling, and web servers.
StoneCypher is Full of BS
Find something else to do.
I got out of IT completely because of the constant pressure to learn a new skillset every few months. And for what? Increasingly criminal PHBs and diminishing returns.
I'm a farmer now.
I have to know. Were you able to deobfuscate the Google Maps js code? I looked at that before and it looked like they turn every line into a new function with cryptic names.
Working on Firefox and IE6 only isn't highly cross-platform (and that's the case with most of these apps). That's Medieval Internet ruled by NN+IE.
Google's apps turn out to be more challange than Acid2 test (Safari and Opera are constantly screwed by not-so-standard and not-so-valid "OMG AJAX" code).
180 SQL
100 Java
50 C++
40 C#
5 AJAX
20 PHP
2 Python
To tell some Programmer that they need to learn AJAX is internet meme following BS. If you want a job now, or in the next year or so, solid Java and SQL skills are the main thing you want followed by C++.
In 5 years it may be AJAX - but AJAX may happily go the way of SOAP and Web Services and become a buzzword that didn't take off and is now just a small segment of the market.
Thanks for the excellent review. This type of article is what made /. great.
Kids are no excuse. If you are driven to want to learn new things you will find ways to make the time. I have two kids and the ol' lady works swing shift so I am on my own taking care of them for the evening after work. After they are sleeping it's possible to find time to do lots of thing and depending on what it is you want to do you can do it with them. In spite of not being childless, I manaage to find time to read books(mostly technical but sometimes more recreational), go for walks with the kids, take the kids for a bike ride in the bike trailer, I recently took up the guitar(I've never played an instrument before), mess around with new things in my home lab, play with the kids, clean up around the house and throw a fuckin' on the wife at every opportunity(or maybe two on a good day) and sometimes we'l even get a chance to go and hang out with some of our friends or see their band play or whatever. You won't get much done sitting in front of the boob tube(or constantly reading Slashdot) but there shouldn't be any reason you can't learn new things unless you aren't motivated. Oh yeah and sleep is overrated. You might not be able to all of those things everyday but if you spread it out, finding a little time few days a week isn't unrealistic. The key is to not sit still, keep moving.
Jerky
--
What is pirate software? Software for inventory of stolen treasure?
I hope we're making headway towards "web 3.0" because although AJAX is nice for document-centric pages with some app functionality, it's still HTML underneath and you can dress up a pig, but....
AJAX is like a house of cards, and when a browser vendor screws up on a revision it'll all come tumbling down. Div tricks are nice and all, and I expect that there will be a couple javascript frameworks that rise above the rest, but if I'm going to do an app in a browser then I'll just bypass all those headaches and use Flash.
Once WPF/E makes it into the vast majority of browsers, things are going to change.
AJAX *can* accomplish some cool things, there's so doubt. But to pretend it's NEW and COOL and the FUTURE is sad. I won't add too much to your post - you said it very well.
I think that idea can and should be applied much more generally. For example, I can't speak for others, but I find file reading and writing to be a pain in the ass in Java (the only non-web based programming language I know at the moment). So what did I do? Made a class for opening and saving text files painlessly as arrays of strings. Maybe not the most efficient thing option, but it's a hell of a lot easier and it's really not that bad.
I think that should apply to pretty much anything. Whenever you encounter a moderately complex piece of programming that doesn't work the way you'd intutively expect it to, make a library so that it DOES work the way you'd intuitively expect it to.
Man , you're just Mr Fuckin-Amazing arn't you. Do you wear a cloak and stand
around with your fists on your hips a lot while surveying us lesser mortals
and just shaking your head in disbelief that some people just like to relax
after working their arses off in an office for 10 hours?
"Oh yeah and sleep is overrated. "
Yeah , whatever. Idiot.
Flash might make your life easier but its a pain for us users. Slow to low and
startup , usually with some irritating intro the spotty faced adolescent who
programmed it thought look "Kool", not to mention the fact that flash on certain
platforms has bugs that stop it working properly and worst of all , NO HISTORY!
If I've spent 10 mins navigating something I DO NOT want to end up back at the
start just because I pressed the back button!
Flash is fine for games, for grown up stuff its garbage.
Is Chuck Norris posting to slashdot now?
To have a right to do a thing is not at all the same as to be right in doing it
Great post sien - thanks for the real data!
- The Kessel run is for nerf herders. I can circumnavigate the entire Central Finite Curve in a lot less than 12 parse
Chuck Norris doesn't sleep. He waits.
Well I don't have a cloak(or cape), didn't you see what happened to those poor chaps with their capes in the incredibles. It's just asking for trouble. It is flame and heat resistant, though.
Get it straight next time fucko, it's Mr. Unbelievable not Mr Fuckin-Amazing. That's my cousin's name.
Cheers
--
What is pirate software? Software for inventory of stolen treasure?
Not another ajax book =/ Macromedia (now Adobe) "Flash", has been doing RIA's long before AJAX ever became a buzzword and is still a better option than javascript trickery if you ask me
You can track the lowest prices for "Head Rush Ajax" at AlienEgg here:r l=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F059 6102259%2Fsr%3D8-1%2Fqid%3D1147660457%2Fref%3Dpd_b bs_1%2F103-7060747-4119064%3F%255Fencoding%3DUTF8
http://www.alienegg.com/lowest-price-finder.php?u