You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Grotzke <ma...@javakaffee.de> on 2007/05/25 18:52:50 UTC

Re: T5 How to have multiple modules with separate packages for pages

On Fri, 2007-05-25 at 21:52 +0800, 蝈蝈龙 wrote:
> I'm also trying to separate the packae in TP5.
> But I think the package may look like
> 
> // business layer
> org.comp.app.business.mod1
> org.comp.app.business.mod2
> 
> // dao layer
> org.comp.app.dao.mod1
> org.comp.app.dao.mod2
okay, but first horizontal layers and then vertical slices is not
what we want to have.

> But I don't know if we can specify several root packages for each module the
> presentation package. Is it really neccessary?
that's not really my requirement, but I want to be able to structure
my application after my preferences and though have it supported by
tapestry...

hopefully this is possible :)

cheers,
martin


> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 2007/5/25, Martin Grotzke <ma...@javakaffee.de>:
> >
> > Hi,
> >
> > I have a question concerning the configuration of tapestry5
> > with the context-param "tapestry.app-package" and the support
> > of multiple modules per application (several root-packages).
> >
> > We have an application that first has modules and then layers
> > for each module, like the following:
> >
> > org.comp.app.mod1.presentation
> > org.comp.app.mod1.business
> > org.comp.app.mod1.dao
> >
> > org.comp.app.mod2.presentation
> > org.comp.app.mod2.business
> > org.comp.app.mod2.dao
> >
> > the presentation packages shall contain subpackages
> > for services, pages and components, e.g.
> >
> > org.comp.app.mod1.presentation.pages
> > org.comp.app.mod1.presentation.components
> > org.comp.app.mod1.presentation.services
> >
> >
> > The quickstart archetype generated an AppModule class in
> > org.comp.app.mod1.presentation.services, but AFAICS
> > this is intended to configure the application, and therefore
> > should be located in a package like
> > org.comp.app.common.presentation.services.
> >
> > Then I would like to specify "org.comp.app" as the
> > "tapestry.app-package", or specify several root packages,
> > for each module the presentation package.
> >
> > I already tried the first approach, but it failed with 404 NOT_FOUND
> > if I requested a specific page at /app/mypage (e.g. with
> > MyPage.java in org.comp.app.mod1.presentation.pages).
> >
> > How is such an architecture supported by T5?
> >
> > Thanx in advance,
> > cheers,
> > Martin
> >
> >
> >
> >
-- 
Martin Grotzke
http://www.javakaffee.de/blog/

Re: T5 How to have multiple modules with separate packages for pages

Posted by Martin Grotzke <ma...@javakaffee.de>.
On Fri, 2007-05-25 at 18:52 +0200, Martin Grotzke wrote:
> On Fri, 2007-05-25 at 21:52 +0800, 蝈蝈龙 wrote:
> > I'm also trying to separate the packae in TP5.
> > But I think the package may look like
> > 
> > // business layer
> > org.comp.app.business.mod1
> > org.comp.app.business.mod2
> > 
> > // dao layer
> > org.comp.app.dao.mod1
> > org.comp.app.dao.mod2
> okay, but first horizontal layers and then vertical slices is not
> what we want to have.
> 
> > But I don't know if we can specify several root packages for each module the
> > presentation package. Is it really neccessary?
> that's not really my requirement, but I want to be able to structure
> my application after my preferences and though have it supported by
> tapestry...
> 
> hopefully this is possible :)
Howard, do you have any advice how we can have the described structure
(first modules, then layers) supported by T5?

What would have to be changed, or what would be the place in T5 that we
would have to customize for this?

Thx && cheers,
Martin


> 
> cheers,
> martin
> 
> 
> > 
> > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > 
> > 2007/5/25, Martin Grotzke <ma...@javakaffee.de>:
> > >
> > > Hi,
> > >
> > > I have a question concerning the configuration of tapestry5
> > > with the context-param "tapestry.app-package" and the support
> > > of multiple modules per application (several root-packages).
> > >
> > > We have an application that first has modules and then layers
> > > for each module, like the following:
> > >
> > > org.comp.app.mod1.presentation
> > > org.comp.app.mod1.business
> > > org.comp.app.mod1.dao
> > >
> > > org.comp.app.mod2.presentation
> > > org.comp.app.mod2.business
> > > org.comp.app.mod2.dao
> > >
> > > the presentation packages shall contain subpackages
> > > for services, pages and components, e.g.
> > >
> > > org.comp.app.mod1.presentation.pages
> > > org.comp.app.mod1.presentation.components
> > > org.comp.app.mod1.presentation.services
> > >
> > >
> > > The quickstart archetype generated an AppModule class in
> > > org.comp.app.mod1.presentation.services, but AFAICS
> > > this is intended to configure the application, and therefore
> > > should be located in a package like
> > > org.comp.app.common.presentation.services.
> > >
> > > Then I would like to specify "org.comp.app" as the
> > > "tapestry.app-package", or specify several root packages,
> > > for each module the presentation package.
> > >
> > > I already tried the first approach, but it failed with 404 NOT_FOUND
> > > if I requested a specific page at /app/mypage (e.g. with
> > > MyPage.java in org.comp.app.mod1.presentation.pages).
> > >
> > > How is such an architecture supported by T5?
> > >
> > > Thanx in advance,
> > > cheers,
> > > Martin
> > >
> > >
> > >
> > >
-- 
Martin Grotzke
http://www.javakaffee.de/blog/