Home » Java » Enterprise Java » Would you use JSF for your next project?

About Martin Farrell

Martin Farrell
Martin is a Software Developer and Consultant specializing in Java and the Spring Framework. When not coding he spends time with his wife and two children, or cycling his bike.

Would you use JSF for your next project?

There was an excellent stackoverflow blog post last week about the “Brutal Lifecycle of Javascript Frameworks”. The article was about the speed at which Javascript UI frameworks(angularjs, angular, jquery and react) come into and fall out of fashion. The key metric for this post is questions per month on the framework, which is a reasonable metric to demonstrate these trends. Downloads would have been interesting too.

It got me thinking where are we with JSF, and my starting point was to superimpose JSF on top of the Javascript data –

Its hard to see clearly but JSF is in decline based on questions asked on Stackoverflow. If we remove Javascript we can see the decline started around 2013

That said the level of questions is fairly small, and the level is relatively stable

This post tries to understand the current state of JSF, and whether there is still a place for JSF in modern development.

What is JSF?

JSF is a component-based web framework that is part of Java EE. It was the only frontend framework under Java EE until Java EE 8 added its new MVC framework.

Whats good about JSF?

For me the key strength of JSF lies in the component frameworks in the JSF ecosystem. In particular PrimeFaces, or the utility libraries like omnifaces. They let you quickly get started on projects, have plenty examples and are especially suited in a team or for projects where developers lack frontend skills. The deployment model is often simple, with a single war or ear file per server

The current release of JSF is 2.3, with the specification for 2.4 currently in progress.

Whats bad about JSF?

In 2014 JSF received criticism from the thoughtworks techradar, which placed it on hold.

The main part of the criticism was that the JSF model is flawed as it –

“encourages use of its own abstractions rather than fully embracing the underlying web model”

They do make the concession that the web model is getting more prominence in later versions of JSF.

There were rebuttals against this post particularly relating to more recent JSF versions. But it has contributed to JSF being regarded as a difficult framework to use.

JSF is Marmite

JSF is the marmite of frontend development.

Whats marmite? Its a yeast extract that you spread on toast. Some people love it, some hate it, but there is no middle ground. For the record I hate marmite, but I like JSF.

The reason I like JSF is that you can access good quality components, that are mature and well documented. It also has the advantage of allowing teams that are weak on front end skills to develop professional looking websites. There is a downside that it can be hard to deliver more complex requirements as the Request/Response model is more abstract under JSF.

Should you use JSF for new projects?

The JSF model has fallen out of favour. It is viewed as a legacy framework against today’s Javascript frameworks with RESTful API backend’s. This has moved the Java to implementing the RESTful microservices. This approach can often scale better than JSF.

The stackoverflow blog post shows its not all plain sailing in the frontend Javascript world. The frameworks suffer from relatively short lifespans, although there are migration strategies, you do run the risk of your javascript framework being obsolete.

JSF has the advantage of being a mature model in this respect. Its also worth remembering that if your team is lacking in front end skills then JSF will help you quickly deliver a professional looking website.


I’d be interested in hearing other peoples experiences, and whether they will be using JSF on future projects

Published on Java Code Geeks with permission by Martin Farrell, partner at our JCG program. See the original article here: Would you use JSF for your next project?

Opinions expressed by Java Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
2 Comments Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy
Notify of

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

Newest Most Voted
Inline Feedbacks
View all comments
2 years ago

Short answer: yes, I would use JSF in future projects.

The reality, though, is that PHP is the most prevalent (even if it makes you gag) and JavaScript, if your using it on the back end, has the benefit of being the same language used on the front end, resulting in a smaller “cognitive load.”

My preferred method for web development is static sites such as Jekyll, but those obviously have limitations. I really like Java and have been programming for years – what other options are there in the Java ecosystem other than JSF / JSP?

Kenan Sevindik
Kenan Sevindik
2 years ago
Reply to  JoeHx

You should check Vaadin UI Framework before starting your next enterprise web project.