Feeds

Ajax Hacks

Playing with AJAX

3 Big data security analytics techniques

Book review Everybody loves Ajax. Javaists, Rubyists, Pythonistas; even Microsofties get to play with Ajax in the form of Atlas. Book publishers love Ajax too, judging by the stack of new titles coming hot off the presses.

O'Reilly has added to the pile with a new title in their long-running "Hacks" series. The aim of the series is to present developers with a series of hacks, tricks, tips and gee-whiz moments. Think of it as a good place to dip-in for ideas, examples and code that can be lifted and re-worked for your own projects. Each book presents a numbered sequence of these "hacks", organised thematically so that readers can easily home in on the topics they're interested in.

With a relatively new technology like Ajax there are going to be many readers picking the book up with little prior knowledge or understanding of how it all works. Therefore, the first chapter of the book is devoted to explaining how Ajax implements asynchronous communication between the browser and server, and where JavaScript and XML fit into all this. It discusses the document object model, browser incompatibilities, alternatives to XML (in the form of JSON) and so on. In short, you have all the elements of an introductory tutorial; however, it is broken up into a sequence of "hacks" – which is a structure that doesn't really work in this case.

The next two chapters – web forms and field validation – are also largely tutorial in nature. They pick up from the basics and present code to actually do some useful bits and pieces for creating forms and validating fields on the fly. It's at this point that the appeal of Ajax really becomes clear – no more having to round-trip to the server to check that users have entered valid credit card details, email addresses etc.

The gee-whiz element really kicks in with chapter four's collection of mash-up hacks for dynamically aggregating content from Google, Yahoo and other sites. Where novice Ajax programmers will find the first few chapters most useful, it's here that more experienced developers are likely to get excited.

From then on, the book focuses on some of the other technologies and libraries that work with Ajax. The first of these is the DWR (direct web remoting), which enables Java developers to easily map between Java objects on the server and JavaScript code on the client side. Ruby developers shouldn't feel left out as they get a chapter on using Ruby on Rails with Ajax. And for JavaScript there are chapters that look at Rico, Prototype and the script.aculo.us libraries.

The final chapter looks at some of the more thorny issues that Ajax applications have to deal with. For example, what does the back button do when your application is hosted pretty much on a single web page? In a data-heavy application, hitting the back button could cost your users a lot of lost work. This and other deployment issues get hacks devoted to them in this closing chapter.

While there's a lot to commend the book, there are a couple of things to note. The first is that this is clearly not the best book for someone wanting to learn Ajax from scratch. Ajax In Action (reviewed here), provides a more thorough grounding. Secondly, this is a fast moving area of software development with new tools, techniques, and libraries emerging all the time, so there's something of a timeliness issue to bear in mind.

Ajax Hacks

Verdict: While not the ideal beginner's book, it has some good ideas and is designed to appeal to a range of developers wanting to get in on some Ajax action.

Author: Bruce Perry

Publisher: O’Reilly

ISBN: 0596101694

Media: Book

List Price: £20.99

Buy this book at Register Books, at Reg Developer's special discounted price. ®

Top three mobile application threats

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Inside the Hekaton: SQL Server 2014's database engine deconstructed
Nadella's database sqares the circle of cheap memory vs speed
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
IRS boss on XP migration: 'Classic fix the airplane while you're flying it attempt'
Plus: Condoleezza Rice at Dropbox 'maybe she can find ... weapons of mass destruction'
OpenSSL Heartbleed: Bloody nose for open-source bleeding hearts
Bloke behind the cockup says not enough people are helping crucial crypto project
prev story

Whitepapers

Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.