Introducing YUI Target Environments
We’ve added a new page to our site: YUI Target Environments. Here’s the matrix of the environments which YUI currently targets:
|Chrome ||Latest stable|
|Firefox ||Latest stable|
|Safari||Latest stable (desktop)||iOS 4.||iOS 5.|
|WebKit||Android 2.2.||Android 2.3.||Android 4.|
- The dagger symbol (as in “iOS 5.”) indicates that the most-current non-beta version.
- Certain modules have native Node.js support, while others are DOM dependent.
Our Graded Browser Support page has been doing double-duty, both promoting progressive enhancement development practices and defining YUI’s supported browsers. This led to confusion that the matrix was a recommendation about where your application should work. To reduce this confusion we have created a separate page, YUI Target Environments, to house the matrix of YUI’s target environments (both browsers and Node.js).
There’s a good chance the set of environments that you’re targeting for your project is either the same as or a subset of the ones YUI targets. However, we understand that the audience for each app is different; data gathered from your web analytics should be used to make informed decisions when choosing which environments you’re going to target. These are engineering and business decisions which require weighing the tradeoffs—a one-size-fits-all recommendation will not account for these specifics.
Why Does YUI Still Target IE 6 and 7?
Additionally, the modular architecture of YUI supports capability-based loading for those environments which need additional code or alternate implementations of features (like old versions of IE.) This means IE 6/7-specific code will only be downloaded and executed in those environments which need it. A person using your app in the latest version of Google Chrome will not incur the cost or overhead of loading code needed for old versions of IE. Capability-based loading is seamless and will be taken care of for you—it’s baked into YUI’s core.
The environments which YUI targets are not all browsers. YUI is tested in and designed to work in a Node.js server environment. Over the past year, a lot of work has been done in YUI to target Node.js as a first-class environment.
It’s important to note that YUI support in Node.js is on a module-by-module basis. Node.js differs from browser environments in a drastic way—it does not come with an implementation of the DOM APIs. YUI does not come with server-side DOM support either. In fact, we recommend against running a DOM on the server for performance reasons. This means that only a subset of YUI modules will run natively within a Node.js environment: those modules which do not depend on DOM APIs. If you’re inclined to run a DOM on the server, refer to this example.
The new YUI Target Environments page contains a section on Node.js with two lists of modules: those with native Node.js support, and those which are DOM dependent.
Being able to use YUI on the server opens up many opportunities to share code between the browser and server environments; a great example being Mojito, which takes full advantage of this.
The Future of Graded Browser Support
Our plan is to phase out the term “Graded Browser Support” (GBS) in favor of “Progressive Enhancement” (PE) shortly. The core idea behind graded browser support is progressive enhancement, so really this is a change to what we call it.
We will continue to promote the concepts and strategy of taking a progressive enhancement approach to web development, while separating it from the matrix of specific environments which YUI targets. We want to help developers use this information to make informed decisions about which environments they’ll target for their projects.