[Mapbender-dev] Packer (code conventions)

Christoph Baudson (WhereGroup) christoph.baudson at wheregroup.com
Tue Feb 6 02:50:57 EST 2007


Hi Paul, hi list,

thanks for the hint, Paul; Indeed, jsmin is an alternative worth 
considering.

Take a look at this description

http://www.crockford.com/javascript/jsmin.html

The compression rates are not as high as with Dean Edwards' packer, but 
the code remains (to some degree) human-readable. And the semicolon 
after function definitions would not be mandatory.

Any opinions?

Christoph

Paul Spencer schrieb:
> Christoph,
> 
> jsmin is an alternative to packer.
> 
> Cheers
> 
> Paul
> 
> On 5-Feb-07, at 6:44 AM, Christoph Baudson (WhereGroup) wrote:
> 
>> Hello,
>>
>> today I have tested the packer by Dean Edwards 
>> (http://dean.edwards.name/packer/usage/) by compressing the class 
>> point.js
>>
>> * I had to add a semicolon after every function statement to make it 
>> work.
>>
>> * The file size was reduced from 3.3Kb to 1.8Kb. For larger files the 
>> compression rate will be higher, for example jQuery is 55Kb 
>> uncompressed and 19Kb compressed.
>>
>> At a first glance I don't any other packer like Dean Edwards'. And to 
>> it seems like it's in wide use (searching for "dean edwards" AND 
>> "packer" results in 18000 google matches)
>>
>> The semicolon after functions is necessary if we want to use this 
>> packer. So do we want to use this packer? As a developer who works on 
>> a more theoretical level I'm not as much in touch with customer 
>> demands as others. But I sense that saving half the bandwidth weighs 
>> more than the addition of an (obscure) semicolon.
>>
>> I would love to hear some more opinions on this.
>>
>> Christoph
>> _______________________________________________
>> Mapbender_dev mailing list
>> Mapbender_dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                          pspencer at dmsolutions.ca    |
> +-----------------------------------------------------------------+
> |Chief Technology Officer                                         |
> |DM Solutions Group Inc                http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+
> 
> 
> 
> 
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev



More information about the Mapbender_dev mailing list