dev@jsftemplating.java.net

Re: JSFTemplating: JSFTemplating project goals (JSFTemplating vs Facelet)

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Tue, 04 Sep 2007 10:28:19 -0700

Hi Leonid,

See below...

Leonid Lamburt wrote:
> Hi,
>
> I have the following question:
>
> Is the goal of this project to be a superset of features provided by
> Facelet (everything that Facelet does +more) ?
It's not an explicit goal of the project. It does do a lot more than
Facelets and does most of what Facelets does, however.
> If not, then
> a. what features of Facelet do you think you are not going to have?
Probably not the facelets components -- JSFT supports "real" components
instead.
> b. What are the features the JSFTemplating has and Facelet doesn't?

    * FileStreamer --
      (http://blogs.sun.com/paulsen/entry/streaming_content_in_jsf_with)
    * Events / Handlers --
      (https://jsftemplating.dev.java.net/tutorials/pageSyntax3.html,
      https://jsftemplating.dev.java.net/tutorials/events1.html)
    * Component Factories
    * #include
    * Multiple-format support (currently 3... can be extended to
      additional ones)
    * Ability to create REAL JSF components using any of the syntaxes
    * Page Session

That's what comes to mind... JSFT also has 4 or 5 active developers, I
don't think Facelets currently has any (even Jacob hasn't had time to be
active lately). The biggest of those features above is the
"events/handlers" feature. This allows you to execute code much more
easily, in a MUCH more reusable way. Handlers are defined via
annotations, their I/O is checked and converted if possible, there are
many built-in handlers already available, etc. You can use the handler
feature in the Facelets syntax with JSFTemplating.
> The reason I am asking is that I have an application that is currently
> running on JSF+Facelet.
> So, I am trying to figure out the best way to enhance it.
I have heard a lot of positive things about the Facelets syntax -- many
people prefer it. That's the main reason JSFT has been working to
support the Facelets syntax. It already supports the basic features
(ui:composition, ui:include, ui:insert, ui:define, plus a couple more).
If you're used to that syntax, I'd suggest trying to use JSFT w/ that
syntax. However, if you want to play w/ the "template" syntax as well,
there's nothing preventing you from mixing in 1 or 2 pages w/ that syntax.

JSFT and Facelets can be configured to run side-by-side in the same
application. In fact we have a demo machine that has JSFT & Facelets
running in the same app and serves the same pages via different URLs
(one through JSFT and one through Facelets):

    http://www.jsftemplating.org/FaceletsDemo/

You can see the web.xml and faces-config.xml files to see what is needed
to configure this at:

    http://www.jsftemplating.org/FaceletsDemo/web.xml
    http://www.jsftemplating.org/FaceletsDemo/faces-config.xml

Let me know if you need any more info! I'll try to start updating the
outdated parts of the web site this week.

Thanks,

Ken