Friday, July 24, 2009

Y.get() != new Element()

While trying to use YUI 3.0, I was attracted to try out the YUI Node feature with the following code

$ele = Y.get('foo');

I was working out some race condition problems, and was hoping the waiting feature (where YUI will wait for the element to be in a ready state) would solve some problems for me.

What I had forgot was that Y.get is not the standard dollar function ( $('foo'), $('#foo'), etc ). This poses some real problems for me. I didn't really used the Dom.get methods, and probably for the same reasons, as I use both YUI and prototype together mostly.

But now I want to integrate the really nice features of YUI 3 into my code, and try and break away from my prototype "crutch". However, since I do use other 3rd party libraries for various things, most of them rely on straight up Dom elements being passed to them.

I hate to say it, but I have found something in YUI that just does not sit well with me.

The code still seemed to work with

$ele = $('foo');

But I can't say for sure, and this seems pretty hacky?

Sunday, July 19, 2009

YUI 3.0.0 beta 1

YUI 3.0.0 beta 1 is now available for download from

From the Yahoo! User Interface Blog:

"This release takes YUI 3 out of its preview phase and brings its APIs to a near-final state. For those intending to implement YUI 3, the 3.0.0 beta 1 release is a good place to begin the transition. If you’ve been working with the latest preview release, George Puckett has provided a comprehensive 3.0.0 beta 1 changelog to guide you. We look forward to hearing your feedback as you begin working with 3.0.0 beta 1, and we’ll work hard to address that feedback as we prepare for a GA release in the coming months."

Some very interesting things made this release

"StyleSheet: StyleSheet makes it easy to create and modify CSS rules on the fly, allowing you to dynamically style page elements with fewer repaints."

Add stylesheets dynamically!

"ImageLoader: ImageLoader allows you to defer the loading of images that aren’t in the viewport when the page paints, throttling bandwidth usage and improving performance"

Images won't load until they enter the viewport, for longer pages, or hidden elements this is pretty huge. The bandwidth savings could be worth it.

Thursday, July 9, 2009

Technorati Code