Yahoo UI library
I’d heard a number of people mention various different javascript libraries recently. Seeing a discussion panel talking over the pros and cons of using libraries, and the main ones in development finally prompted me to have a nose around a couple. In particular Simon Willison was promoting the work that Yahoo have been doing recently in publishing a free, open source library that they use internally to build the various Yahoo sites and applications.
I have to say I’m seriously impressed with the work they have done. A lot of the ideas are pretty simple, but the kind of thing that you write from scratch on each project when it’s needed. However, in this case it’s had a load of development and cross browser testing effort thrown at it.
Some of the methods on their DOM object are extremely useful – things like getting the viewport dimensions, or getElementsByClassName. In addition, the library that covers event handling provides a number of very practical features that you could start using immediately.
I am naturally a little sceptical about this kind of thing – I think it’s very important to understand the core technologies that a framework is based on. However these libraries provide the kind of work that you would code yourself, but in a tidy, useable, documented package.
There will be a slight hit on bandwidth, but the library is split into different modules, so you should be able to take what you need without too much extra.
I’ll certainly consider using this on future projects.

Don’t forget with HTTP compression it shrinks down more. You have turned HTTP compression on, right?
Comment by Barry D, June 26, 2006 @ 2:56 pm
I’m not quite so worried about resources that are cached after the initial download – having to wait a little longer on the initial request to a highly interactive site seems fine to me.
Comment by Oli, June 26, 2006 @ 3:22 pm
Just noticed – the library download has a ‘min’ version of each file with all whitespace and excess guff removed. The stripped down size is roughly 10k for each module.
Comment by Oli, June 26, 2006 @ 3:28 pm