[dev] Javascript depency loading

Jan Schneider jan at horde.org
Thu Jul 30 15:32:22 UTC 2009


I already had a short discussion with Michael Rubinsky on IRC two  
weeks ago, and two events reminded me about it: The necessary fixes to  
correctly load tooltips.js and the required prototype.js, and Ajaxian  
mentioning LABjs (http://labjs.com/description.html) again.

Here's the IRC log:

(18:04:12) yunosh: is it worth to use a depency loader like  
http://feedproxy.google.com/~r/ajaxian/~3/Vq4qcO7idLI/labjs-simple-abstraction-for-loading-dependencies-correctly to solve the js file loading order  
issues?
(18:17:21) mrubinsk: yunosh: looks interesting, though I guess we'd  
need to test to see if it would work well with pages that might have  
had the same js file added via Horde::addScriptFile() in other  
places....or were you talking as a general solution to implement  
within Horde::addScriptFile()?
(18:18:57) yunosh: rather something to replace addScriptFile(), or  
actually something that's build from addScriptFile() instead of plain  
<script> writing. That would require dependency support on the php  
side too of course
(18:19:03) yunosh: just brainstorming here
(18:20:47) mrubinsk: sounds like it's worth looking into more  
thoroughly then...
(18:22:05) yunosh: i'm not sure if it's adding more overhead than  
necessary for things that we can sort out manually with a bit of  
patience
(18:29:09) mrubinsk: yea, it's also not clear how well it would behave  
with adding scripts in multiple paces in the code
(18:29:56) mrubinsk: at least from my cursory look :)

I want to re-start this discussion because such a solution could not  
only help us solving the dependeny issues, but also speed up page  
loading. Beside that, we could load more script files directly from JS  
code on-demand. The latter would keep the after-loaded scripts from  
using our JS cache, but it might be worth for some rarely used  
scripts, and it's an added bonus anyway.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.horde.org/archives/dev/attachments/20090730/730a81ec/attachment.bin>


More information about the dev mailing list