Joseph,

I am trying to understand what Sitemesh is capable of and suitable for.  I
really appreciate your help in this.  The decorator pattern used by Sitemesh
is indeed very simple but your comments stating that it can be used for page
composition in a similar way to Tiles are what has confused me.

I think you have misunderstood the question that I was asking.  You seem to
be describing a method to reuse a template by specifying what "panes" to use
by accessing request parameters or session state.  For example:

http://mysite.com/template.jspa?main=content1&side=nav1
http://mysite.com/template.jspa?main=content2&side=nav2

If this is not what you are describing then please elaborate.  Obviously
this is not ideal.

The control mechanism is encoded in the URL which makes it public.  It is
also not easily managed.  Tiles provides a flexible page composition method
(defined in tiles-def.xml) which even allows lists of tiles to be used.
Using the request to encode this information is just not suitable.  For this
very simple example it may appear that this is OK but for more complicated
pages it would just not be practical.

Simple URL forms are what is required:

http://mysite.com/page1
http://mysite.com/page2

Here the definition for page1 is stored in the tiles definition file which
specifies the template page and which components to use.

Sitemesh and Tiles are both useful tools that solve different problems.
Sitemesh can easily enforce a consistent look to a web site by decorating
the content pages.  Tiles can help compose complex pages by arranging simple
components.

I am not suggesting that one tool is better than the other, just that they
have different purposes.  It would be possible to use both tools, Tiles to
compose a complex page from *many* components (think portal), and then to
enforce a consistent look using Sitemesh.

> Really? Why? Request state works just as well as session state in this
> system; if you have an objection to those, well... I'd love to see why,
> since they don't get clustered or have the overhead of other mechanisms.

Where did session state come into this conversation?

John.

----- Original Message ----- 
From: "Joseph Ottinger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 13, 2003 8:34 PM
Subject: Re: [OS-webwork] Webwork with Tiles


> On Sun, 13 Jul 2003, John Patterson wrote:
>
> >
> > > <page:applyDecorator name="panel" page="foo.action" />
> > >
> > > foo.action can do whatever it wants. It can also be controlled from
> > > information from the session if you like. Lo and behold.
> > >
> >
> > I assume that you mean you would include two such tags from within the
> > template page like this:
> >
> > <html>
> > <body>
> > <page:applyDecorator name="panel" page="foo.action" />
> > <br>
> > <page:applyDecorator name="panel" page="bar.action" />
> > </body>
> > </html>
> >
> > and then use the foo and bar actions to figure out what content to
include.
> > How can this same template be reused by a diferent page to dispaly
> > differnent content?
>
> foo and bar certainly have access to state, do they not?
>
> > I would not consider using request parameters or session state to make
this
> > choice an adequate solution.
> > What's more, decorators are really fundamentally simple and very easy to
> control in many ways, so to me, a lot of your objection or confusion seems
> strange; if you're fixated on Tiles, please use it. Nobody that I know of
> will hunt you down with torches or tar and feathers. Chances are, nobody
> will really care; we know how to get SiteMesh to do the same sort of thing
> in many ways (since it really puts very few limitations on you) and you
> don't see it; it's okay.
>
> -------------------------------------------------------------------
> Joseph B. Ottinger                         http://enigmastation.com
> IT Consultant                                [EMAIL PROTECTED]
> J2EE Editor - Java Developer's Journal   [EMAIL PROTECTED]
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to