When Written: Aug 2007
I get many emails from readers who are frustrated at the difficulties of implementing AJAX type functionality within their latest web application project. Even sizable companies seem to be avoiding adding AJAX functionality for the time being. When I speak to them about their future developments they all claim that they are ‘looking into AJAX’ but not too much else is forthcoming so far. One of the reasons for this seems to be the apparent lack of good design and debugging tools for AJAX. As is often the case with new and emerging technologies, the development process can be a slow and clumsy process. Lets face it even debugging Javascript which has been around for years is still a non-trivial exercise and one is often forced to resort to adding ‘alert’ boxes to pop up with variable values in an attempt to see why things are not working the way they should.
One way to ease the development cycle is to use pre-made libraries of functions that you can call from your own code. The benefit of this is that the library code has often been optimised to work with all the browsers and most of the bugs have been ironed out. The drawback with using libraries is that they can be large and the code convoluted which can lead to slow page load times. Another thing to consider about using AJAX, is just how and where it will benefit your users most in your web application. Not all areas will benefit from AJAX, whilst others can be transformed by a little thought and a few pieces of code. Most of us trawl through the ‘net’ looking for help with such tasks; however I often find having a good book on the subject beside you can help enormously. One such book that I can recommend is ‘Adding Ajax’ By O’Reilly which covers the use of many of the Ajax Libraries such as ‘Prototype’ , ‘Script.aculo.us’ , ‘Rico’, ‘Dojo’, ‘jQuery’, ‘MochKit’, ‘YahooUI’, ‘mooTools and moo.fx’, ‘Sarissa and ‘WZ_jsGraphics’ . The book also covers writing your own AJAX effects without the use of Libraries, so all in all it’s a very valuable to have this by your side or to read whilst on holiday while you dream of that really cool web application that you are going to build when you get back.
If you want to add some alternative AJAX functionality to your web site you could not do much better than to look at all the samples at http://miniajax.com these are really very good and easy to implement generally. It will certainly give you plenty of ideas, just don’t make the mistake many made with animated gifs in the early days of the web and overdo things!
Article by: Mark Newton
Published in: Mark Newton