What’s New in the YUI 3.2.0 Preview Release?

Share this article

The Yahoo User Interface (YUI) dev team recently announced a developer preview of the upcoming 3.2.0 version of the YUI JavaScript and CSS library. While many developers (including myself) more often reach for jQuery when doing JavaScript development, YUI remains an interesting alternative; these new features in the 3.2.0 preview might make it worth checking out. It’s an extensive update with a slew of new offerings, so I’ll only cover the most salient ones here. For a complete breakdown, check out the blog announcement and the full changelog.

First up, YUI 3.20 adds native support for touch events, so you can flick around your pages to your heart’s content. The jQTouch jQuery plugin has been providing similar functionality to jQuery developers, so it’s good to see YUI rising to the competition.

Next, YUI adds support for animations using CSS3 transitions. This means simple animations in modern browsers will be able to take advantage of hardware acceleration when it’s available, while loading less JavaScript code. Of course, all the browser differences are ironed out, so all you need to do is plug in the values of the animation you want.

Another next-gen technology implemented in 3.2.0 is offline storage: YUI’s caching utility has been updated to allow for data to persist between browser sessions when this is supported.

Less of a whiz-bang feature but still of interest, the YUI loader has been updated to improve caching, and to add the ability to load code based on the browser’s capabilities. This means that the team has been able to separate IE-only code from modern browser code in the whole library. The loader can then determine which bits of code are required depending on the user’s browser. As a result, visitors with modern browsers will find themselves loading less JavaScript, even without any changes to your application.

Finally, there are a few new widgets. One of particular interest is the ScrollView widget, which simulates scroll lists on Apple iOS devices, with a little bit of bounce at the top and bottom of the list.

A lot of these features seem to have a common thread: HTML5 and mobile platforms. I’m sure that’s no accident, and it’s great to see more and better developer tools entering this space. As I said, there’s a lot more than just these features, so if you’re a YUI fan—or if you’ve yet to check it out—head on over and grab yourself a copy of the preview to play around with.

Louis SimoneauLouis Simoneau
View Author

Louis joined SitePoint in 2009 as a technical editor, and has since moved over into a web developer role at Flippa. He enjoys hip-hop, spicy food, and all things geeky.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form