JSF is specification or framework?

Asked

Viewed 1,139 times

5

In Javaee’s Github there is the repository javaserverfaces-spec that in his README.md says:

Javaserver Faces (JSF) is a JCP Standard technology for Authoring Component based user interfaces on the Java EE Platform. This particular Github project hosts the Official JSF Specification Issue tracker. There are two implementations of the JSF Specification, Both of them developed with OSI Approved Open Source licenses.


Already the Wiki tag says:

Javaserver Faces (JSF) is a Model-View-Controller framework commonly used to create web applications. Always inform: What is the JSF version you are using; What technology you are using, JSP or Facelets; Error messages displayed; Minimum copy of code that can be executed.


On the Wiki tag has a link of Wikipedia, which says:

Javaserver Faces (JSF) is a Java specification for building component-based user interfaces for web applications. It features an event-oriented programming model, abstracting details from event manipulation and component organization, allowing the programmer to focus on application logic.


I also found that article of the 2005 Oracle Technology Network:

One of the key Advantages of JSF is that it is Both a Java Web user-interface standard as well as a framework that firmly Follows the Model-View-Controller(MVC) design Pattern.


After reading these articles/sources I didn’t understand two things:

  1. JSF is specification or framework?

  2. JSF is MVC?

  • @diegofm I saw this question. What I don’t understand is why the OTN article says that JSF can be both specification and MVC framework (contradicting the quoted answer)

  • @diegofm still, if the quoted answer is right, we need to fix the tag wiki, right?

  • @bigown, I saw that you built the tag wiki. If it’s not in your way, could you comment/explain your opinion on the subject, please? I think it will be very interesting :)

  • 1

    I can’t tell you, I never messed with JSF or JSP, only related because I saw that they were similar themes.

  • 2

    What I do know is that JSF is something to run away.

  • @Igorventurelli The bigown (just like any user) will not receive notification of his mention if he has not interacted in the question, with comments, closing votes, etc. I am warning you if you want to talk to him by other means.

  • @LINQ our! I didn’t know... Thanks!

Show 3 more comments

1 answer

2

Good question!

In fact JSF by definition is actually a specification.

So why do we treat it as a framework when we refer to it? This is thanks to the Java development and distribution method.

But how so?

By default when we develop some program in Java, JDK provides us with a set of tools that are packaged by default in the Java JDK. However such tools are not enough (or are too raw) to meet all needs encountered.

Since and for other reasons, the Java Community Process, that in fact it is a kind of community that aims to propose, create and validate new specifications for the Java language. Any member of this community can implement some of these available specifications, which means that when a specification is created, it can have several different implementations (and with different responsible ones) that do basically the same thing (with minor possible differences).

But what does this have to do with JSF?

All! JSF currently has two widely used implementations: Mojarra (Oracle) and Myfaces (Apache).

But hold on, there’s one more factor to consider when we look at this:

Implementations do not work "standalone" or "alone", it takes an application server to run these implementations. That’s where servers like Glassfish, Wildfly and Tomcat come in. Each of these servers chooses an available implementation to work, just search their documentation and you will find this information.

Now if we stop to analyze, neither the specification, nor the implementation, nor the application servers are in fact a framework. However, all these factors, together with the final product, together with its extensive documentation, make the JSF referred to a framework, mainly because of the way the final developers work with it, and also thanks to external libraries such as Primefaces, Bootsfaces, Butterfaces, etc (these are frameworks, because they work a layer above pure JSF to facilitate the development process).

Therefore, it is very difficult to refer to JSF without defining it as a framework. In my opinion, when we refer to JSF in a more informal way, it makes no difference that it is a framework or specification, what really matters is to know a little of its history and use it to help us with everyday problems.

  • Cool. So the jsf tag wiki is right or wrong?

  • The wiki tag jsf in ptSO is a slightly modified translation of the tag of the same OS name (which in turn also defines JSF as a framework). I suggest keeping the tag as it is today.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.