On Wed, Aug 1, 2012 at 7:20 AM, Carsten Klein
<[email protected]> wrote:
>
>
> Hi,
>
> as far as Java Web Application "standards" go, the static assets, but not
> normally the page a/o component templates, can be found under
> WEBAPP-ROOT/js etc.

>
> I think that tapestry 5 should stick to the established principles instead
> of reinventing the wheel.

Someone should have told me this about 10 years ago!

>
> Also, I do not see why this should impose problems on the user, as the
> users are already accustomed to that practice.

For application resources, you can absolutely put assets in the web
context, and use the "context:" prefix to reference them.

Much of this discussion is about how to handle assets inside
libraries, including critical ones provided as part of
tapestry-core.jar.  A big feature of Tapestry vs. many other
frameworks (on Java and other platforms) is that this is handled
seamlessly and automatically, without extra unpackaging, copying, or
configuration.

>
> As for the templates, I think you should go for a templates/ subfolder,
> located directly under WEBAPP-ROOT, or a tapestry5 subfolder. Either would
> be fine with me.

Templates are a server-side resource; they belong with compiled Java
classes, on the classpath, in the package with the component class.

>
> However, I am still wondering how an application that consists of multiple
> modules that are deployed separatedly in form of external libraries would
> be able to contribute the static resources found in those libraries so
> that they can be served directly from the filesystem instead of from
> inside a jar.
>

Serving from the file system is not ideal; Tapestry does a lot of
extra work to improve things:
- versioned URL
- far future expires header
- response compression
- caching of compressed assets
- JavaScript aggregation
- JavaScript minimization (well, still working on getting that solid)
- hooks to support content deliver networks

> Regards,
>
> Carsten
>
>> Here's the thing: I want to have ONE simple thing to describe and
>> document.
>>
>> These endless chains of options are a tax on users:  they are harder
>> to document, harder for users to determine what the "right" approach
>> is, require more code and more tests. If you've read the book "The
>> paradox of choice" you'll realize that giving users lots of options is
>> a way of shirking responsibility for making a real decision.  I regret
>> some of my "you can have it your way" design choices in the past,
>> though I don't think any of them are that crippling (though allowing
>> page templates in the web context was a huge mistake).
>>
>> In any case, the question is where to put the files; I'm open to
>> META-INF/assets/ or T5-RESOURCES/assets/ or META-INF/tapestry/assets/
>> or TAPESTRY/assets/ or something along those lines.
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> Carsten Klein
> Mobile +491 577 666 256 5
> [email protected]
>
> www.axn-software.de
> [email protected]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to