Re: Templating

Discussion in 'Java' started by Arne Vajhøj, Aug 12, 2009.

  1. Arne Vajhøj

    Arne Vajhøj Guest

    Spud wrote:
    > We're looking for a way to do web page templates, so graphic designers
    > don't have to work around code in our JSPs, and so we can be a bit more
    > MVC-ish. I've looked at Freemarker, Velocity, and taglibs. I know there
    > are others.
    >
    > What are the most popular ways people do this?
    >
    > (Not necessarily the best, just the most popular).


    I would go for JSF and Facelets. It is valid XHTML.

    Velocity is also used - especially some years ago. But it does
    not really separate the HTML from the logic - it just uses a different
    language than JSP.

    Arne
    Arne Vajhøj, Aug 12, 2009
    #1
    1. Advertising

  2. Arne Vajhøj

    Lew Guest

    Arne Vajhøj wrote:
    > Spud wrote:
    >> We're looking for a way to do web page templates, so graphic designers
    >> don't have to work around code in our JSPs, and so we can be a bit
    >> more MVC-ish. I've looked at Freemarker, Velocity, and taglibs. I know
    >> there are others.
    >>
    >> What are the most popular ways people do this?
    >>
    >> (Not necessarily the best, just the most popular).

    >
    > I would go for JSF and Facelets. It is valid XHTML.


    I've heard many developers swear by them. From what they've told me, they're
    easy to work with and very flexible.

    --
    Lew
    Lew, Aug 12, 2009
    #2
    1. Advertising

  3. Lew wrote:
    > Arne Vajhøj wrote:
    >> Spud wrote:
    >>> We're looking for a way to do web page templates, so graphic
    >>> designers don't have to work around code in our JSPs, and so we can
    >>> be a bit more MVC-ish. I've looked at Freemarker, Velocity, and
    >>> taglibs. I know there are others.
    >>>
    >>> What are the most popular ways people do this?
    >>>
    >>> (Not necessarily the best, just the most popular).

    >>
    >> I would go for JSF and Facelets. It is valid XHTML.

    >
    > I've heard many developers swear by them. From what they've told me,
    > they're easy to work with and very flexible.


    They just turn things a little bit around.

    JSP:

    <h:eek:utputText value="#{locale['foobar']}"/>

    Facelet:

    <span jsfc="h:eek:utputText">#{locale['foobar']}</span>

    Exact same information seen from the programmer perspective.

    But the last versions will look much more natural to both
    the HTML designer and to a HTML editor.

    Arne
    Arne Vajhøj, Aug 12, 2009
    #3
  4. Arne Vajhøj wrote:
    > Lew wrote:
    >> Arne Vajhøj wrote:
    >>> Spud wrote:
    >>>> We're looking for a way to do web page templates, so graphic
    >>>> designers don't have to work around code in our JSPs, and so we can
    >>>> be a bit more MVC-ish. I've looked at Freemarker, Velocity, and
    >>>> taglibs. I know there are others.
    >>>>
    >>>> What are the most popular ways people do this?
    >>>>
    >>>> (Not necessarily the best, just the most popular).
    >>>
    >>> I would go for JSF and Facelets. It is valid XHTML.

    >>
    >> I've heard many developers swear by them. From what they've told me,
    >> they're easy to work with and very flexible.

    >
    > They just turn things a little bit around.
    >
    > JSP:
    >
    > <h:eek:utputText value="#{locale['foobar']}"/>
    >
    > Facelet:
    >
    > <span jsfc="h:eek:utputText">#{locale['foobar']}</span>
    >
    > Exact same information seen from the programmer perspective.
    >
    > But the last versions will look much more natural to both
    > the HTML designer and to a HTML editor.


    Besides that Facelets also comes with a composition feature
    that (if you allow me to oversimplify) is similar but better
    than Tiles.

    Arne
    Arne Vajhøj, Aug 12, 2009
    #4
  5. Spud wrote:
    > Arne Vajhøj wrote:
    >> Arne Vajhøj wrote:
    >>> Lew wrote:
    >>>> Arne Vajhøj wrote:
    >>>>> Spud wrote:
    >>>>>> We're looking for a way to do web page templates, so graphic
    >>>>>> designers don't have to work around code in our JSPs, and so we
    >>>>>> can be a bit more MVC-ish. I've looked at Freemarker, Velocity,
    >>>>>> and taglibs. I know there are others.
    >>>>>>
    >>>>>> What are the most popular ways people do this?
    >>>>>>
    >>>>>> (Not necessarily the best, just the most popular).
    >>>>>
    >>>>> I would go for JSF and Facelets. It is valid XHTML.
    >>>>
    >>>> I've heard many developers swear by them. From what they've told
    >>>> me, they're easy to work with and very flexible.
    >>>
    >>> They just turn things a little bit around.
    >>>
    >>> JSP:
    >>>
    >>> <h:eek:utputText value="#{locale['foobar']}"/>
    >>>
    >>> Facelet:
    >>>
    >>> <span jsfc="h:eek:utputText">#{locale['foobar']}</span>
    >>>
    >>> Exact same information seen from the programmer perspective.
    >>>
    >>> But the last versions will look much more natural to both
    >>> the HTML designer and to a HTML editor.

    >>
    >> Besides that Facelets also comes with a composition feature
    >> that (if you allow me to oversimplify) is similar but better
    >> than Tiles.

    >
    > Facelets look interesting, but a look at the mailing list suggests that
    > interest is waning:
    >
    > https://facelets.dev.java.net/servlets/SummarizeList?listName=users
    >
    > The peak was about two years ago.
    >
    > I didn't find a similar JSF mailing list. This is about the closest, I
    > think:
    >
    > http://mail-archives.apache.org/mod_mbox/myfaces-users/
    >
    > Interest is also down from two years ago.
    >
    > Anything else out there which is gaining (or has sustained) popularity?


    JSF is still growing in popularity as projects migrate from
    Struts 1 to JSF.

    Facelets is not hot today as it were 3-4 years ago.

    Those that has requirements that fits well with facelets
    have chosen facelets and have learned to use it.

    Those with other requirements has tried facelets and
    concluded that it was not them.

    Nothing surprising in that the activity of a mail list
    drops after a few years.

    It can just as well reflect maturity as decrease
    in usage.

    But facelets is a niche technology.

    Struts 1 with JSP and JSF with JSP is by far the two
    biggest in the Java web app world.

    But you asked specifically for something that would
    isolate designers from code. And given that requirement
    Facelets seems as an obvious pick to me.

    Arne
    Arne Vajhøj, Aug 12, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lloyd christopher

    html templating advice.

    lloyd christopher, Oct 22, 2003, in forum: Perl
    Replies:
    2
    Views:
    455
    lloyd christopher
    Oct 22, 2003
  2. Frank Rizzo

    Page Templating in ASP.NET

    Frank Rizzo, Jan 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    326
    Maxim V. Karpov
    Jan 19, 2004
  3. Showjumper

    Page templating question

    Showjumper, Jan 22, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    294
    Steve C. Orr [MVP, MCSD]
    Jan 22, 2004
  4. Patrick Kristiansen

    Templating technique

    Patrick Kristiansen, Jan 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    338
    Natty Gur
    Jan 26, 2004
  5. Showjumper
    Replies:
    0
    Views:
    299
    Showjumper
    Feb 3, 2004
Loading...

Share This Page