On Tue, Mar 4, 2014 at 11:30 PM, Craig Small <[email protected]> wrote:

> Is this what you meant in the TW list when you said the resources
> loading should be done another way?
>
>
Yes that is a good example of how the current resources tracking of TW
doesn't work well with Javascript.

If you try to make resources injection managed by server side software
(like TW) you are looking for issues:
You need to keep track of all the resources injected to avoid duplicating
them and even doing so you are unable to keep track of resources user
manually added (unless you force them to use a custom API like
tw_jquery.inject() ).
Then if you get in heavy ajax applications, like modern single page apps,
you cannot rely on resources tracking anymore, as resources can be injected
into the same page by different requests.

Using a JS module loader, like requirejs or axel or any other solution
solves both the issues.
With a few exceptions of third party widgets, it should be fairly easy to
modify TW2 to use a client side resources injector.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to