The Pencil Guy: Hourann's illogical blog

In the innards of upcoming new toys

Wednesday 15 November 2006 at 10:05 pm

As in previous cases, the lack of posts is a sign that announcements are forthcoming. Although in this case, they may not be all that rapidly forthcoming, because I’m still busy wading through, er, bugs. So rather than the other things I was going to write about today (such as the constant sound of planes practicing for the Red Bull Air Race), I think I’ll rant about JavaScript libraries.

The library that is getting all the Apple-style (or more appropriately, Rails-style) love among the fashionable developers is Prototype.js, which is awesome and something that I can’t believe I only discovered recently. If nothing else, $() is like manna from heaven. (well, sort of. And yes, it’s ridiculously easy to re-implement … but I wish I’d thought of it myself or something!)

The problem with Prototype is that it’s enormous — over 60kb of code that I was tacking on to pages of barely 12 or 15 kilobytes. Even with compression (e.g. via Dojo ShrinkSafe) it still weighs in at 25kb, which is a decent download for the lowly dial-up users out there. And that’s before you count the 50 to 100 kb of script.aculo.us, which is breathtakingly easy to use but not that well optimised.

So I find myself gravitating towards mootools, which packs an awful lot of punch into a customisable 10 — 20 kb script. Unfortunately, the mootools documentation looks pretty but is profoundly lacking in examples (making it hard to get started) and is also short of detail in a few places that have become important for me. (Hence, another contender is jQuery, which is well-designed and has better documentation … but isn’t quite as full-featured out of the box as mootools.)

I briefly inspected MochiKit and Dojo, which are both nice, but don’t quite do what I want, and are hardly lightweight themselves. It looks like mootools is it for now!

no comments »