[geojquery] Size of the resulting JS stack

Yves Moisan yves.moisan at boreal-is.com
Mon Mar 15 12:08:38 EDT 2010


I have the following stats for the minified libs of ExtJS v3.1.0 
OpenLayers SVN r10095 and GeoExt SVN r1928:
>
> ext-base.js 32K
> ext-all.js 636K
> OpenLayers.js 844K
> GeoExt.js 96K
>
> So a total of around 1.5 MB.
> These and some css are required for GeoExt. With OpenLayers and ExtJS 
> (http://www.extjs.com/products/extjs/build) one can build custom 
> versions that exclude unused classes/code. For example, for a mobile 
> site using only WMS, I have built an OpenLayers minified lib of 124K.
Right.  Let's forget about CSS and think JS only, unless indeed the 
weight of CSS is dramatically different between the Ext and JQuery 
paths.  As to making OL by removing parts of it, I find [1] to be very 
useful.  Thanx Till et al !  I'll be using the names of files to exclude 
in jsbuild to build profiles for our users.
> I haven't tried yet with ExtJS.

There's a minifying app for Ext, but only for 2.x.  Nothing for the 3.x 
series, which is a drag.

>>
>> Would a GeoJquery "UI" stack that would have the equivalent of what 
>> GeoExt delivers (or will deliver) be much smaller ?  I don't know 
>> much of JQuery.  I know there's JQuery UI, but I also gather there's 
>> someting called JQuery Tools that compresses to 5 kB and offers a 
>> bunch of UI goodies.  So, what would be the resulting JQuery* stack 
>> componentwise and sizewise like ?
> Hard to say, as indicated above one can assemble custom builds. A full 
> OL takes a fair share.
Right.  OL is the baseline.  Nothing can be done to minimize/compress it 
further thant what current tools allow except by removing parts of it.  
And using mod_deflate or some outbound compression scheme on your web 
server of course.  The point for me is what is the final cost of a 
JQuery based solution to the problem of adding "interesting" end-user 
graphical elements to OL ?  We know the cost of the Ext based solution.  
What is that of the JQuery* one (* = "UI", "Tools", etc.) ?

I guess there are reasons to use JQuery instead of (together with ?) Ext 
other than their sheer weight especially for people using JQuery through 
some web framework built on it, but for people not versed in/ not 
knowing any JS libraries in particular I would think selecting the 
lightest solution for one to learn is a sound approach.  I'm eager to 
see if the functional programing style of JQuery makes it easier to 
gobble than the OO style of Ext.

Cheers,

Yves
[1] http://www.webmapcenter.de/olbuild/makebuild.php



More information about the Geojquery mailing list