As more developers adopt the practice of AJAX-style development to create more interactive applications, they are looking for tools to make the job easier.
One such tool is jQuery, which some users say makes AJAX (Asynchronous JavaScript and XML) development cleaner by making using JavaScript easier. JavaScript is notoriously difficult to work with, said a group of experts at Microsoft’s Lang.Net symposium in early August, in Redmond, Wash.
John Resig, the creator of jQuery, said the technology reached its 1.0 release on Aug. 26. jQuery is essentially a new type of JavaScript library that allows developers to work “unobtrusively” with JavaScript.
Resig, in Cambridge, Mass., said jQuery is “not a huge, bloated framework promising the best in AJAXnor is just a set of needlessly complex enhancementsjQuery is designed to change the way that you write JavaScript.”
Resig, a recent graduate of the Rochester Institute of Technology, is working on a book called “Pro JavaScript Techniques” for Apress Publishing.
Writing JavaScript should be fun, Resig said, and jQuery brings fun to the process by taking common, repetitive tasks, stripping out the unnecessary markup, and leaving them short, smart and understandable, according to the project’s Web site.
Click here to read about how developers are working to overcome AJAX accessibility issues.
In an interview with eWEEK, Resig said he saw that Web developers had a definite desire to write unobtrusive JavaScript code, but in a manner that was simple and effective.
“One of the goals that I set out for myself was to write the most understandable JavaScript code in the fewest number of characters possible,” he said.
Ever since the initial public release of the technology in January of 2006, much of the jQuery technology’s development has been driven by feedback from its international community, Resig said.
“Having the feedback of hundreds of professional Web developers is completely invaluable to building an effective JavaScript library,” he said, adding that getting to the 1.0 release took about seven months and involved the work of several different developers.
Resig said he set out to develop something that would be more effective for his work than what was out at the time. The technology that most influenced his thinking was Behaviour, a JavaScript tool created by Ben Nolan, technical director of Projectx Technology, in Wellington, New Zealand.
But Behaviour just didn’t go far enough for Resig. In a blog post on Aug. 22, 2005, Resig wrote, “Looking at how Behaviour works, I’ve never been completely happyit simply seems too tedious and verbose for everyday use. I’ve since begun to tinker with different styles of code layouttrying to find an optimal solution.”
Indeed, “jQuery started out of a series of personal challenges to myself,” Resig told eWEEK. “I wanted to write a CSS [Cascading Style Sheets] Selector parsing engine for JavaScript and write a smaller version of the popular moo.fx animation library. It is from these pieces of code that the jQuery library was molded.”
After he started to show his early code to fellow Web developers, they encouraged him to build it out, Resig said.
Moreover, Resig said he believes jQuery is important in the JavaScript world because he sees it as “one of the few JavaScript libraries that tries to treat its users with a sense of respect; by actively maintaining thorough documentation and directly responding to user feedback.”
In addition, jQuery actively follows a couple of ideologies that tend to make it rather unique, Resig said. “It actively promotes short, simple code and small file sizes. It is through these ideals that much of the popularity [of] jQuery has grown,” he said.
Indeed, the technology has been used by developers of commercial Web sites such as Technorati and FeedBurner, as well as of open-source projects such as Drupal, Trac and CakePHP, Resig said.
Cody Lindley, a professional Web developer in Boise, Idaho, said he is a user and fan of jQuery. Lindley said he was familiar with Behaviour, and while Behaviour “does a great job” of filling in the gap between pre-packaged libraries, it is not a total solution, he said.
“I would prefer a total solution instead of using the Behavior script, in addition to a JavaScript library,” Lindley wrote in a blog post.
Lindley said that for a long time a full-featured library was not available. “That is, in my opinion, until now,” he said. “It would seem that JQuery has arrived on the JavaScript library scene to fill the gap. This self-proclaimed ‘Fun’ library just might fit the bill, and appropriately so! JQuery actually supplies a total event solution with the library.”
Aptana, a company based in San Francisco, will be delivering jQuery with the latest release of its Web 2.0 IDE (integrated development environment) software. The Aptana IDE, still in beta, now includes the ability to import jQuery’s JavaScript library into a Web project. The project sets itself up with an included sample page that was created by Cody Lindley, which demonstrates how to use jQuery, said Aptana’s founder Paul Colton.
In choosing the initial set of AJAX libraries to be included with the Aptana IDE, “We wanted libraries that represented the same principal that we were trying to achieve with Aptanafast, free, lightweight and easy to use,” Colton said.
He said he also was “impressed” with jQuery’s rich feature set, “extreme ease of use, and extremely small size. It seemed like a great library for our users to work with, especially for new user of Web 2.0 techniques.”
Check out eWEEK.com’s for the latest news, reviews and analysis in programming environments and developer tools.