Ajax interactive interface techniques are a spreading everywhere since the arrival of web applications like Google Suggest, Google Maps, GMail and many other high profiled web applications. It is even truer considering that Ajax techniques are intimately bounded with the most popular Web 2.0 applications.

Despite the fact that the term is used everywhere and that more and more web developers are using its techniques, Ajax remain mysterious and his techniques misused and sometime obscure. Dedicated web sites to Ajax’s development are opening and people start to standardize its development techniques and deployment.

If you start checking how to develop Ajax applications, and think that Ajax is a Greco legendary warrior, you will probably be lost in all the paths you searches will lead you. It is not an easy task, at first, to know what Ajax is and is not. Many web technologies are implied in Ajax application development like: JavaScript, XML, server-side programming languages, many different browser technologies, etc. Trying to make some order in all this information is a daunting task.

Mrs. Parker of Apress contacted me last week to ask me if I would like to review one of their new books: Foundations of Ajax. Considering what I said before on current state of Ajax development techniques’ documentation, I naturally said yes. I would had like to read that book before starting to develop Talk Digger, the Ajax interface’s development pain would had been greatly diminished. My goal by reviewing this book is: helping you to find the right tools and techniques to start on the right foot when developing web interfaces using Ajax techniques.

To whom the book is intended?

The book is intended to intermediate and expert web developers. The premise of the authors is that you already developed and implemented web sites and applications. They will not spend time to teach you what a server-side programming language is or how to create a function in JavaScript; they will teach you what are the best Ajax techniques and the available tools.

Where Ajax came from?

The first chapter is dedicated to the history of Ajax: where it came from and what motivated the development of technologies supporting it. The history of Ajax is the history of the evolution of web applications: CGI, Applets, Java, Netscape, the browsers war, servlets, server-side programming languages, Flash, DOM, DHTML, XML, etc.

How Ajax emerged from this evolution line? How should I use it? What do I need to know prior starting to develop Ajax applications? What do I need take into consideration when starting the design of my next Ajax application? All these questions will be clearly answered by the authors.

I want asynchronism

The most important feature of Ajax techniques is the possibility given to a web browser to asynchronously interact with a web server using an object called XMLHttpRequest. What it is all about? Which possibilities this object gives you? How could you use it to enhance the usability of you web site?

Then, what do I do with that information?

Once you mastered the asynchronous interaction between your application and a web server, you have to master the techniques to dynamically change the content of a web page. You have to take the received information and display it to the user by changing the DOM document of the web page. The authors will explain how a DOM document works and how to modify them to make a web page dynamics.

Many basic Ajax techniques used on popular websites are then explained: how to validate code, how to create an auto-refreshing web page, how to display a progress bar, how to create tooltips, how to automatically update a webpage, how to access a web-service, and how to create an auto-completion combo-box.

At that point you have all the knowledge necessary to create Ajax applications. The only other thing will you need is imagination and creativity to make all these things interacting together in such a way that people will say: ‘Wow!’ when they will use your interface.

I learned how to develop Ajax applications – now what are the tools that can help me to develop web applications with Ajax techniques?

Any developer wants a development environment with the best development tools. They want these tools to help them to quickly write better code. This is the exact purpose of the second part of the book: creating a toolbox for Ajax developers. The authors will describe the best available tools, what they are used for, and what is the best way to use them to develop Ajax applications.

You will find tools to write documentation on your JavaScript scripts, to validate the content of your HTML files, to inspect your DOM documents, and to compress and obfuscate your JavaScript code.

A whole chapter is dedicated on JSUnit: a unit-testing program for JavaScript. They explain how to install and use it. You think that you are losing your time implementing unit tests into your applications? Well, it depends on the length and complexity of the project you are working on. However, more often then not, you will save a lot of time on the long run. It helps you to validate that the new changes you do in one script do not affect any other functionalities of your web application before putting the modification online. Do not forget, we are talking about a web application: as soon as you save it on the web server the modifications are took into account by all users.

Finally, what would be a developer’s toolbox without debugging capabilities? Nothing. JavaScript debuggers for both FireFox and Internet Explorer are described at length.

Conclusion

What I liked while reading this book is that the authors tell you the truth about the current state of Ajax applications’ developing. Technologies that support Ajax are old, but their interactions are young. I expected, and always expect, various programming errors and problems on many web browsers while developing Talk Digger or Lektora. Many times you have to use some programming tricks to make it works the same way on all the available browsers on the market. I can’t hide it to you: it is sometime a real pain. The authors are aware of that situation and tell it to you without reserve.

This is a definitive book for web developers having to spring into Ajax’s application development world. It will show you the most effective programming techniques, tips, and tricks to create interactive web pages. It will explain you how to use the best free available tools to create your Ajax developer’s toolbox. It is an interesting reading striped of any fluff with an incalculable number of illustrations and examples.

5 thoughts on “Review of Foundations of Ajax

  1. Hi again Fred.

    Thanks for posting this review. Are you able to elaborate on the comments at the start, i.e. which techniques do you feel remain obscure and in need of documentation?

  2. Hi Mr. Mahemoff,

    Thanks for your comment, it’s a good point and probably something I have to clarify. The fact is, if I think back when I started to check at the world of Ajax, I have been a little bit lost at first. The term and techniques are somewhat young. If you check on Amazon.com for example, most of the “Ajax” books are not yet released. I was reading that Google Maps was an application using the so-called Ajax techniques but they were not telling me what I could and could not be able to do with these so called Ajax techniques. More and more good source of information on Ajax, like yours, are emerging. However, people have to find them to benefit from their knowledge.

    This said, the information is there but distributed everywhere. So if you are a web developer that does not have days and weeks to search for the good information, the good practices, and the good development tools, you will probably be a little bit lost, and see the whole thing as “mysterious” (I know, the term is probably a little bit strong). However, it is what this book is intended to: a complete source of information, clear and quickly readable, where you can find all the information you need to start developing with the Ajax Techniques and to know what are the best development practices to develop strong Ajax interface that do not fall behind the caprice of each individual web browser.

    Hope it clarify a little bit my assertion,

    Thanks

    Salutations,

    Fred

  3. This blog entry was added to the Ajax resources search engine at: http://www.rawsugar.com/collections/guyt/ajax

  4. That sounds like a nice book. Definitivly on my list. I looked at Ajax a couple of weeks ago and it sounds promising. I understood the XML async request thing relativly easily, but I haven’t got any good reference or web sites on how to manipulate HTML DOM with JavaScript. Do you have any good pointers on that?

    Alex

  5. Hi Fortrel,

    Great. Sure it is, even more considering ideas like SPARQL-AJAX programs 🙂

    Not really too. Wha I do is to use the DOM Inspector FireFox extension and the “Inspect Element” extension. Then I check how the DOM documents are builded with these tools and follow the path with the javascript functions that enable you to play with it. It works fine for me. But if you find some, please post them here 🙂

    Thanks,

    Salutations,

    Fred

Leave a Reply

Your email address will not be published. Required fields are marked *