2013-05-08

YUI

I’m told that YUI is pronounced Y U I and not yoooii, which I feel is a realdisappointment. This post contains information gathered fromJeff Pihach’s YUI talk at Prairie Dev Con. It is basically going to be a stream ofconsciousness with little ordering. Sorry.

Y.one(‘.foo .bar’); //selects just one element which is returned as a Y.Node Y.all(‘.bazzs’);//returns a node list which is an array with some extra prototypes on it

setStyle() addClass() hide() show() …

Thoughts:

I’m not in love with having different selectors for a list of elements and a single node. That is one of the great selling features of JQuery. Having twothree different object extensibility methods is a bit complicated. I’ve never been convinced by mixins so I’m a bit one sided on that.

Why is enumerating an array so complicated, huh JavaScript? Old JavaScript engines are the bane of the Internet.

I think that YUI has some potential but that the bar to entry is pretty high. I’m not fully convinced that the advantages are so big that they cover the cost of dealing with the cost. I find myself still asking Y.Why? (I spent half the talk thinking up that joke)


comment: