It's easy to say "it should be cached" until you realize that the
application could be running in a cluster. At that point, you need to have
that cached data available across all servers in the cluster ... that means
you need to store it in the HttpSession, which is exactly the opposite
approach that we should be headed to.

What's annoying is that if Tapestry created some HTML5 elements for this
purpose; say <require> and <init>; it would "pass" the CSP even though it
would be exactly as hackable as having the inline script. Meanwhile, if
there's a man in the middle, having an inline script is no different than
having an external script in terms of injecting new client-side executable
content into the page.

This is a cost to Tapestry's flexibility that was not predicted years ago
when the stack approach was created. For modern applications, there should
be only a single "stack", and there should be only a single page. But
sometimes you play the cards you are dealt.


On Wed, Feb 5, 2014 at 3:37 AM, Kristian Marinkovic <
kristian.marinko...@gmail.com> wrote:

> looking at my migrated Tapestry 5.4-beta-2 app i can only see two inline
> scripts. The requirejs configuration (shim, ...) and the require call
> itself.
>
> Is it possible to move those into a dynamically generated js instead,
> that's included with a script tag? the requirejs config could by cached.
> And the require call would be page specific. Should we create a jira
> ticket?
>
> removing the javascriptsupport methods is not a good idea as it breaks
> backwards compatibility. on the other hand removing in 5.5 would be nice :)
>
> g,
> Kris
>
>
>
>
> On Tue, Feb 4, 2014 at 8:52 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
> > On Tue, 04 Feb 2014 17:45:37 -0200, Christian Köberl <
> > tapestry.christian.koeb...@gmail.com> wrote:
> >
> >  2014-02-04 Lance Java <lance.j...@googlemail.com>:
> >>
> >>> I happen to be a fan of tapestry's multi-page approach and serverside
> >>> markup generation.
> >>>
> >> Me too - but I think there would be a big chance in 5.4 to clean up
> >> the JS stuff and I think inline JS is no good idea. The core
> >> components could all be refactored to work without inline JS - like
> >> the new DateField (a good example how to do it).
> >>
> >
> > I don't know a politer way of saying this, but I already said that
> > Tapestry 5.4 is already doing that at least twice. I'm having a really
> > unlucky day. :(
> >
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>



-- 
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

Reply via email to