You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <P....@albourne.com> on 2009/04/15 09:21:52 UTC

Package for base pages

Hi,

Regarding a quote from the docs here:
http://tapestry.formos.com/nightly/tapestry5/guide/component-classes.html

Component Packages:
... "In addition, it is common for an application to have base classes, often abstract base classes, that should not be directly referenced. These should not go in the pages, components or mixins packages, because they then look like valid pages, components or mixins. Instead, use the root.base package to store such base classes."

Does this imply put only your 'abstract' base class in base? I am currently using base classes (not abstract) and placing them in the components package. What is the consequence of this, if any? my understanding is these should NOT go in base, is this correct?

Thanks, 
Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Package for base pages

Posted by Inge Solvoll <in...@gmail.com>.
I guess the only consequence is that your base page is regarded as a
regularly accessible page/component by tapestry. I have such base components
myself, and did some thinking about this. I don't like having too many
duplicate packages like the example below, but I don't see another way out
when using (possibly abstract) base classes:

tapestryroot.base.mymodule.blabla.AbstractBaseComponent
tapestryroot.components.mymodule.blabla.AbstractBaseComponent
tapestryroot.pages.mymodule.blabla.AbstractBaseComponent

On Wed, Apr 15, 2009 at 9:21 AM, Peter Stavrinides <
P.Stavrinides@albourne.com> wrote:

> Hi,
>
> Regarding a quote from the docs here:
> http://tapestry.formos.com/nightly/tapestry5/guide/component-classes.html
>
> Component Packages:
> ... "In addition, it is common for an application to have base classes,
> often abstract base classes, that should not be directly referenced. These
> should not go in the pages, components or mixins packages, because they then
> look like valid pages, components or mixins. Instead, use the root.base
> package to store such base classes."
>
> Does this imply put only your 'abstract' base class in base? I am currently
> using base classes (not abstract) and placing them in the components
> package. What is the consequence of this, if any? my understanding is these
> should NOT go in base, is this correct?
>
> Thanks,
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>