You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by David Geary <sa...@earthlink.net> on 2001/10/02 21:30:53 UTC

Proposal: Template Tags

BACKGROUND:

About a year ago, I developed a custom tag library that implements JSP
Templates. Templates let you to build JSP pages from pluggable
components by encapsulating RequestDispatcher includes in custom tags. I
wrote an article about that tag library for JavaWorld, which you can
read at:
http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html

I contributed the templates tag library to the Apache Struts JSP
framework. Subsequently, I received a great deal of feedback from
JavaWorld readers and Struts users concerning that library, and I
incorporated that feedback into a second-generation template tag library
that I rewrote from scratch.

The second-generation tag library implements the Composite and Strategy
design patterns, which results in some features that were not present in
the original library, such as creating new templates that "inherit" from
an existing template. You can read about that tag library at:
http://www.phptr.com/advjsp/pdf/ch4_mod.pdf.

PROPOSAL:

I would like to contribute the 2nd generation templates tag libary to
Jakarta Taglibs. I doubt that I can update the Struts tag library,
because the syntax of the tags in the 2nd generation library is
different than the original, which would break many existing struts
applications. Therefore, I would like to contribute the library to
Jakarta Taglibs. (Note: the 2nd generation taglib can coexist peacefully
with the original library in Struts, so Struts users could choose
between the two).

BENEFITS:

As you can see from http://www.phptr.com/advjsp/pdf/ch4_mod.pdf, there
are many benefits to the templates tag library. With the templates tag
library, you can create modular JSP pages from pluggable components, in
much the same way that you can build GUI applications with the AWT and
Swing.

Templates can have optional and role-based content, and you can nest
templates within other templates anyway you see fit. Templates can be
defined somewhere other than where they are used, which allows template
definitions to be grouped in a single file, simplifying their
maintenance. Templates can "inherit" their definitions from existing
templates, which makes them easier to create and understand.

This 2nd generation template library is a solid implementation that has
been subjected to public scrutiny, and has been refactored a number of
times to eliminate bugs and add features. I think it would make a great
addition to Jakarta Taglibs.


david geary


Re: Proposal: Template Tags

Posted by Ted Husted <hu...@apache.org>.
David Geary wrote:
> As I see it, there are three ways this can be resolved:
> 2. Submit both systems to jakarta-taglibs.

+1 -- if necessary

> 3. Cedric and I submit a system that includes the best features from both.

++1 -- if it works for you guys!

Struts is very interested in being a good Jakarta citizen, and getting
these codebases out where they can get the most exposure ;-)

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/

Re: Proposal: Template Tags

Posted by Cedric Dumoulin <ce...@lifl.fr>.


> As I see it, there are three ways this can be resolved:
>
> 1. Do nothing.
> 2. Submit both systems to jakarta-taglibs.
> 3. Cedric and I submit a system that includes the best features from both.
>
> Option No. 3 seems to make the most sense to me. I will discuss this with Cedric
> privately and see what we can come up with.
>
> david

  I also agree with option No. 3 ;-)

    Cedric



Re: Proposal: Template Tags

Posted by David Geary <sa...@earthlink.net>.
Jeff Turner wrote:

> >   And, as already said in an old mail, I think that it would benefit to
> > users to share ideas about templating/web-components and discuss rather than
> > working alone ...
>
> Too late ;) The fact is, two good quality, mature templating systems
> exist.
>
> I'm in the "more the merrier" camp. If both Tiles and Templates2 were in
> jakarta-taglibs, and their differences clearly documented, I can't
> imagine users complaining.

As I see it, there are three ways this can be resolved:

1. Do nothing.
2. Submit both systems to jakarta-taglibs.
3. Cedric and I submit a system that includes the best features from both.

Option No. 3 seems to make the most sense to me. I will discuss this with Cedric
privately and see what we can come up with.


david


Re: Proposal: Template Tags

Posted by David Geary <sa...@earthlink.net>.
Jeff Turner wrote:

> >   And, as already said in an old mail, I think that it would benefit to
> > users to share ideas about templating/web-components and discuss rather than
> > working alone ...
>
> Too late ;) The fact is, two good quality, mature templating systems
> exist.
>
> I'm in the "more the merrier" camp. If both Tiles and Templates2 were in
> jakarta-taglibs, and their differences clearly documented, I can't
> imagine users complaining.

