On the panel at JSF Summit, when I said that my JSF hot button is view metadata, I was wrong. The most important issue to me is seeing Facelets reach maturity as an XML-based template language that produces components, not XHTML.
What Jacob did for JSF by introducing Facelets was nothing short of miraculous. I personally believe that he saved JSF so that it was able to survive until JSF 2.0 ;) But he did fall slightly short of making Facelets perfect. The main problem is that he sat in limbo between an XHTML-based template document that could cloak itself as a component tree and an XML-based template language that could produce a component tree and, in turn, response markup. We need to shift this final puzzle piece into place.
I'm going to go out on a limb here and say that Jacob choose XHTML for two reasons:
1) He could throw a SAX parser at it and produce a component tree (putting an end to the debacle that was JSP markup)
2) It would put an end to the debacle that was the <f:verbatim> tag for rendering plain HTML, which was 80% of the page 80% of time.
He saved us. (Too bad he wasn't there to receive the endless praise at JSF Summit. That's what you get for going into management. People praise your ghost.)
However, he did one major disservice for JSF (No, Dan! How could you criticize the King?) That's right, I said it. Somebody had to say it. It had to be said. He violated the objective of JSF to support multiple renderkits.
We are more linked to HTML today than we have ever been before. Why do I say that? Our view templates end in .xhtml, that's why. Okay, but .xhtml is extensible, right? Wrong. XHTML is not an extensible language (despite it's name). It is based on a closed doctype, which we learned at Rich Web (the sibling conference to JSF Summit) is now dead. So we are never going to see that extensibility.
So we are using a document with an XHTML doctype, and XML declaration, XML namespaces (which XHTML does not support), yet no XML schema to back it We are in serious limbo. Do you realize how strange it is to use .xhtml to produce an ATOM feed? And we wonder why the tools are having trouble supporting this (okay, NetBeans figured it out, but still).
But, wait! XHMTL is useful because we can preview the template in a browser, right? That's what the jsfc attribute is all about. We can make an input component look like an HTML input.
<input jsfc="h:input" id="name" value="#{user.name}"/>
Guess what? Jacob backed away from this almost as soon as he added it to Facelets. It's a leaky abstraction and simply doesn't scale. It has no practical application. In his words:
"It's just dumb to use 'jsfc' and 'jwcid'. Those two things would be great if the semantics were the same between html and components, but they aren't. And even if they do parallel, the next concern is that there should be dummy content
for the designer to play with, you have to remove it. I say don't even bother with it in the first place and stop expressing concerns within the same document."