Java Facelets and Java Server Faces

Written by Larry Gray on . Posted in Facelets / JavaServerFaces

Java Facelets and Java Server Faces

So Java JSP is awesome and we need no more right? Wrong, JSP is great, but it is a very cryptic way to describe things. Also routine work on web type applications developed into repetitive design and coding task. This was turned into what is called web frameworks. Jakarta Struts is a 3rd party api for such a framework. Sun felt it was time to create a framework for distribution with the standard and extended api's. Facelets and Java Server Faces was born.

Faclets and JSF is built on top of the existing servlet technology. A facelet page is based on specialized facelet codes which are "interpreted" by a Java Facelet servlet. Java Server Faces is the framework that uses this facelet language. This gives the developer quick and easy access to common task using good ole MVC design patterns. And as you might guess Facelet source is a whole lot nicer to read than JSP tag source. Why all this ease of reading? Difficult to read source creates bugs, and slows debugging activities.

Java Servlets, JSP, Facelets and JSF may all be used happily together though Facelets and JSF side step JSP. JSP is left out in the cold by JSF. Not a bad thing really. I believe here this skipped uglier JSP and the compilation process. I would still have no problems using JSP if I wanted, so go ahead and use it all. Matter of fact for now this entire web site is JSP based.

JavaFX

I'll mention JavaFX here. This is some api that uses I think cryptic code for doing things similar to Macromedia Flash effects. It is hardly used at all and gained no real support from the Java community. If I learn more i'll put up a special article about this when I get time.

Tags: , ,

Trackback from your site.

Leave a comment