Web 2.0: How to close the gap between consumer and business expectations by using JSF and AJAX

The following online presentation/demo about Exadel‘s new Ajax4jsf component library sums up nicely why you shouldn’t try hacking your own AJAX code but use an AJAX enabled JSF component library (like Ajax4jsf and others) instead:

Ajax4jsf: Rich Internet Applications with JSF and AJAX

In short: It’s all about ensuring good maintainability and hence transparency (in the sense of encapsulation and information hiding) while delivering a rich user experience nonetheless. Handcrafted, customized AJAX pages quickly tend to get complex and confusing and hardly ever follow important software architecture principles like modularization, abstraction, loose coupling, information hiding and encapsulation. The result is a piece of code that meets the consumer expectations at best (interactivity, responsiveness, etc.) but is very difficult to maintain (as server- and client-side code, customized and “standardized” code are wildly mixed). Using an AJAX enabled JSF components framework instead transparently hides the AJAX part of the code from the programmer by encapsulating it in JSF components. It’s thus possible to provide rich AJAX functionality by writing JSF server-side code as usual without needing to care about the internals of AJAX at all. If none of the existing components deliver AJAX-wise what customers expect, simply extend and customize the best matching component or write your own highly customized JSF component from scratch. JSF’s flexibility and sophisticated architecture makes this possible. Doing customization like this won’t clutter up your server-side code and will thus keep it maintainable and scalable.

While I haven’t tried this particular AJAX enabled JSF component framework yet and can’t comment on its implementation at this point (here’s a nice architectural overview of the different approaches how to combine AJAX and JSF from a framework developer’s view), the sprouting of AJAXified JSF component frameworks is a clear indication that more and more developers are becoming aware of the maintainability issues inherent to plain AJAX hacking.

For more information, here’s an interview with Max Katz, senior engineer with Exadel and Ajax4jsf committer and here’s the Ajax4jsf whitepaper.


Leave a Reply

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

25 + = 29

This site uses Akismet to reduce spam. Learn how your comment data is processed.