Hi,
On Tuesday, June 3, 2014, Santiago Pericas-Geertsen wrote:
> JSF has a number of different parts, not all of which are applicable to an
> MVC framework.
>
Maybe it's important to be aware of some of the terminology to make it
clear what we're really talking about.
Pretty much everything in JSF applies to an MVC framework, since JSF
already IS an MVC framework at its core and always has been. In fact it
might even be the case that JSF is closer to the original MVC model as
introduced by smalltalk than Spring MVC is.
What we're talking about here is action oriented vs component based, or
alternatively MVC push vs MVC pull.
Although I understand the usage of the term from a marketing perspective,
we really should realize that Spring MVC did not invent the MVC model and
that the particular way in which Spring MVC does things is not the
stereotypical way to do MVC. It's -a- way, but not -the- way for sure.
> Some, such as the Facelets templating language, could be plugged into a
> JAX-RS based MVC framework
>
In the current way that things are implemented "just Facelets" (implying no
JSF) would be questionable. Even if the view would use no explicit
components, plain markup would still be compiled into UIInstructions, which
has UIComponentBase as its super class. If anything, this particular class
basically -is- JSF.
> As far as to why MVC? The world domination of "thick clients" (Angular,
> etc.) is a bit overblown. Yes, these technologies are great and will
> continue to evolve in the next few years. However, (i) historically, there
> has not been a single technology dominating the UI space and (ii) these
> paradigm shifts do not happen overnight.
>
> We have not arrived to the decision of supporting MVC without a careful
> consideration of (i) community feedback and (ii) research data. MVC (and
> Spring MVC in particular) is the most popular Java UI technology by a good
> margin:
>
> https://twitter.com/RebelLabs/status/471680296119971841/photo/1
>
> And this is just an example, there are many other reports like that.
>
I don't entirely agree with the above conclusion. While I don't contest
that Spring MVC is indeed popular, I find the 40% somewhat remarkable.
Other sources that I've seen don't really support this.
In fact, many surveys seem to put JSF at number 1 or 2 and put Spring MVC
at a lower place. You just happened to pick the one where Spring MVC wins
by a large margin.
A number of surveys have been collected here:
https://henk53.wordpress.com/2011/10/12/reply-to-comparing-java-web-frameworks
In the rebellabs surveys Spring MVC indeed wins, but JSF is at number 2. Is
this 1 position difference really worth the potential confusion?
If we take a look at the poll that JAXenter did some time back,
specifically asking for the *preferred* framework, the list was as follows:
- Vaadin (18%)
- JSF (16%)
- Grails (15%)
- Play! (10%)
- Wicket (8%)
- ZK (7%)
- Spring MVC (6%)
- GWT (5%)
- Ruby on Rails (3%)
- Lift (2%)
- JAX-RS (Jersey) (2%)
- Struts (1%)
- Tapestry (1%)
- Flex (1%)
- Stripes (1%)
- Spring Roo (0%)
- Roma (0%)
- JavaFX (0%)
- Click (0%)
- Anderes (4%)
(see
http://it-republik.de/jaxenter/news/Und-das-populaerste-Webframework-ist...-060497.html
)
Based on the outcome of this survey, it should thus be Vaadin that is
considered the most popular UI technology, although not by a great margin.
As you can see, JSF is right behind it at number 2. Spring MVC suddenly
doesn't seem to be the most popular one at all with only 6% of the votes.
In the OIO compass, the result was as follows:
- JSF (32%)
- Spring MVC (16%)
- GWT (16%)
- Grails (8%)
- Struts 2 (8%)
- Other (21%)
(see
http://www.oio.de/public/java/java-web-frameworks-vergleich/jsf-vs-gwt-studie.htm#a13
)
This time it's thus JSF that wins by a large margin.
If we take a look at the results of
http://devrates.com (a website
dedicated to measuring technology popularity), we currently see the
following results for Java frameworks:
- Grails (9.3)
- PrimeFaces (8.8)
- Vaadin (8.5)
- Play (8.2)
- Tapestry (8.2)
- Struts (7.5)
- RichFaces (7.6)
- Wicket (7.6)
- GWT (7.2)
According to this list it's thus Grails that's the most popular. For some
reason Spring MVC isn't even there. PrimeFaces (which thus implies JSF) is
at number 2.
Over to stackoverflow.com, where we currently see the following activity
measured in total number of questions:
- JSF (31503)
http://stackoverflow.com/questions/tagged/jsf+or+jsf-2+or+primefaces
- Spring MVC (17956)
http://stackoverflow.com/questions/tagged/spring-mvc
- Grails (16600)
http://stackoverflow.com/questions/tagged/grails
- GWT (16399)
http://stackoverflow.com/questions/tagged/gwt
- Struts (10649)
http://stackoverflow.com/questions/tagged/struts+or+struts2
- Play (9998)
http://stackoverflow.com/questions/tagged/playframework-2.0+or+playframework
- Wicket (2294)
http://stackoverflow.com/questions/tagged/wicket
- Vaadin (1547)
http://stackoverflow.com/questions/tagged/vaadin
- Tapestry (662)
http://stackoverflow.com/questions/tagged/tapestry
According to this list JSF is again the most popular by a large margin.
Looking at Google trends, comparing PrimeFaces vs Spring MVC, it can be see
that at this moment both have the exact same growth curve:
http://www.google.com/trends/explore#q=PrimeFaces%2C%20Spring%20MVC
Looking at job trends, there's an another remarkable similarity. This time
JSF and Spring MVC have nearly the exact same *decline* curve:
http://www.indeed.com/jobtrends?q=jsf%2C+%22spring+mvc%22 Adding some more
frameworks shows the others are declining too, but at the moment the order
is:
- JSF
- Spring MVC
- GWT
- Grails
- Wicket
- Vaadin
- Tapestry
(see
http://www.indeed.com/jobtrends?q=jsf+java%2C+%22spring+mvc%22+java%2C+grails+java%2C+vaadin+java%2C+gwt+java%2C+wicket+java%2C
)
Here too JSF is the number one of the ones included in the query.
All in all I think these are a fair amount of sources to look at, and as
seen in at least these ones JSF is basically everywhere at position 1 or 2,
and except for the rebellabs survey Spring MVC doesn't really seem to be
the most popular UI technology by a large margin.
And to give a few other data points for the general question of whether JSF
is or is not popular; articles about our library OmniFaces generally get
favorable upvotes at places like reddit, see e.g. the posts about our
latest release
http://reddit.com/r/java/comments/2743ne/omnifaces_18_released and
http://reddit.com/r/java/comments/27502d/new_release_of_omnifaces_sees_light_of_day
Furthermore our JSF page at zeef.com does quite well (see
https://jsf.zeef.com) and on my Java EE 7 page, the JSF links together have
over 5 times more clicks than links in any other block except for the
general Java EE 7 block (see
https://javaee7.zeef.com).
Kind regards,
Arjan