You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Mindbridge <mi...@yahoo.com> on 2003/03/16 20:43:47 UTC

Application layout

Hi guys,

    With the new version Tapestry allows templates and specifications to be placed all over the place. Two main application layouts are emerging as a result of this; let's call them Layout A and Layout B:

Layout A (the new one):
    context/
        page templates
    context/WEB-INF/
        page/component specifications, component templates
    classpath/folderX
        page/component beans for X


Layout B (the old one):
    classpath/folderX
        page/component specifications for X, templates for X, and beans for X


Layout A is great for quick, script-like programs. Unfortunately, it _very_ quickly degenerates into a horrible mess.

Let's look at a simple example -- the Workbench.

Suppose you would like to demo it to a newbie. How would you explain it?

"Here under org.apache.tapestry.workbench you can see the the code for the various parts of the Workbench. For example, the code for the Palette is in the palette folder. This is just the Java code. If you want to see the templates of the pages, go to the context directory in the root. It contains all pages of the application. No, the templates for the Paletter are not in the palette folder, there is no such -- here everything is flat. Oh yeah, and if you want to see the specifications that bind the beans and the templates, go to the WEB-INF folder. Yes, the .page files are page specification and the .jwc files are for component specifications, you can distinguish them that way. What are the .html files? Oh, I forgot to tell you. The templates for the components go here, not in the context root..."


Personally, if I had to understand and work with a medium or large program (say 100+ pages) that uses Layout A, I would very quickly go nuts. Having to chase three different files of a single entity in _three_ different directories is just too much.

Once the program grows beyond a certain size, Layout B is the only manageable solution -- once you locate palette.jwc, you know that palette.html and palette.java are at the same place. And typically that place is a folder with a name that immediately lets you know the type of components/pages you can expect it to contain.


With this in mind, here is my question:

It is obvious that Layout A is perfect for starting to learn Tapestry, since it is an easy entry that minimizes the amount of knowledge necessary. But should ALL of the demo applications use this approach? Personally, when I look at a framework, I try to determine not how it would handle the easy cases, but how it would handle the hard ones (although an easy entry is much appreciated). Trying to understand the Workbench (for example) would have been a major pain for me as a newbie, since my attention would constantly have to jump from one place to another in order to understand what the hell is going on, and I would have immediately marked this as a minus.

Shouldn't we let only a small part of the examples use Layout A and return the rest to using Layout B?


Best regards,
-mb

Re: Application layout

Posted by Geoff Longman <gl...@intelligentworks.com>.
I'd like to participate in this discussion but not just now... I just spent
the whole night doing disaster recovery on a server at work. Can't form
coherent thoughts. Must sleeep...

Geoff
----- Original Message -----
From: "Howard M. Lewis Ship" <hl...@comcast.net>
To: "'Tapestry development'" <ta...@jakarta.apache.org>
Sent: Monday, July 14, 2003 3:15 PM
Subject: RE: Application layout


> What I still want is the ability to keep my templates near my assets
(images, stylesheets) so that
> WYSIWYG preview still works.  Something to explore for 3.1 is how we can
extend this organizational
> layout so that we can have our cake and eat it too ... I'm not sure
exactly how, yet!
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
>
>
>
> > -----Original Message-----
> > From: Mindbridge [mailto:mindbridgeweb@yahoo.com]
> > Sent: Sunday, March 16, 2003 2:44 PM
> > To: Tapestry development
> > Subject: Application layout
> >
> >
> > Hi guys,
> >
> >     With the new version Tapestry allows templates and
> > specifications to be placed all over the place. Two main
> > application layouts are emerging as a result of this; let's
> > call them Layout A and Layout B:
> >
> > Layout A (the new one):
> >     context/
> >         page templates
> >     context/WEB-INF/
> >         page/component specifications, component templates
> >     classpath/folderX
> >         page/component beans for X
> >
> >
> > Layout B (the old one):
> >     classpath/folderX
> >         page/component specifications for X, templates for X,
> > and beans for X
> >
> >
> > Layout A is great for quick, script-like programs.
> > Unfortunately, it _very_ quickly degenerates into a horrible mess.
> >
> > Let's look at a simple example -- the Workbench.
> >
> > Suppose you would like to demo it to a newbie. How would you
> > explain it?
> >
> > "Here under org.apache.tapestry.workbench you can see the the
> > code for the various parts of the Workbench. For example, the
> > code for the Palette is in the palette folder. This is just
> > the Java code. If you want to see the templates of the pages,
> > go to the context directory in the root. It contains all
> > pages of the application. No, the templates for the Paletter
> > are not in the palette folder, there is no such -- here
> > everything is flat. Oh yeah, and if you want to see the
> > specifications that bind the beans and the templates, go to
> > the WEB-INF folder. Yes, the .page files are page
> > specification and the .jwc files are for component
> > specifications, you can distinguish them that way. What are
> > the .html files? Oh, I forgot to tell you. The templates for
> > the components go here, not in the context root..."
> >
> >
> > Personally, if I had to understand and work with a medium or
> > large program (say 100+ pages) that uses Layout A, I would
> > very quickly go nuts. Having to chase three different files
> > of a single entity in _three_ different directories is just too much.
> >
> > Once the program grows beyond a certain size, Layout B is the
> > only manageable solution -- once you locate palette.jwc, you
> > know that palette.html and palette.java are at the same
> > place. And typically that place is a folder with a name that
> > immediately lets you know the type of components/pages you
> > can expect it to contain.
> >
> >
> > With this in mind, here is my question:
> >
> > It is obvious that Layout A is perfect for starting to learn
> > Tapestry, since it is an easy entry that minimizes the amount
> > of knowledge necessary. But should ALL of the demo
> > applications use this approach? Personally, when I look at a
> > framework, I try to determine not how it would handle the
> > easy cases, but how it would handle the hard ones (although
> > an easy entry is much appreciated). Trying to understand the
> > Workbench (for example) would have been a major pain for me
> > as a newbie, since my attention would constantly have to jump
> > from one place to another in order to understand what the
> > hell is going on, and I would have immediately marked this as a minus.
> >
> > Shouldn't we let only a small part of the examples use Layout
> > A and return the rest to using Layout B?
> >
> >
> > Best regards,
> > -mb
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


