Differences between JSF and JSP

I Program web a short time ago (4 months) and I went straight to JSF, that is, I did not study anything about JSP. I started taking a course and my teacher kind of belittles JSF by saying that it has many limitations, that JSP is synonymous with performance, etc.

JSP is it all the same or these people, do not know JSF? Because as this same teacher of mine speaks, he implements several things in the "hand" while with the PrimeFaces I have everything ready. What are the main differences between the two?

Author: DiegoAugusto, 2015-08-18

1 answers

Differences between JSF and JSP

Strictly are distinct scope technologies: JSP is Framework* for building views while JSF is Framework* for the entire presentation layer, based on (but not limited to) MVC.

But in practice JSF replaces JSP, since along with JSF 2.0 came the Facelets, this sim with the aim of replacing the JSP because it is also a framework* for building views and is all oriented to the JSF.

*in fact they are not frameworks but rather framework specifications.

The official Java documentation reports that the JSP is deprecated , being replaced by Facelets: Java EE 6 tutorial .

Advantages and disadvantages

JSF and Facelets brought numerous advantages over the old way of doing (JSP), for example: templates, composite components , more rigid separation between vision and logic of presentation, AJAX facilities, etc.

I don't know of any disadvantages of JSF and Facelets compared to JSP, I don't think there is anything that can be done with JSP that can't be done with its substitutes. JSP " pages "are actually" compiled " to Java code becoming Servlets, and using JSF you can still extend your application by creating your own Servlets. I also can't imagine where one could perform better than another.

So maybe be it the case to ask your teacher for a list of disadvantages and then you can analyze them and find out if they are problems for you and your applications. I particularly doubt they are.

 12
Author: Caffé, 2020-06-11 14:45:34