JavaServer Pages (JSP) is a Java technology that allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request.
JavaServer Faces (JSF) is a Java-based Web application framework that simplifies the development of user interfaces for Java EE applications. Out of the box, JSF uses JavaServer Pages for its display technology, but JSF can also accommodate other display technologies, such as XUL, for example.
Apache Struts is an open-source framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top level Apache project in 2005.
1. There is too much to do to get anything done - even the simple things. You have to create Java, JSP, and XML files and get them all running together
2. The runtime errors are not descriptive at all so it takes a long time to debug
3. The runtime sometimes give you an error pointing to one place when the error is actually in another place, requiring you to take even more time to debug
4. You have to spend a lot of time coding presentation objects when the framework should better support your value objects.
5. Changing anything is difficult because of all the runtime errors introduced by the framework. Compile time errors are your friend. Runtime errors are evil.
6. Because of all the above, you have to do baby-step incremental programming which, again, is time-consuming.
7. Using the debugger (in Eclipse) kept crashing the server. While this is not a JSF problem per se, it stills slows development.
8. It adds yet more syntax to JSP code, which means developers have to learn and retain this knowledge.
So to sum up, it will take you longer building a JSF app then using something else. And time is money.
Bear Bibeault wrote:
John Todd wrote:Well then check JBoss Seam framework, it makes JSF development more easier and productive.
When you need a framework to use a framework, you gotta know something is wrong!
You are right Mr. Bear.
I'm not advocating JSF, actually I deleted it from my mind but JBoss Seam makes JSF development doable.
Seam provides tight integration with many JBoss projects (like RichFaces and Drools) but this doesn't mean it will locks you in.
I am studying Servlets and JSPs , and since a short time I've turned to JSF , but I'm kinda confused about the difference between them , so I have some questions here which I -hopefully- would find their answers :
1- What is the "real" difference between JSPs and JSFs ? I reviewed many definitions for both , but couldn't grasp the difference exactly
many definitions describes JSPs as a "Java View Technology" , while JSF is "Component-based framework . In other words : when should I - after viewing a code for a java web app - shout : "This is JSP" or "This is JSF" ?
2- I'm confused about the tag libraries of both JSP and JSF :
JavaServer Faces HTML Tag Library prefixed : h
JavaServer Faces Core Tag Library prefixed : f
JSTL Core Tag Library prefixed : c
can I use any tag library with both of JSP and JSF ?
3- where does the Facelets fit in all of this ? the relation between facelets->JSFs and facelets->JSPs.
4- When to use JSP/JSF ?