You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by David Teare <dt...@tearesolutions.com> on 2004/12/05 19:11:51 UTC
Structuring medium to large applications
Hi all,
I have used Tapestry for several small applications and have really
enjoyed the productivity gains it provides. Since the projects were so
small, I took a naive approach to structuring the template and page
definitions - I put them all under WEB-INF. My current project plans on
having many more pages and it is becoming obvious that I need to have a
more structured approach. I had planned on the following setup for pages:
WEB-INF
+---end-user
+---admin
+---common
+---portlets
I am not sure if this is how Tapestry expects page directories to be
structured. I found that it works great when performing
cycle.activate("admin/Home") from the Java side, but it breaks down in
the templates - it seems that @PageLink doesn't allow directory
prefixes, nor can I include my own custom components when they are in a
subdirectory.
Has anyone had any success with this approach? Or, perhaps there is a
better way that I am missing.
Thanks!
--Dave.
--
------------------------------------------------------------------------
Cheers,
David Teare - IT Consultant
Teare Software Solutions Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Structuring medium to large applications
Posted by David Teare <dt...@tearesolutions.com>.
I saw a post by Howard on Mike Henderson's blog regarding this. It
looks like 3.1 will do exactly what I wanted - the ability to use
directory names in the page names within components.
For now I went with the Specification Resolver extension approach. It
seems to be working well - at least until 3.1 comes along.
--Dave.
Jamie Orchard-Hays wrote:
> He's making major changes for 3.1. If you look at the commits for the
> past few days, Howard has completely revamped the whole URL thing.
> I'm not sure how configurable this aspect is. Have a peek at the dev
> list and WIKI and make any suggestions you have to Howard.
>
> jamie
> On Dec 5, 2004, at 1:51 PM, David Teare wrote:
>
>> Thanks - that should work fine.
>> I wonder, however, if there is an easier way. I'm a big believer in
>> "Convention before Configuration", meaning that I don't think I
>> should have to define all my pages in XML simply to allow pages to
>> be structured in directories. In the Java page, the
>> cycle.activate("user/Home") works fine by convention, without it
>> being defined in XML.
>> Should I write a custom PageLink to enable this in templates too?
>> Surely Mr. HLS has already thought of something I can leverage -
>> everytime I think he overlooked something I find out the framework
>> already provided a solution that I didn't know of :)
>>
>> --Dave.
>>
>> Jamie Orchard-Hays wrote:
>>
>>> David, you can just define the location of your files in the
>>> .application. See the dtd for more info.
>>>
>>> eg: <page name="About" specification-path="/WEB-INF/About.page"/>
>>>
>>>
>>>
>>> On Dec 5, 2004, at 1:11 PM, David Teare wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have used Tapestry for several small applications and have
>>>> really enjoyed the productivity gains it provides. Since the
>>>> projects were so small, I took a naive approach to structuring
>>>> the template and page definitions - I put them all under
>>>> WEB-INF. My current project plans on having many more pages and
>>>> it is becoming obvious that I need to have a more structured
>>>> approach. I had planned on the following setup for pages:
>>>>
>>>> WEB-INF
>>>> +---end-user
>>>> +---admin
>>>> +---common
>>>> +---portlets
>>>>
>>>> I am not sure if this is how Tapestry expects page directories to
>>>> be structured. I found that it works great when performing
>>>> cycle.activate("admin/Home") from the Java side, but it breaks
>>>> down in the templates - it seems that @PageLink doesn't allow
>>>> directory prefixes, nor can I include my own custom components
>>>> when they are in a subdirectory.
>>>> Has anyone had any success with this approach? Or, perhaps there
>>>> is a better way that I am missing.
>>>>
>>>> Thanks!
>>>> --Dave.
>>>>
>>>> --
>>>> ---------------------------------------------------------------------
>>>> -- -
>>>> Cheers,
>>>> David Teare - IT Consultant
>>>> Teare Software Solutions Inc.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> tapestry-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>> --
>> -----------------------------------------------------------------------
>> -
>> Cheers,
>> David Teare - IT Consultant
>> Teare Software Solutions Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
------------------------------------------------------------------------
Cheers,
David Teare - IT Consultant
Teare Software Solutions Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Structuring medium to large applications
Posted by Jamie Orchard-Hays <ja...@dang.com>.
He's making major changes for 3.1. If you look at the commits for the
past few days, Howard has completely revamped the whole URL thing. I'm
not sure how configurable this aspect is. Have a peek at the dev list
and WIKI and make any suggestions you have to Howard.
jamie
On Dec 5, 2004, at 1:51 PM, David Teare wrote:
> Thanks - that should work fine.
> I wonder, however, if there is an easier way. I'm a big believer in
> "Convention before Configuration", meaning that I don't think I should
> have to define all my pages in XML simply to allow pages to be
> structured in directories. In the Java page, the
> cycle.activate("user/Home") works fine by convention, without it being
> defined in XML.
> Should I write a custom PageLink to enable this in templates too?
> Surely Mr. HLS has already thought of something I can leverage -
> everytime I think he overlooked something I find out the framework
> already provided a solution that I didn't know of :)
>
> --Dave.
>
> Jamie Orchard-Hays wrote:
>
>> David, you can just define the location of your files in the
>> .application. See the dtd for more info.
>>
>> eg: <page name="About" specification-path="/WEB-INF/About.page"/>
>>
>>
>>
>> On Dec 5, 2004, at 1:11 PM, David Teare wrote:
>>
>>> Hi all,
>>>
>>> I have used Tapestry for several small applications and have really
>>> enjoyed the productivity gains it provides. Since the projects were
>>> so small, I took a naive approach to structuring the template and
>>> page definitions - I put them all under WEB-INF. My current
>>> project plans on having many more pages and it is becoming obvious
>>> that I need to have a more structured approach. I had planned on
>>> the following setup for pages:
>>>
>>> WEB-INF
>>> +---end-user
>>> +---admin
>>> +---common
>>> +---portlets
>>>
>>> I am not sure if this is how Tapestry expects page directories to be
>>> structured. I found that it works great when performing
>>> cycle.activate("admin/Home") from the Java side, but it breaks down
>>> in the templates - it seems that @PageLink doesn't allow directory
>>> prefixes, nor can I include my own custom components when they are
>>> in a subdirectory.
>>> Has anyone had any success with this approach? Or, perhaps there is
>>> a better way that I am missing.
>>>
>>> Thanks!
>>> --Dave.
>>>
>>> --
>>> ---------------------------------------------------------------------
>>> -- -
>>> Cheers,
>>> David Teare - IT Consultant
>>> Teare Software Solutions Inc.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> tapestry-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
> --
> -----------------------------------------------------------------------
> -
> Cheers,
> David Teare - IT Consultant
> Teare Software Solutions Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Structuring medium to large applications
Posted by David Teare <dt...@tearesolutions.com>.
Great! Thanks, that worked very well.
evan wrote:
>Hi David,
>
>You might want to take a look at:
>http://jroller.com/page/letiemble/20040830#tidy_tapestry
>
>HTH
>
>-----Original Message-----
>From: David Teare [mailto:dteare@tearesolutions.com]
>Sent: Sunday, December 05, 2004 10:52 AM
>To: Tapestry users
>Subject: Re: Structuring medium to large applications
>
>
>Thanks - that should work fine.
>
>I wonder, however, if there is an easier way. I'm a big believer in
>"Convention before Configuration", meaning that I don't think I should
>have to define all my pages in XML simply to allow pages to be
>structured in directories. In the Java page, the
>cycle.activate("user/Home") works fine by convention, without it being
>defined in XML.
>
>Should I write a custom PageLink to enable this in templates too?
>Surely Mr. HLS has already thought of something I can leverage -
>everytime I think he overlooked something I find out the framework
>already provided a solution that I didn't know of :)
>
>--Dave.
>
>Jamie Orchard-Hays wrote:
>
>
>
>>David, you can just define the location of your files in the
>>.application. See the dtd for more info.
>>
>>eg: <page name="About" specification-path="/WEB-INF/About.page"/>
>>
>>
>>
>>On Dec 5, 2004, at 1:11 PM, David Teare wrote:
>>
>>
>>
>>>Hi all,
>>>
>>>I have used Tapestry for several small applications and have really
>>>enjoyed the productivity gains it provides. Since the projects were
>>>so small, I took a naive approach to structuring the template and
>>>page definitions - I put them all under WEB-INF. My current project
>>>plans on having many more pages and it is becoming obvious that I
>>>need to have a more structured approach. I had planned on the
>>>following setup for pages:
>>>
>>> WEB-INF
>>> +---end-user
>>> +---admin
>>> +---common
>>> +---portlets
>>>
>>>I am not sure if this is how Tapestry expects page directories to be
>>>structured. I found that it works great when performing
>>>cycle.activate("admin/Home") from the Java side, but it breaks down
>>>in the templates - it seems that @PageLink doesn't allow directory
>>>prefixes, nor can I include my own custom components when they are
>>>in a subdirectory.
>>>Has anyone had any success with this approach? Or, perhaps there is
>>>a better way that I am missing.
>>>
>>>Thanks!
>>>--Dave.
>>>
>>>--
>>>-----------------------------------------------------------------------
>>>-
>>>Cheers,
>>>David Teare - IT Consultant
>>>Teare Software Solutions Inc.
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>>
>
>
>
--
------------------------------------------------------------------------
Cheers,
David Teare - IT Consultant
Teare Software Solutions Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Structuring medium to large applications
Posted by evan <ev...@mindspring.com>.
Hi David,
You might want to take a look at:
http://jroller.com/page/letiemble/20040830#tidy_tapestry
HTH
-----Original Message-----
From: David Teare [mailto:dteare@tearesolutions.com]
Sent: Sunday, December 05, 2004 10:52 AM
To: Tapestry users
Subject: Re: Structuring medium to large applications
Thanks - that should work fine.
I wonder, however, if there is an easier way. I'm a big believer in
"Convention before Configuration", meaning that I don't think I should
have to define all my pages in XML simply to allow pages to be
structured in directories. In the Java page, the
cycle.activate("user/Home") works fine by convention, without it being
defined in XML.
Should I write a custom PageLink to enable this in templates too?
Surely Mr. HLS has already thought of something I can leverage -
everytime I think he overlooked something I find out the framework
already provided a solution that I didn't know of :)
--Dave.
Jamie Orchard-Hays wrote:
> David, you can just define the location of your files in the
> .application. See the dtd for more info.
>
> eg: <page name="About" specification-path="/WEB-INF/About.page"/>
>
>
>
> On Dec 5, 2004, at 1:11 PM, David Teare wrote:
>
>> Hi all,
>>
>> I have used Tapestry for several small applications and have really
>> enjoyed the productivity gains it provides. Since the projects were
>> so small, I took a naive approach to structuring the template and
>> page definitions - I put them all under WEB-INF. My current project
>> plans on having many more pages and it is becoming obvious that I
>> need to have a more structured approach. I had planned on the
>> following setup for pages:
>>
>> WEB-INF
>> +---end-user
>> +---admin
>> +---common
>> +---portlets
>>
>> I am not sure if this is how Tapestry expects page directories to be
>> structured. I found that it works great when performing
>> cycle.activate("admin/Home") from the Java side, but it breaks down
>> in the templates - it seems that @PageLink doesn't allow directory
>> prefixes, nor can I include my own custom components when they are
>> in a subdirectory.
>> Has anyone had any success with this approach? Or, perhaps there is
>> a better way that I am missing.
>>
>> Thanks!
>> --Dave.
>>
>> --
>> -----------------------------------------------------------------------
>> -
>> Cheers,
>> David Teare - IT Consultant
>> Teare Software Solutions Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
------------------------------------------------------------------------
Cheers,
David Teare - IT Consultant
Teare Software Solutions Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Structuring medium to large applications
Posted by David Teare <dt...@tearesolutions.com>.
Thanks - that should work fine.
I wonder, however, if there is an easier way. I'm a big believer in
"Convention before Configuration", meaning that I don't think I should
have to define all my pages in XML simply to allow pages to be
structured in directories. In the Java page, the
cycle.activate("user/Home") works fine by convention, without it being
defined in XML.
Should I write a custom PageLink to enable this in templates too?
Surely Mr. HLS has already thought of something I can leverage -
everytime I think he overlooked something I find out the framework
already provided a solution that I didn't know of :)
--Dave.
Jamie Orchard-Hays wrote:
> David, you can just define the location of your files in the
> .application. See the dtd for more info.
>
> eg: <page name="About" specification-path="/WEB-INF/About.page"/>
>
>
>
> On Dec 5, 2004, at 1:11 PM, David Teare wrote:
>
>> Hi all,
>>
>> I have used Tapestry for several small applications and have really
>> enjoyed the productivity gains it provides. Since the projects were
>> so small, I took a naive approach to structuring the template and
>> page definitions - I put them all under WEB-INF. My current project
>> plans on having many more pages and it is becoming obvious that I
>> need to have a more structured approach. I had planned on the
>> following setup for pages:
>>
>> WEB-INF
>> +---end-user
>> +---admin
>> +---common
>> +---portlets
>>
>> I am not sure if this is how Tapestry expects page directories to be
>> structured. I found that it works great when performing
>> cycle.activate("admin/Home") from the Java side, but it breaks down
>> in the templates - it seems that @PageLink doesn't allow directory
>> prefixes, nor can I include my own custom components when they are
>> in a subdirectory.
>> Has anyone had any success with this approach? Or, perhaps there is
>> a better way that I am missing.
>>
>> Thanks!
>> --Dave.
>>
>> --
>> -----------------------------------------------------------------------
>> -
>> Cheers,
>> David Teare - IT Consultant
>> Teare Software Solutions Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
------------------------------------------------------------------------
Cheers,
David Teare - IT Consultant
Teare Software Solutions Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Structuring medium to large applications
Posted by Jamie Orchard-Hays <ja...@dang.com>.
David, you can just define the location of your files in the
.application. See the dtd for more info.
eg: <page name="About" specification-path="/WEB-INF/About.page"/>
On Dec 5, 2004, at 1:11 PM, David Teare wrote:
> Hi all,
>
> I have used Tapestry for several small applications and have really
> enjoyed the productivity gains it provides. Since the projects were
> so small, I took a naive approach to structuring the template and page
> definitions - I put them all under WEB-INF. My current project plans
> on having many more pages and it is becoming obvious that I need to
> have a more structured approach. I had planned on the following setup
> for pages:
>
> WEB-INF
> +---end-user
> +---admin
> +---common
> +---portlets
>
> I am not sure if this is how Tapestry expects page directories to be
> structured. I found that it works great when performing
> cycle.activate("admin/Home") from the Java side, but it breaks down in
> the templates - it seems that @PageLink doesn't allow directory
> prefixes, nor can I include my own custom components when they are in
> a subdirectory.
> Has anyone had any success with this approach? Or, perhaps there is a
> better way that I am missing.
>
> Thanks!
> --Dave.
>
> --
> -----------------------------------------------------------------------
> -
> Cheers,
> David Teare - IT Consultant
> Teare Software Solutions Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org