7
A
u
g
u
s
t
2
0
0
6
Ajax Properly
Approximately 6 months ago, I developed a feature for one of our websites enabling one-click downloads of Microsoft Word mail merge documents, automatically hooked into the results of a database query. To do this seamlessly, I used Ajax, and built the feature using a PHP Ajax library called cpaint.
It ended up being a bit nerve-wracking to develop, and frankly a little bit difficult to understand. However it does work.
Since then, we’ve discovered three essential Javascript libraries which help build interactive websites:
The last of these includes Ajax support, including in-place editing (should you need it). Over the past couple of days I’ve worked on a dashboard view for the aforementioned website. The dashboard provides users with a one page summary of everything that’s important to know.
These libraries have made the development so much quicker, and easier to understand. During this weekend I added another component to the dashboard which provides up-to-date sales summaries for a week, including in place editing for additional sales figures. However, rather than use the in place editing feature provided by Scriptaculous, I wrote my own because I needed particular control over how it behaved, and how it affected other parts of the page.
That’s not all though. One huge benefit was provided by the essential Firebug Firefox add-on, which includes diagnostic support for XMLHTTPRequests (the cornerstone of Ajax).
All of this makes developing interactive web applications so much easier, and indeed a pleasure.

Leave a Reply