3. Facelets Concepts
Contents > Facelets Concepts > Comparing Facelets and JavaServer Pages (JSP)
JSF is Faster with Facelets
We recommend Facelets over JSP for JavaServer Faces. With a near-zero compile-time overhead, developing JSF applications with Facelets is simply faster.
JSP Compile-Time Overhead
Every time you edit, save and reload a JSP page, the server's JSP compiler generates Java servlet code and compiles it into a servlet. This is called the JSP translation process, and typically it costs between 1-2 seconds, depending on server performance.
With an average of 1 second per JSP translation, 1 design iteration every 10 seconds, and an 8-hour work day, the following chart shows that almost 1 hour of design time is lost each day when using JSP. That's a cost of 2 work days per month!

Facelets XML Compilation
Unlike JavaServer Pages, Facelets pages are not compiled into servlets. Since Facelets pages are XML-compliant, the Facelets framework uses a fast SAX-based compiler to build your views. Also, Facelets can be configured to detect and render changes to your pages immediately, speeding up your JSF development cycle.
|