RE: Application layout

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
What I still want is the ability to keep my templates near my assets (images, stylesheets) so that
WYSIWYG preview still works.  Something to explore for 3.1 is how we can extend this organizational
layout so that we can have our cake and eat it too ... I'm not sure exactly how, yet!

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Mindbridge [mailto:mindbridgeweb@yahoo.com] 
> Sent: Sunday, March 16, 2003 2:44 PM
> To: Tapestry development
> Subject: Application layout
> 
> 
> Hi guys,
> 
>     With the new version Tapestry allows templates and 
> specifications to be placed all over the place. Two main 
> application layouts are emerging as a result of this; let's 
> call them Layout A and Layout B:
> 
> Layout A (the new one):
>     context/
>         page templates
>     context/WEB-INF/
>         page/component specifications, component templates
>     classpath/folderX
>         page/component beans for X
> 
> 
> Layout B (the old one):
>     classpath/folderX
>         page/component specifications for X, templates for X, 
> and beans for X
> 
> 
> Layout A is great for quick, script-like programs. 
> Unfortunately, it _very_ quickly degenerates into a horrible mess.
> 
> Let's look at a simple example -- the Workbench.
> 
> Suppose you would like to demo it to a newbie. How would you 
> explain it?
> 
> "Here under org.apache.tapestry.workbench you can see the the 
> code for the various parts of the Workbench. For example, the 
> code for the Palette is in the palette folder. This is just 
> the Java code. If you want to see the templates of the pages, 
> go to the context directory in the root. It contains all 
> pages of the application. No, the templates for the Paletter 
> are not in the palette folder, there is no such -- here 
> everything is flat. Oh yeah, and if you want to see the 
> specifications that bind the beans and the templates, go to 
> the WEB-INF folder. Yes, the .page files are page 
> specification and the .jwc files are for component 
> specifications, you can distinguish them that way. What are 
> the .html files? Oh, I forgot to tell you. The templates for 
> the components go here, not in the context root..."
> 
> 
> Personally, if I had to understand and work with a medium or 
> large program (say 100+ pages) that uses Layout A, I would 
> very quickly go nuts. Having to chase three different files 
> of a single entity in _three_ different directories is just too much.
> 
> Once the program grows beyond a certain size, Layout B is the 
> only manageable solution -- once you locate palette.jwc, you 
> know that palette.html and palette.java are at the same 
> place. And typically that place is a folder with a name that 
> immediately lets you know the type of components/pages you 
> can expect it to contain.
> 
> 
> With this in mind, here is my question:
> 
> It is obvious that Layout A is perfect for starting to learn 
> Tapestry, since it is an easy entry that minimizes the amount 
> of knowledge necessary. But should ALL of the demo 
> applications use this approach? Personally, when I look at a 
> framework, I try to determine not how it would handle the 
> easy cases, but how it would handle the hard ones (although 
> an easy entry is much appreciated). Trying to understand the 
> Workbench (for example) would have been a major pain for me 
> as a newbie, since my attention would constantly have to jump 
> from one place to another in order to understand what the 
> hell is going on, and I would have immediately marked this as a minus.
> 
> Shouldn't we let only a small part of the examples use Layout 
> A and return the rest to using Layout B?
> 
> 
> Best regards,
> -mb
>