On Tue, 04 Feb 2014 16:34:45 -0200, Christian Köberl <tapestry.christian.koeb...@gmail.com> wrote:

2014-02-04 Lance Java <lance.j...@googlemail.com>:
It's tricky because there would be 2 requests (1 for markup and 1 for
javascript).

No, there's no need for a 2nd request - JS should be static - it's
code! The data should be in the DOM (or probably fetched by a REST
request per JSON). Think outside of the Tapestry box - if you look at
recent examples in other frameworks you won't find any inline JS
anymore.

It's not about inline JavaScript. And I agree that it should be avoided.

I think you're overlooking something: the fact that, sometimes, JavaScript needs to be dynamically generated server-side because it needs dynamic information. And one solution for doing this is to generate inline JavaScript. The other solution would be to have an AJAX request to do it, but then it's another request and it would slow down stuff a lot.

And, again, let me remember you that Tapestry is already doing what you're asking in most places.

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

Reply via email to