cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Trieloff <l...@trieloff.net>
Subject Re: AW: RFC: CForms + Dojo: the way forward
Date Mon, 09 Oct 2006 13:40:01 GMT
Hi Christopher,

as the individual JS files are rather small, the most costly part is  
requesting them from the web server, not downloading them. With an  
aggregated file, there is only one single request.

I agree that it does not make sense to create a JS file per form  
because that would result in redundant downloads, so the only  
possibility is to have it configured at build time.

What about creating a src/main/js directory where all contained *.js  
files will be aggregated into a single $projectname.js file?

Lars

Am 09.10.2006 um 09:26 schrieb Christofer.Dutz@univativ.de:

> Hi,
>
> I am following this discussion since the beginning. There is one  
> thing I don't quite understand. I had a lot of problems with dojo,  
> because it does a lot of caching on its own. If we package and  
> compress the scripts on a "per-form-basis" we get tons of different  
> compressed js-files with lots of redundant code fragments. Each one  
> has to be transferred individually. Wouldn't it be better to  
> compress each fragment individually so the current loading  
> mechanism is still used but the resources being loaded are compressed?
>
> Chris
>
> -----Urspr√ľngliche Nachricht-----
> Von: Lars Trieloff [mailto:lars@trieloff.net]
> Gesendet: Freitag, 6. Oktober 2006 20:01
> An: dev@cocoon.apache.org
> Betreff: Re: RFC: CForms + Dojo: the way forward
>
> Hi Jeremy,
>
> I see the following ways to solve this:
> - create a DojoReader that will dynamically compress and aggregate
> Javascript on the fly.
> - create a Maven Mojo that does the same job as Dojo's ant task, but
> this needs to be configured at build time.
>
> The first option needs no build time configuration and it allows to
> generate a minimal javascript library file on the fly that needs to
> be loaded only once for every configuration of dojo.require
> statements. The most important question here is: How do we find out,
> what dojo packages are actually required.
>
> Lars
>
> Am 06.10.2006 um 16:42 schrieb Jeremy Quinn:
>
>> 6. Dojo has an ant build script which uses Rhino to compile and
>> compress all needed dojo code into a single file. This speeds up
>> the client *significantly*. How can we use this better from within
>> Cocoon?
>>
>> Conclusion: It would be of great advantage to have this dojo
>> compressor build, better integrated into Cocoon, so that an
>> optimised production environment can be used. The compressor does 2
>> things: aggregate and compress all of the required dojo packages,
>> aggregate all of the html template and css snippets required by the
>> widgets you actually need. This functionality is already in place
>> (src/blocks/ajax/dojo/), it is just not obvious or automatable.
>> Currently you would create a listing of the required dojo libs by
>> hand, then run the build script. Can and should we find a way to
>> automate this?
>
>
>

Lars Trieloff
visit http://www.mindquarry.com/




Mime
View raw message