Proof of Concept - JavaScript Library Management

71 views
Skip to first unread message

Joe LeBlanc

unread,
Apr 19, 2012, 9:55:07 PM4/19/12
to joomla-...@googlegroups.com
After talking with many members of the Joomla community, I have written a proof-of-concept plugin for managing JavaScript libraries. Rouven has also adapted that work as a proof-of-concept at the platform level. A summary of both efforts and an explanation of the reasoning behind these approaches can be read here:

http://corywebbmedia.com/blog/item/71-javascript-library-management-for-joomla

The goal is to have the plugin as a short-term solution, and have the platform level code ready for Joomla 3.0. This way, by the time Joomla 3.0 rolls around, there would be one centralized way of registering the JavaScript libraries and dependent scripts you want to use. This way, only one copy of the library loads and all of the code depending on it is loaded after.

Please let us know what you think about these solutions.

tina tina

unread,
Apr 20, 2012, 1:03:44 PM4/20/12
to joomla-...@googlegroups.com
Hi,
I have some concerns about the performance. I have some programming
experience using YUI.
There are 'Modules' depend on other Modules. so some time we will
encounter the problem: if one Modules fail to load, the process with
be blocked and Deadlock.


Tina

2012/4/20 Joe LeBlanc <con...@jlleblanc.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-cms/-/zbAVob9B1uMJ.
> To post to this group, send an email to joomla-...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-cm...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.

Joseph LeBlanc

unread,
Apr 21, 2012, 2:17:49 PM4/21/12
to joomla-...@googlegroups.com
Hi Tina,

The manager does allow you to designate scripts as being dependent upon a particular library. So for instance, you would load YUI as a library, then load your scripts and tell the library manager that they depend on YUI.

As far as I know though, the scenario you present is one that's already currently a problem with Joomla. To actually get around that problem, you'd need to use the "defer" attribute on script tags, or use something like LABjs or RequireJS to load the scripts from the client side. That would also be an excellent addition to Joomla, IMO.

-Joe

Reply all
Reply to author
Forward
0 new messages