I am learning how to program and I would like to know what are the main differences or what do you recommend me to learn?
I am learning how to program and I would like to know what are the main differences or what do you recommend me to learn?
JSP:
It was the framework for the generation of web pages before JSF was defined.
It is based on generating a .jsp file that is "translated" into a class Servlet
which in turn is compiled and executed.
There are two versions: with scriptlets ( <% %>
) that is considered obsolete, or with the Java Standard Template Library (JSTL). The last one implements the MVC, while with the first one, normally all the code goes in the JSP itself.
JSF:
It is a framework for the generation of web pages within a web application. Follow the MVC philosophy.
It has two "modes": using JSP or Facelets. Initially, JSPs were used, but from version 1.2 by default Facelets (XML components) are used. Usually "JSF" is confused with "Facelets" (if you are looking for "JSF components" you will find Facelets libraries).
It standardizes issues such as navigation between pages and the internationalization of resources that in JSP were simply not defined.
Spring:
It is an alternative stack to Java EE. As such, it provides a series of services similar to those of the stack (for example, authentication and security, ORM / access to datasources, etc.).
Does not completely replace the stack; for example it is very common to integrate a JSP or JSF web layer with a Spring base, or to use stack components (such as the Validation API) within Spring or vice versa (use Hibernate instead of JPA within a Java EE application). / p>
JSF
It is a system that facilitates the development of the user interface in web pages.
It has several basic features, for example two tag libraries <xml>
.
It's a framework.
Supports conversion to validator
, ajax
etc ...
JSP
Java
to make dynamic web pages. If as you said you are starting I recommend using JSF since it is easier to manage, but if you are going to make more complex pages I would shoot for JSP