Surveying, Mapping and GIS

Exploring all aspects of mapping and geography, from field data collection, to mapping and analysis, to integration, applications development and enterprise architecture...

  • Geospatial Technology, End to End...

    Exploring all aspects of mapping and geography, from field data collection, to mapping and analysis, to integration, applications development, enterprise architecture and policy

Head Rush Ajax

Posted by Dave Smith On 4/09/2007 08:35:00 PM 3 comments

As I mentioned a few days ago, I was just finishing reading one of the books in the "Head First" series that Kathy Sierra developed, namely Head Rush Ajax by Brett McLaughlin.

This is a fun read. It really makes Ajax very easy and accessible, with a fun dialogue, irreverent and entertaining style, and plenty of practical examples and online code to work with. I have been playing with Ajax code since around November of 2005, but largely just hacked my way through most of it, brute-force-style, without any coherent source of information, other than the school of hard knocks.

As such, I figured there might be a few areas where I might grumble through the but given there were a lot of things that I already knew, but on the other hand I still learned quite a few nuances and new things while reading this book.

The book presents Ajax in a good, progressive way, with bite-sized yet savory nuggets, which all contribute to a soundly filled tummy full of Ajax. Unlike many of the technical tomes I digest routinely, this one didn't put me to sleep. It was deceptively simple in how the book followed a linear progression, with each piece building upon the one before it - it's not at all written "reference-style" with disconnected globs of information as so many other technical tomes tend to be.

True, some parts of the book were still perhaps overly "nØØb"-oriented (for me at least) and overly rich with "greasy kid stuff" but that's not necessarily a bad thing. The way that the book tackled otherwise sticky topics, such as navigating and managing the DOM was nice, as were the ways in which a request is sent, processed and received. All in all, the presentation was quite robust, with no meaningful detail omitted.

The only downsides: 1. The emphasis on JSON toward the end. I have expressed my bias and concern regarding JSON before, mainly as I still cling to the paradigm of not only server-to-client communication via XML, but also server-to-server communication. 2. It had a PHP focus - I don't deal much with PHP, mainly .NET and Java.

As an aside, two things I'd like to see some objective study someday on:

  • How truly bloated is XML, compared to JSON? Seems JSON can suffer from its share of bloat as well.
  • How much is JSON supported on the server side. Not just libraries for generating JSON, but also libraries for parsing and processing JSON? What languages? Seems to me that generating JSON might be the easy part, even doable through XSLT transforms - but parsing?
But I digress... I'd definitely recommend the book for anyone just beginning to dip their toe into Ajax - all you really need is the most basic understanding of JavaScript and perhaps some CSS and HTML. Head First Labs supplies the pizza ;^) Well done, Mr. McLaughlin.
Paperback: 446 pages
Publisher: O'Reilly Media, Inc.
(March 28, 2006)
Language: English
ISBN-10: 0596102259
ISBN-13:
978-0596102258
Product Dimensions: 9.2 x 8 x 1.1 inches

3 Response for the " Head Rush Ajax "

  1. Anonymous says:

    Libraries for parsing JSON? See the tail of http://www.json.org/: there's something for almost everyone. You'd think it would be trivial for Python, which has a syntax similar to JavaScript, but there are enough little details that I'm happy to leave to simplejson: http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.7/docs/index.html. I can't imagine the tools for other languages lag behind Python's.

    We're not using JSON because it's lighter than XML, but because it's simpler for non-document data, and to exploit the well-known hole in the browser's security model.

  2. Anonymous says:

    There are at least 4 libaries out there for parsing JSON in .NET
    2 you will find on the json.org page mentioned above.
    The other 2 are:
    NiiJSON (on CodeProject I think. I have in on my computer but can't seem to find where it came from)
    AND
    System.Web.Extensions from the ASP.NET Ajax Toolkit

  3. Anonymous says:

    As others have mentioned, many libraries exist for parsing JSON. But if you were using json in the browser, you don't need a parser either. I guess given the book was discussing ajax and (IMO) since json is a natural fit, they would have given the importance they did to json.

Search