Welcome!

APIs for the Internet of Things

Max Katz

Subscribe to Max Katz: eMailAlertsEmail Alerts
Get Max Katz via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal

RIA & Ajax: Article

Happy Birthday, Ajax4jsf!

A progress report

Ajax4jsf has turned one and what a year it has been. It was an amazing ride for all of us here at Exadel. The popularity of Ajax4jsf is evidenced by the size of the community, available resources, examples, blog entries, and articles. Also, a significant number of organizations today use Ajax4jsf in production. Ajax4jsf is an open source extension to JavaServer Faces (JSF) that adds AJAX capability to JSF applications without requiring the writing of any JavaScript. So, after wishing Ajax4jsf and those who have worked on it a heartfelt "Happy Birthday," let's take the time to reflect on this whirlwind of a year.

The Road to Ajax4jsf
First, we'll look at the technological situation preceding the birth of Ajax4jsf. In doing this, we'll look at the "jsf" piece, then the "Ajax" piece, and finally the "4" piece.

JSF
JavaServer Faces is a standard component-based user interface framework for building Java-based Web applications - with the emphasis on component-based. It's now about three-years old. In the past year, interest in JSF has dramatically increased. At Exadel, we've seen one example of this with users of our IDE. Exadel provides an Eclipse plug-in for visual and source development that includes support for JSF, Struts, and Hibernate. In the past year, roughly 90% of all downloads of the plug-in were for JSF development.

It's not surprising that JSF has become so prominent. First, it's a standard, developed through the Java Community Process, and a part of Java EE 5. Second, and more important, it brings component-based development to the Web. As a developer, you design the application from reusable user interface components - those of you with Swing or ASP.NET experience should be familiar with this approach. These UI components, also known as controls, can be as simple as a submit button and as sophisticated as special trees, tables, and menus. A quick search on the Internet will provide abundant evidence as to why JSF is the best technology to use today for building Web applications.

AJAX
In the past couple of years, a great deal of buzz has emerged over AJAX. It's not about the cleaning stuff (or the soccer team from the Netherlands or the ancient Greek hero). In this case, it stands for Asynchronous JavaScript and XML. AJAX is basically a collection of existing technologies for radically changing the user experience on the Web. To create this richer user experience, AJAX lets you create rich Internet applications. These are applications that are rich, interactive, and fast. The basic technique behind rich Internet applications is that only the part of the page that has changed should be updated. There is no need to reload the whole page. Such applications are sometimes referred to as Web 2.0 applications. (I'm sure you have heard this term already.) Rich Internet applications have grown tremendously in popularity in 2006, especially on the consumer side. Today, thousands of consumer Websites use AJAX functionality in one form or another. (Google Maps is probably the most popular one.) Enterprises have now noticed the benefits that rich Internet applications bring to using the Web and are slowly adopting these types of applications. While rich Internet applications deliver superior benefits to users, it's very challenging for developers to incorporate AJAX in these applications. It requires a lot of low-level programming (read: JavaScript, XML, DOM) and developers with the necessary expertise in the area. And then, it is not uncommon to spend 80-90 percent of direct AJAX development battling JavaScript and browser incompatibilities.

Combining AJAX and JSF
Using AJAX also poses a challenge for the JSF community. Starting to code in JavaScript alongside JSF UI components is not an option. It jumps outside of the JSF component model. A better solution is needed.

To figure out this solution, remember that JSF is based on components. Why not just have components that encapsulate all of the challenging AJAX functionality inside them? This way, using AJAX in development actually becomes pretty simple. This enables application development with extensive AJAX functionality without having to worry about low-level AJAX details like JavaScript or browser incompatibilities. Almost all such problems will have been ironed out by the component developer back when the component was tested and debugged.

Highlights on the Road to Ajax4jsf
To summarize the lead-up to Ajax4jsf, keep in mind these main points:

  1. JSF is a standard component-based framework for building Web-based applications.
  2. AJAX is a technique to make Web applications fast, rich, and more interactive.
  3. JSF and AJAX are a perfect match because of the JSF component approach (adding AJAX functionality through additional standard JSF components that provide AJAX features).
Now that the scene is set, we can move on to the actual birth of Ajax4jsf.

Ajax4jsf
Ajax4jsf framework was created and designed by Alexander Smirnov. In early 2005, he was looking to add a "hot" new technology along with the associated experience to his resume. About the same time, the concept of AJAX was being introduced by Jesse James Garrett, and JSF was starting to pick up steam. Alexander figured why not just merge the two, so it would be easy to have AJAX functionality within a JSF application. He figured this would be an excellent addition to his resume. He started the project on sourcforge.net and called it Telamon (taken from the Shakespeare play Anthony and Cleopatra). And, Ajax4jsf was born.

Alexander Smirnov Joins Exadel
In the fall of that same year, Alexander joined Exadel and continued to develop the framework. Alexander's goal was to create a tool that was easy to use and that could be used with any existing JSF component library. His understanding of the JSF framework and AJAX technology allowed him to architect and design a framework that today is used by thousands of people.

Visual Component Platform
The first version of what would become Ajax4jsf was released in March 2006. It wasn't yet a standalone thing. Rather, it was part of a product called Exadel Visual Component Platform (now known as Exadel RichFaces). The initial idea was to build components based on Alexander's framework and package them with the framework. RichFaces consists of sophisticated, ready-to-use JSF AJAX components. Underneath these components, Ajax4jsf provided the foundation.

Ajax4jsf Splits Off
In late April, based on customer feedback, we realized that our customers wanted more flexibility and control in adding AJAX functionality to JSF applications. Customers liked RichFaces components, but having direct access to Ajax4jsf would give them even more muscle in developing rich JSF applications. Responding to this feedback, we decided to move Ajax4jsf outside of RichFaces and make it a standalone open source project. The project was moved to the Java.net site, an incubator for open source projects sponsored by Sun. After setting up the project and getting approval from Sun, the project was launched at the http://ajax4jsf.dev.java.net Website as an open source project sponsored by Exadel.

Popularity of Ajax4jsf
On being spun off, Ajax4jsf started to become popular. People were pleasantly surprised at how easy it was to add AJAX functionality to the standard JSF components in their applications with an open source product. They didn't have to redo or re-create anything just because they wanted to add AJAX. As word spread, traffic on the Ajajx4jsf site has been increasing each month and traffic on the mailing list has increased as well. Ajax4jsf has made Java.net's "Top Ranked" lists more than once. Ajax4jsf has appeared in the Top 10 projects lists for mail traffic, accesses, and CVS commits numerous times. The number of articles, Internet resources, and blog entries where people talk about Ajax4jsf has also grown significantly.


More Stories By Max Katz

Max Katz heads Developer Relations for Appery.io, a cloud-based mobile app platform. He loves trying out new and cool REST APIs in mobile apps. Max is the author of two books “Practical RichFaces” (Apress 2008, 2011), DZone MVB (Most Valuable Blogger), and is a frequent speaker at developer conferences. You can find out what Max is up to on his blog: http://maxkatz.org and Twitter: @maxkatz.

Comments (1) View Comments

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.


Most Recent Comments
Ken 09/20/07 09:05:17 PM EDT

I would be interested to read some comparisons between Ajax4jsf and G4jsf (Google Web Toolkit integration w/jsf). Maturity, robustness, ...