Welcome!

AJAX & REA Authors: Lee Novak, Brad Abrams, Alin Irimie, Jonny Defh, RealWire News Distribution

Related Topics: AJAX & REA, Web 2.0

AJAX & REA: Article

AJAXWorld: Top 10 Lessons Learned Using AJAX

It's time to implement AJAX in your next Web application

The Web 2.0 phenomenon of the last couple years - which has been picking up steam recently - is largely dependent on AJAX. This concept is beneficial to both the developer and user, as it makes programming Web applications more fun while enhancing the user experience.

As a developer I see the tremendous value AJAX brings to the table. I really enjoy the power of a desktop application...while working on a Web app. And as a Web user, I experience better functionality, speed, and usability on a Web page. It's so much more interactive and responsive without the hassle of being bogged down by typical Web activity. Plus, it's pretty neat to click on something and see it populate dynamically, without a single change on the rest of the page.

Since AJAX is an umbrella technique, not tied to any specific frameworks, I'm free to select any number of platforms on which to implement it. In my experience, Ruby on Rails is probably the best choice. To begin with, there is a considerable amount of AJAX help built into Ruby on Rails - it's quite good and makes everything rather convenient too. Ruby on Rails has nice ways it can generate JavaScript for developers so that they don't have to write it by hand, but handwritten client-side JavaScript is especially good for filtering, sorting, and adding new fields. By combining these techniques, the resulting application is more responsive and user-friendly. This is not to say that Ruby on Rails is universally considered the best AJAX framework, because some developers like frameworks that are programmed through a drag-and-drop GUI; Rails requires good old-fashioned coding. However, in my opinion, Ruby on Rails is the route to take for Web 2.0 development. At OpenLogic, we made the switch to Ruby on Rails from Java a little over a year ago and haven't looked back since.

AJAX at OpenLogic
I've personally used AJAX quite a bit in building applications at OpenLogic. It's been a huge plus for us. It's made our user interface nicer, faster, easier to use, and more responsive to the user. AJAX lets me deliver something like a desktop application to my users - something that really appeals to me. Part of this desktop-like experience is that users get nearly immediate feedback. At OpenLogic, we use AJAX for a variety of purposes and in a number of programs. For example, in OpenLogic Exchange, we use it for tasks such as populating dropdowns, validating data, filtering, and sorting. We also use it for more advanced features like letting users build up a complex enterprise open source policy by allowing and denying a combination of packages, versions, and licenses all without requiring a full-page refresh.

Top 10 List
Besides my work with AJAX at OpenLogic, I've had quite a bit of experience using it in both the finance and telecommunications industries. So, without further ado, here are the top 10 AJAX lessons learned:

Use AJAX, but Make It Seamless
Web 2.0 applications are "applications" first and "Web 2.0" second. This means developers need to think in terms of application flow and user interaction rather than spending time looking for an opportunity to inject some AJAX. There will be great places for AJAX in a modern application without forcing it. Generally speaking, use AJAX conservatively for things like populating dropdown lists, filtering and sorting tabular data, pre-filling forms, adding new comment fields to a page, and the like.

More Stories By Rod Cope

Rod Cope is the CTO and founder of OpenLogic. He is a Sun Certified Java Architect with 25 years of software development experience, including 12 years of Java. For the past six years, he has been working on OpenLogic Enterprise, a certified, managed, updated, and supported collection of over 350 Open Source projects for Java developers. Rod routinely speaks at technical conferences such as Java Symposia and the O'Reilly Open Source Convention and has been selected as one of the Top 10 presenters at JavaOne.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.