tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Lewis Ship" <hls...@gmail.com>
Subject Re: Advantages of various .tml storage locations?
Date Fri, 05 Dec 2008 00:34:15 GMT
On Thu, Dec 4, 2008 at 2:15 PM, Christian Edward Gruber
<christianedwardgruber@gmail.com> wrote:
> Um... I didn't think you did/should store .tml's in /src/main/java.  If you
> do, and you build with Maven, then they probably won't be copied over.

+1  Watch out for that.  I hate it when people say "Tapestry is
broken" but it's actually the build ... and they didn't event do a jar
tf on the WAR file to see what's inside it.

>
> But I think src/main/resources are primarily for components, because
> components can be built without having a web-app there - they're part of a
> library, but pages are only part of a webapp, and so are in
> /src/main/webapp.

To be honest this is a design decision I should have gone another way
on. Relative URLs from template files to static assets are generally a
bad idea for pages, as the base URL can shift based on the use of
activation contexts. Having all templates be in one consistent
location (on the classpath, under src/main/resources) would have been
... well, more Consistent (one of the primary goals of Tapestry).

However, I tend to put them in src/main/webapp anyway.

>
> Christian.
>
> On 4-Dec-08, at 17:06 , James Hillyerd wrote:
>
>> What are the pros/cons of keeping page .tml in:
>>
>> 1. src/main/java
>>
>>  vs
>>
>> 2. src/main/resources
>>
>>  vs
>>
>> 3. src/main/webapp
>>
>> ?
>>
>>
>> I see JumpStart uses #1, and the tutorial uses #3.  Seems like it would
>> easier to use #1 or #2 so at least the components and pages .tml are in
>> the
>> same directory tree.
>>
>> Thanks.
>>
>> -james
>>
>> --
>> James A. Hillyerd <james@hillyerd.com>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Mime
View raw message