As I see it, there are three ways this can be resolved:

1. Do nothing.
2. Submit both systems to jakarta-taglibs.
3. Cedric and I submit a system that includes the best features from both.

Option No. 3 seems to make the most sense to me. I will discuss this with Cedric
privately and see what we can come up with.


david


Re: Proposal: Template Tags

Posted by Ted Husted <hu...@apache.org>.
Jeff Turner wrote:
> Well look at two other taglibs that come with Struts:
> 
> http://jakarta.apache.org/struts/struts-bean.html
> http://jakarta.apache.org/struts/struts-logic.html
> 
> They ought to be in jakarta-taglibs too ;)

Yes, they should be. We're just avoiding doinging anything about taglibs
right now, while the JSPTL shakes out. 

I think we'd like to see any general-purpose tags hosted here, with
Struts just hosting those that are strongly tied to the framework (e.g.
html). 

We have already moved other utilities to the commons, and deprecated our
versions for the next release. The JSPTL FUD is the only reason why we
haven't done the same with the taglibs.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/

Re: Proposal: Template Tags

Posted by Jeff Turner <je...@socialchange.net.au>.
On Wed, Oct 03, 2001 at 05:02:34PM +0200, Cedric Dumoulin wrote:
> 
>   There is already a very similar "extended template" taglib, called Tiles,
> in the contrib part of Struts project.
>   Doesn't two very similar taglib in different jakarta project will confuse
> users ?

Well look at two other taglibs that come with Struts:

http://jakarta.apache.org/struts/struts-bean.html
http://jakarta.apache.org/struts/struts-logic.html

They ought to be in jakarta-taglibs too ;)

> Maybe the Tiles taglib is not at its right place now and should be
> move in taglib.

I think so. We're using Tiles, and the struts jars are just collecting
dust.

> Tiles are actually in Struts contrib for historical reasons, but
> they can be used independantly from Struts, and for sure with taglibs.
> Tiles already provide the same tag behaviors as the ones describe in
> David's chapter, but with different names.
> 
>   And, as already said in an old mail, I think that it would benefit to
> users to share ideas about templating/web-components and discuss rather than
> working alone ...

Too late ;) The fact is, two good quality, mature templating systems
exist.

I'm in the "more the merrier" camp. If both Tiles and Templates2 were in
jakarta-taglibs, and their differences clearly documented, I can't
imagine users complaining. 

--Jeff

>   Cedric

Re: Proposal: Template Tags

Posted by Jeff Turner <je...@socialchange.net.au>.
On Wed, Oct 03, 2001 at 05:02:34PM +0200, Cedric Dumoulin wrote:
> 
>   There is already a very similar "extended template" taglib, called Tiles,
> in the contrib part of Struts project.
>   Doesn't two very similar taglib in different jakarta project will confuse
> users ?

Well look at two other taglibs that come with Struts:

http://jakarta.apache.org/struts/struts-bean.html
http://jakarta.apache.org/struts/struts-logic.html

They ought to be in jakarta-taglibs too ;)

> Maybe the Tiles taglib is not at its right place now and should be
> move in taglib.

I think so. We're using Tiles, and the struts jars are just collecting
dust.

> Tiles are actually in Struts contrib for historical reasons, but
> they can be used independantly from Struts, and for sure with taglibs.
> Tiles already provide the same tag behaviors as the ones describe in
> David's chapter, but with different names.
> 
>   And, as already said in an old mail, I think that it would benefit to
> users to share ideas about templating/web-components and discuss rather than
> working alone ...

Too late ;) The fact is, two good quality, mature templating systems
exist.

I'm in the "more the merrier" camp. If both Tiles and Templates2 were in
jakarta-taglibs, and their differences clearly documented, I can't
imagine users complaining. 

--Jeff

>   Cedric

RE: Proposal: Template Tags

Posted by Steve Barrett <sb...@eurovisual.co.uk>.
I believe Cedric's words seem a little harse from what is clearly an attempt
to further publicise and share his work with the taglibs community.

I am currently digesting the core J2EE Patterns book and hit on the
Composite View Pattern almost simultaneously with David's posting appearing
on the taglibs mailing list. For me it was good timing and very useful.

Sure I would prefer a common single solution but what can you expect when an
alternative taglib solution is hidden away in a project that I am not
interested in at this point in time.

