Sunday, November 7, 2010

PrimeFaces or RichFaces?

This blog is intended for developers familiar with RichFaces or other JSF component suites, looking for a...

Complete Review of PrimeFaces.



I've been using PrimeFaces for about a year, since version 0.9.3, when they were still getting off the ground. I've used PrimeFaces on one enterprise-scope intranet application and several small sized apps. I've incorporated PrimeFaces as the standard component suite for my Java developers in my unit, and we're pumping out small to medium sized business apps with PrimeFaces very quickly. Now I'm here to tell you what I've learned.

Richness - Score: 10
Richness is about bringing the capability, intuitiveness, and interface of your web app as close as possible to that of a desktop application. The folks at PrimeFaces seek to demonstrate this with their mock OS X presentation found here: MOCK OS X
In my opinion, that presentation is a vast understatement of the total rich desktop capability of the suite. For example, see how one component, the layout component, might help you develop a browser-based application with flyout areas common to I.D.E.s: layout component.
Additionally, with their suite-wide skinning capabilities, defining and changing a common theme among your components is easier and more visually appealing than any of the other component suites out there.
I give it a score of 10 out of 10 because I have not found a rich need that PrimeFaces does not currently deliver.

Stability - Score: 7
The component suite is modular and integrating multiple components generally works seamlessly and exactly as intended. Embed calendar selection drop downs with datatables, dynamic layouts, accordions, etc, and behavior is almost always as you'd expect. With version 2.1, PrimeFaces has standardized a majority of their components on JQuery, moving away from the YUI Yahoo library. This had brought stability in leaps and bounds, as it seems that the UI development industry has latched onto JQuery and adopted it as a standard. Prior to version 2.1, embedding components within one another could sometimes yield odd behavior, but I have not seen this at all since the JQuery implementation in 2.1.
I give it a score of 7
out of 10 because version 2.1 did bring production-acceptable levels of stability, but not yet perfection. Older versions of PrimeFaces were a little brittle, and they are still establishing our trust.

Documentation - Score: 9
You may have the greatest tool in the world, but without some easy to read instructions, what good is it? Sometimes tools behave as you'd expect, and documentation feels just a little less important. In both of these regards, PrimeFaces is the best I've ever seen. The API's are predictable and intuitive. The documentation is not only complete, but also easy and fun to read.
However, if you're looking for documentation on an older version of PrimeFaces, you're out of luck. They provide documentation for their most recent stable release only.
I give it a score of 9 because the documentation is the best I've ever found, but was crestfallen to discover that I couldn't find the documentation for the application I built with PrimeFaces 1.0 last year.

Support - Score: 9
PrimeFaces offers two levels of support - free community support, and paid enterprise support. I only have experience with the free community support. What I tell my upper management and colleagues in the industry constantly is that PrimeFaces' #1 feature is that they listen and react to their community. I've never seen a small development team such as theirs do it so well. Founder Cagatay is incessantly pulling wicked hours on the forum, answering questions, organizing defect reports, and helping the world use his tool. I once posted a show-stopper defect on their forum, they reacted to me quickly, and a stable release 3 weeks later contained a fix for me. It was incredible.
I give it a score of 9 out of 10 because the support team is thoroughly dedicated, but small and struggling to keep up as their community grows exponentially.

My Recommendation after a year with PrimeFaces
  • Use Facelets
    PrimeFaces no longer support their 1.x version, which was for JSP view-controlled JSF.
  • Use the latest stable release, not the release candidate.
    PrimeFaces is growing more quickly than any component suite I've seen (IceFaces, RichFaces, Trinidad, etc), and the release candidate that their showcase may attract you to is truly on the bleeding edge. Play it safe with their stable release, 2.1 at this time.
  • Archive the documentation
    PrimeFaces only hosts the documentation for their latest release. If you develop a product with 2.1, and they release 2.2, then 2.1 documentation will be lost to you
  • Invest Time into the Showcase
    Knowing what tools are in your toolbelt is what makes you powerful as a developer. How can you make incredible rich interface suggestions to your customer if you're not aware of all of your options? Spend hours unapologetically playing with that showcase and get a feel for what you are (and are not) capable of with PrimeFaces.

If you enjoyed this review, please comment! Your comments are the reason I do this :)
-Lance

7 comments:

cagatay_civici said...

Hi Lance,

Thanks for the review,

I agree with the stability part, I think it is a result of the fact that PrimeFaces is 3 years older than other projects you've mentioned. With PrimeFaces 2.2+ thing are much more stable and we have extra care for backward compatibility as much as we can. For example the new skinning implementation introduced in 2.1 is untouched in 2.2.

See you in forum ;)

Cagatay

Badr ELHOUARI's Blog said...

Hi Lance,

I totally agree with you in this review !

I started using primefaces with jsf 1.2 in a middle project even if I have found some issue that I had to deal with but I appreciate the way they are growing up, improving and adding new components, quick answer and fixing bugs ... I have never seen this before in any other implementation.

After the project succeeded and getting the satisfaction from my stackholders I have introduced primefaces 2.2 as a standard for new development with JSF2 in our company.

Prime for me is a Jsf REVOLUTION !!!"

cagatay_civici said...

Typo: I meant PrimeFaces is 3 years "YOUNGER"

Unknown said...

Lance:
You stated that you have incorporated PrimeFaces as a standard component suite for your Java developers. Do you have anymore insights at to how much more productive you have been? Comparisions? I have been using JSF and looking at using PrimeFaces vs using JS libs (e.g. JQuery, YUI) directly. Thoughts? It seems like JSF gets a bsd rap, but with libraries like PrimeFaces development is much easier.

Lance Dolan said...

Jerry,

As with all frameworks and tools, you sacrifice control for productivity.

Here was my number one argument when bringing in PrimeFaces: What do we lose by using it? Nothing. If you're already using JSF like us, you lose nothing by bringing it in. It's an additional set of components which you use or ignore as you please. All of your other options are still available to you.

That being said, how's this for productivity:

I'm also a B.A. in charge of gathering requirements. I've often used Visio or other similar modeling software to generate mock-screens.
Assembling rich interfaces is now so quick and easy with PrimeFaces that I no longer use Visio at all - i run the maven2 archetype and just create the actual UI prototype on the fly. Call me crazy, but it's working great. Having such rich modular components available at your fingertips with a single line of code makes for VERY agile development.

If you're looking for metrics, it is a difficult thing to gauge. For example, if a customer is very picky and wants you to modify the PrimeFaces components, you can lose all the productivity you've gained. If the PrimeFaces components meet your needs out-of-the-box, productivity is immense. In a recent presentation to my management, I estimated around 40% UI development time compared to using our standard JSF components with JavaScript customizations.

My apologies for the long-winded reply.

Saurabh said...

Hey Lance,

thanks for the review it was really helpful,

Apart from richness, stability Of course, I really like documentation and the forum support.

Expecting some more cooler widgets.

regards
Saurabh

Hema - RoyD said...

Hi Lance, great Report, I'm just starting out with PrimeFaces and need more complete documentation and examples, I purchased the manual, but it is lacking severely. Im trialling the showcase demos, some work, some don't, I need to know why, so need complete documentation and examples.
Any help you can give would be great.