Social Media

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

About the Author Martin Farrell

My name is Martin Farrell. I have almost 20 years Java experience. I specialize inthe Spring Framework and JEE. I’ve consulted to a range of businesses, and have provide Java and Spring mentoring and training. You can learn more at About or on my consultancy website Glendevon Software

follow me on:

Leave a Comment:

PZA says 22/01/2018

I think I’m a unicorn in respect to whether I love or hate JSF. I think it cool and powerful and stable. I think it works well for some projects and no so much for others.

    Martin Farrell says 23/01/2018

    I think its got a niche – someone one dzone was talking about using it for admin or internal applications, where the aim is to build it reasonably quick

    Its interesting that the responses on this article also said to use angular or React, especially since the stackoverflow article showed how short a lifespan these frameworks can have. I think there is a flawed business case there – you are basically building something on a framework that may only exist 2 years

Chris D says 23/01/2018

Some interesting analysis! There is one flaw in your logic. You presume that less activity on StackOverflow’s JSF tag is an indication of less interest in JSF. However, the feature set of JSF has improved, and therefore people don’t get themselves backed into corners as often with the framework itself. Additionally, many of the questions may have been asked, and more easily found from searches. They may be using JSF more but needing to ask questions less. There could also be a shift in questions from the JSF framework itself to Primefaces, Omnifaces, and other libraries that work with JSF where the JSF tag is not included. It’s impossible to say how much this will affect the trend lines.

I personally feel JSF is a fairly awkward framework which has been patched over the years to make it a lot less awkward. JSF would have died a lonely death if the incredible BalusC had not been there on StackOverflow to answer everyone’s questions with great kindness and authoritative knowledge. That said, in the Java world, I’m not sure if there are any better alternatives.

    Paul Wilson says 17/01/2019

    Cheers to BalusC! I strongly believe he is the first AI with his sole purpose to spread knowledge of JSF 🙂

Bartosz Jedrzejewski says 20/02/2018

I remember enjoying JSF, but that was probably because I was not familiar with the modern JavaScript development. At the moment I don’t think JSF is a future proof technology. The sort of front-end experience required nowadays is not very compatible with the JSF request-response model. JSF components are too difficult to edit to make them fit for building very responsive and dynamic websites.

The only niche for JSF that I can see is building very simple internal website where the cost is the main driver. But even then… if you know some basic JavaScript frameworks, you may find them easier to work with.

I think the future really is with React, Angular and the like and we (the Java developers) have to face it. In the end what is learning React when you have already been through the joys of Java Enterprise?

Thank you for that blog post! Was a fun read!

    J2eeInside says 09/11/2018

    You know, I’m not interested in other people’s thoughts at all.

    My only criterion is this: if something works for me, everything else is irrelevant!
    We just developed a really huge EPR system based on Oracle ADF (built on top of JSF).
    The app works just fine, scales well, and serves large number of users, without any problems!
    Why to learn Angular or any other similar thing, if I have tool that does the job?

    So – long live JSF!

    Edison says 22/05/2019

    You should try JSF with PrimeFaces. Take a look at this theme:

    It’s very usefull, professional, responsive and fast and it doesn’t require a JavaScript Front End course.

Armen Arzumanyan says 07/04/2018

JSF is one of the best frontend technologies. If you have real experience with react.js or angular or other popular frontend frameworks, they have much more problems than JSF. Actually js frameworks try to clone jsf lifecycle . JSF managed beans is the layer between html forms and backend, in the react world it is redux .:)

I will suggest as frontend use JSF if you want use java framework, and react.js if you want use non java front end.

Marco Del Percio says 11/04/2018

As others already posted, your logic of evaluating something’s popularity simply based on number of questions asked on StackOverflow is wrong. I have 4 years of experience with JSF only and I probably asked 10 questions in total. Just because I don’t ask much it doesn’t mean I don’t use it. In our company we use JSF forma 6 large enterprise applications. Also JSF on StackOverflow is blessed by the guru BalusC he answers everything about JSF. No point asking more if BalusC has already an answer pretty detailed and clear.

AJ says 08/06/2018

I agree with u., react angular… shit even bootstrapping is better than jsf .. Jsf is dead…

hyun woo says 04/07/2018

I am still developing with jsf and i hate it, after working with angular or react on several projects i found jsf too restrictive and too linear to work it, there are a ton of components yet you cant change the way the are created without make a ton of tinkering and that documentation is very poor.

I agree that without BalusC help, jsf would have died not because he helped but because there is not enough information on the framework unless you became a good searcher on several sites ,examples etc.