The best of breed of two solutions will obviously be favourable so if
someone can digest the two solutions and register the best (or even a
hybrid) with taglibs then great. In the meantime David's approach works for
me.

Steve

-----Original Message-----
From: Cedric Dumoulin [mailto:cedric.dumoulin@lifl.fr]
Sent: 03 October 2001 16:03
To: taglibs-user@jakarta.apache.org; taglibs-dev@jakarta.apache.org
Subject: Re: Proposal: Template Tags



  There is already a very similar "extended template" taglib, called Tiles,
in the contrib part of Struts project.
  Doesn't two very similar taglib in different jakarta project will confuse
users ?

  Maybe the Tiles taglib is not at its right place now and should be move in
taglib. Tiles are actually in Struts contrib for historical reasons, but
they can be used independantly from Struts, and for sure with taglibs.
  Tiles already provide the same tag behaviors as the ones describe in
David's chapter, but with different names.

  And, as already said in an old mail, I think that it would benefit to
users to share ideas about templating/web-components and discuss rather than
working alone ...

  Cedric


David Geary wrote:

> BACKGROUND:
>
> About a year ago, I developed a custom tag library that implements JSP
> Templates. Templates let you to build JSP pages from pluggable
> components by encapsulating RequestDispatcher includes in custom tags. I
> wrote an article about that tag library for JavaWorld, which you can
> read at:
> http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html
>
> I contributed the templates tag library to the Apache Struts JSP
> framework. Subsequently, I received a great deal of feedback from
> JavaWorld readers and Struts users concerning that library, and I
> incorporated that feedback into a second-generation template tag library
> that I rewrote from scratch.
>
> The second-generation tag library implements the Composite and Strategy
> design patterns, which results in some features that were not present in
> the original library, such as creating new templates that "inherit" from
> an existing template. You can read about that tag library at:
> http://www.phptr.com/advjsp/pdf/ch4_mod.pdf.
>
> PROPOSAL:
>
> I would like to contribute the 2nd generation templates tag libary to
> Jakarta Taglibs. I doubt that I can update the Struts tag library,
> because the syntax of the tags in the 2nd generation library is
> different than the original, which would break many existing struts
> applications. Therefore, I would like to contribute the library to
> Jakarta Taglibs. (Note: the 2nd generation taglib can coexist peacefully
> with the original library in Struts, so Struts users could choose
> between the two).
>
> BENEFITS:
>
> As you can see from http://www.phptr.com/advjsp/pdf/ch4_mod.pdf, there
> are many benefits to the templates tag library. With the templates tag
> library, you can create modular JSP pages from pluggable components, in
> much the same way that you can build GUI applications with the AWT and
> Swing.
>
> Templates can have optional and role-based content, and you can nest
> templates within other templates anyway you see fit. Templates can be
> defined somewhere other than where they are used, which allows template
> definitions to be grouped in a single file, simplifying their
> maintenance. Templates can "inherit" their definitions from existing
> templates, which makes them easier to create and understand.
>
> This 2nd generation template library is a solid implementation that has
> been subjected to public scrutiny, and has been refactored a number of
> times to eliminate bugs and add features. I think it would make a great
> addition to Jakarta Taglibs.
>
> david geary



Re: Proposal: Template Tags

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  There is already a very similar "extended template" taglib, called Tiles,
in the contrib part of Struts project.
  Doesn't two very similar taglib in different jakarta project will confuse
users ?

  Maybe the Tiles taglib is not at its right place now and should be move in
taglib. Tiles are actually in Struts contrib for historical reasons, but
they can be used independantly from Struts, and for sure with taglibs.
  Tiles already provide the same tag behaviors as the ones describe in
David's chapter, but with different names.

  And, as already said in an old mail, I think that it would benefit to
users to share ideas about templating/web-components and discuss rather than
working alone ...

  Cedric


David Geary wrote:

