[dev] Javascript depency loading

Jan Schneider jan at horde.org
Fri Jul 31 16:19:52 UTC 2009


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>>> A possible solution, and one I am looking at re: Horde_Editor, is  
>>> to bundle the more complex javascript elements in a framework  
>>> package and then have the package deal with the dependencies.   
>>> This has the extra advantage of allowing us to upgrade a package  
>>> correctly if the javascript components are updated.
>>>
>>> This will require us to write horde-specific PEAR roles to  
>>> correctly install this javascript.  Don't know if this is feasible  
>>> or not.
>>>
>>> http://pear.php.net/manual/en/guide.migrating.customroles.defining.php
>>
>> How would that help us with *loading* dependencies?
>
> My comment on roles is that to do this kind of javascript framework  
> packaging, we need a way to install the javascript files to a  
> web-servable directory somewhere.  I am extremely uncomfortable with  
> the present setup that you can update framework packages while its  
> corresponding helper files, living in horde, will not be updated  
> unless you update horde itself.  A custom install role can fix this  
> issue.  Roles have nothing to do with JS dependencies.
>
> But roles are necessary to develop a framework javascript package  
> that would handle dependencies for a certain javascript package. You  
> would define how the dependencies are loaded in the framework script  
> once - then you never have to worry about the dependencies again.   
> At some point in some script somehwere a human is going to have to  
> look at a bunch of files and determine the order they need to be  
> loaded correctly for dependency purposes.  LABjs doesn't do this,  
> nor will any other code-based solution.
>
> From what I understood about your IRC conversation, the issue was  
> that to not have to repeat this trial/error process every time you  
> want to load the script.  So you do this determination once in a  
> package and don't have to worry about it again.

Okay, I didn't get that part of this package would be a loader script  
that takes care of loading order.

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/20090731/91422c7a/attachment.bin>


More information about the dev mailing list