[Mapbender-dev] Packer (code conventions)

Paul Spencer pspencer at dmsolutions.ca
Tue Feb 6 06:05:11 EST 2007


There is also jslint from Douglas Crockford ... it doesn't compress/ 
minify but it does check your code for syntactic cleanness, which  
helps the compressors do the right thing.

I am slowly running this on my code with some embarrassing  
results :)  On the other hand, I've been able to pack my individual  
js files together and compress them reasonably well since I delinted  
them

Cheers

Paul

On 6-Feb-07, at 2:50 AM, Christoph Baudson (WhereGroup) wrote:

> 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
>
> _______________________________________________
> 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/ |
+-----------------------------------------------------------------+






More information about the Mapbender_dev mailing list