> BACKGROUND:
>
> About a year ago, I developed a custom tag library that implements JSP
> Templates. Templates let you to build JSP pages from pluggable
> components by encapsulating RequestDispatcher includes in custom tags. I
> wrote an article about that tag library for JavaWorld, which you can
> read at:
> http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html
>
> I contributed the templates tag library to the Apache Struts JSP
> framework. Subsequently, I received a great deal of feedback from
> JavaWorld readers and Struts users concerning that library, and I
> incorporated that feedback into a second-generation template tag library
> that I rewrote from scratch.
>
> The second-generation tag library implements the Composite and Strategy
> design patterns, which results in some features that were not present in
> the original library, such as creating new templates that "inherit" from
> an existing template. You can read about that tag library at:
> http://www.phptr.com/advjsp/pdf/ch4_mod.pdf.
>
> PROPOSAL:
>
> I would like to contribute the 2nd generation templates tag libary to
> Jakarta Taglibs. I doubt that I can update the Struts tag library,
> because the syntax of the tags in the 2nd generation library is
> different than the original, which would break many existing struts
> applications. Therefore, I would like to contribute the library to
> Jakarta Taglibs. (Note: the 2nd generation taglib can coexist peacefully
> with the original library in Struts, so Struts users could choose
> between the two).
>
> BENEFITS:
>
> As you can see from http://www.phptr.com/advjsp/pdf/ch4_mod.pdf, there
> are many benefits to the templates tag library. With the templates tag
> library, you can create modular JSP pages from pluggable components, in
> much the same way that you can build GUI applications with the AWT and
> Swing.
>
> Templates can have optional and role-based content, and you can nest
> templates within other templates anyway you see fit. Templates can be
> defined somewhere other than where they are used, which allows template
> definitions to be grouped in a single file, simplifying their
> maintenance. Templates can "inherit" their definitions from existing
> templates, which makes them easier to create and understand.
>
> This 2nd generation template library is a solid implementation that has
> been subjected to public scrutiny, and has been refactored a number of
> times to eliminate bugs and add features. I think it would make a great
> addition to Jakarta Taglibs.
>
> david geary


Re: Proposal: Template Tags

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  There is already a very similar "extended template" taglib, called Tiles,
in the contrib part of Struts project.
  Doesn't two very similar taglib in different jakarta project will confuse
users ?

  Maybe the Tiles taglib is not at its right place now and should be move in
taglib. Tiles are actually in Struts contrib for historical reasons, but
they can be used independantly from Struts, and for sure with taglibs.
  Tiles already provide the same tag behaviors as the ones describe in
David's chapter, but with different names.

  And, as already said in an old mail, I think that it would benefit to
users to share ideas about templating/web-components and discuss rather than
working alone ...

  Cedric


David Geary wrote:

> BACKGROUND:
>
> About a year ago, I developed a custom tag library that implements JSP
> Templates. Templates let you to build JSP pages from pluggable
> components by encapsulating RequestDispatcher includes in custom tags. I
> wrote an article about that tag library for JavaWorld, which you can
> read at:
> http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html
>
> I contributed the templates tag library to the Apache Struts JSP
> framework. Subsequently, I received a great deal of feedback from
> JavaWorld readers and Struts users concerning that library, and I
> incorporated that feedback into a second-generation template tag library
> that I rewrote from scratch.
>
> The second-generation tag library implements the Composite and Strategy
> design patterns, which results in some features that were not present in
> the original library, such as creating new templates that "inherit" from
> an existing template. You can read about that tag library at:
> http://www.phptr.com/advjsp/pdf/ch4_mod.pdf.
>
> PROPOSAL:
>
> I would like to contribute the 2nd generation templates tag libary to
> Jakarta Taglibs. I doubt that I can update the Struts tag library,
> because the syntax of the tags in the 2nd generation library is
> different than the original, which would break many existing struts
> applications. Therefore, I would like to contribute the library to
> Jakarta Taglibs. (Note: the 2nd generation taglib can coexist peacefully
> with the original library in Struts, so Struts users could choose
> between the two).
>
> BENEFITS:
>
> As you can see from http://www.phptr.com/advjsp/pdf/ch4_mod.pdf, there
> are many benefits to the templates tag library. With the templates tag
> library, you can create modular JSP pages from pluggable components, in
> much the same way that you can build GUI applications with the AWT and
> Swing.
>
> Templates can have optional and role-based content, and you can nest
> templates within other templates anyway you see fit. Templates can be
> defined somewhere other than where they are used, which allows template
> definitions to be grouped in a single file, simplifying their
> maintenance. Templates can "inherit" their definitions from existing
> templates, which makes them easier to create and understand.
>
> This 2nd generation template library is a solid implementation that has
> been subjected to public scrutiny, and has been refactored a number of
> times to eliminate bugs and add features. I think it would make a great
> addition to Jakarta Taglibs.
>
> david geary