O'Reilly logo

YUI 3 Cookbook by Evan Goer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Infrastructure

If you do some cursory searches about YUI, you might hear people say that it’s “an Ajax library with widgets.” Dig a little further, and you’ll probably hear phrases like, “YUI supports rich web applications,” or that it “helps provide structure,” or that it “scales well with larger code bases.”

Well, that’s easy enough to say—but what is it specifically about YUI that makes it suitable for larger applications? Arguably, this boils down to a handful of key features.

The first is YUI’s Loader and module system, which makes it possible to efficiently reassemble just the chunks of code you need, when you need them.

The second is YUI’s highly configurable custom event system, which provides an obvious way to decouple components.

The third is YUI’s ecosystem of tools for testing, deploying, and documenting your professional-grade code.

The fourth is YUI’s Base infrastructure, discussed in this chapter.

The YUI Base object is the fundamental building block for major YUI components and apps. Casual users of YUI don’t necessarily need to know much about Base, but if you’re a component builder, you should understand that much of the library either powers Base, or is powered by it. Base’s descendants include:

  • Widget, the foundation for Overlay, Slider, Calendar, and all other core widgets. This chapter explains how to create your own widgets from scratch. For example usage of the core widgets, refer to Chapter 8.

  • Utility objects such as Cache, DataSource, RecordSet, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required