Also working with jsf we discovered on very large pages the amount of requests to the server was astonishing, we tried with no avail to reduce it and ended with more javascript page than jsf, then we decided to move on to a full javascript framework instead of tinkering with jquery the current jsf page.

Another reason was concurrency in the same large page with that amount of request and information, the webapp became so annoyingly slow after several profiles and optimizations jsf was the only thing we can’t optimize.

So now im working on a richfaces project yet i had to add omnifaces and primefaces to make the page work and deliver on time, That amount of jsf libraries on one page is not optimal and could make some weird errors, yet we needed each one for explicit components. I know that with time and investigation one jsf framework should suffice yet this is another thing that jsf made posible, adding more complexity to a simple page.

J2eeInside says 11/11/2018

You know, I’m not interested in other people’s thoughts at all.

My only criterion is this: if something works for me, everything else is irrelevant!
We just developed a really huge EPR system based on Oracle ADF (built on top of JSF).
The app works just fine, scalles well, and serves large number of users, without problems!
So – long live JSF!

guang says 14/11/2018

It is hard to generalize JSF, it really depends on the distribution you are using. For me, IceFaces is the easiest to use. Apache Trinidad is a hell to work with, with so many tricks you won’t understand just to make it work.

But regardless, I think JSF was never relevant, even duying the 2007-2010 period. It was introduced so we don’t need to think about request/response model of web application. But in doing so, it was made so complicated, maybe 100x more than the request/response model.

Only management likes JSF because they say it is standard. But I don’t know any dev who is happy with this. I used it for 5 years in 3 different organization, all because management forced the framework to us. All of them regretted the decision of using it. It caused higher head count and so much delays. Because devs are fighting the framework, instead of framework helping the devs. In my opinion, a simpler framework like Spring Web, or just plain Servlet is much more productive than JSF.

JSF was made only to solve simple things. But real life has a lot of complex scenario, and JSF is like purgatory or hell to work with.

Why is things like REST or JS framework getting popular nowadays? Because they make dev life easy and happy. You can write complex behavior with simpler and shorter code. And it is intuitive, no magic happening in the background.

RainerWahnsinn says 02/04/2019

“The reason I like JSF is that you can access good quality components, that are mature and well documented.” – Martin Farrell

Sone hingerotzte Scheisse habe ich ja wohl lange nicht mehr gehört. Also wenn du nicht dafür bezahlt wurdest, weiss ich beim besten Willen nicht von welchem JSF du da labberst.

Elisaudo says 04/05/2019

Great post. It will help me a lot. Thanks!!!

Fanis Kalatzis says 13/05/2019

Being working more that 15 years with JSF application including Primefaces for front-end i am still looking for “better” or more efective framewirks. I don’t have the time to start over with SPRING MVC but i see that i need more configuration with SPRING and i am missing things regarding the front-UI (with AJAX) by using the Spring Framework. I see some positive things with JHipster that includes Angular for front and Spring fot the server-side, but it is really huge framework…
I ll continue to think… and review…

Edison says 22/05/2019

Very good post.

I work with JSF + PrimeFaces + Professional Themes and also with JavaScript frameworks (jQuery, ExtJS/Sencha) + Spring MVC and the productivity using JSF is better. Buy the way, we don’t need professional JavaScript FrameWorks programmers.

Guillermo says 09/08/2019

There are a lot of JavaScript frameworks and libraries for SPA today and I think it’s cool, so you can pick up any of those and make a webapp but there are some enterprise application that only needs to update specific data probably not in a complicated way – this is like trying to choose a DB for a blog maybe (choosing between SQL and NoSQL dilemma that trendy guys could have) –

If a JSF app is built with good practices the company/enterprise could have good and enough solution components to run an app business (i. e PrimeFaces, OmniFaces and BootsFaces

for sure you are developing in a none web standard language in terms of instead of but if we have found this like a some kind of anti pattern we can get the same thing with all the components stuff in any SPA framework, we can build none standard naming tags and do some kind of abstraction in tags naming when the only difference is angular: and jsf:

So if you are facebook (or a startup with a lot of investment), go ahead and build your own java script framework that runs on mobile and browsers and you can achieve a lot of reactiveness stuff that help you to handle all state of your components because you app have a lot of interactive things in the screen.
If not, maybe you just want generate a report, update some employee data, create an order or create an ERP that 10/1000 employes would use. So it depends.

Luciano says 17/12/2019

I have lost thousands of hours to make jsf work but it may be a deficiency of mine but I would not recommend using this technology.

Add Your Reply