YUI Target Environments

By Eric FerraiuoloAugust 21st, 2012

We recently updated the matrix of browsers in which YUI is tested. We decoupled the Browser Test Baseline matrix from Graded Browser Support last year, but today we’re taking this a step further…

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:

Internet Explorer 6.0 7.0 8.0 9.0
Chrome † Latest stable
Firefox † Latest stable
Safari Latest stable (desktop) iOS 4.† iOS 5.†
WebKit Android 2.2.† Android 2.3.† Android 4.†
Node.js* 0.4.† 0.6.† 0.8.†

Notes:

  • † 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?

Based on our internal browser data gathered from Yahoo!’s worldwide traffic, the percentage of users on IE 6 and 7 is still relatively high. While Yahoo!’s traffic is a great representation of general browser usage, your app’s browser usage statistics may be very different. For a JavaScript library like YUI, it’s important to target the popular and emerging environments which people are using. This way if your app needs to support older versions of IE, you can feel confident when using YUI because the library is fully tested on them. IE 6 and 7 are still popular enough to warrant YUI’s continued support for these environments.

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.

Node.js

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.

5 Comments

  1. It’s a shame that Opera isn’t supported. I would really like to see it listed here.

    I know you can easily say that a lot of other js frameworks aren’t supporting opera as well. But this is the point. It makes even e-banking websites useless for Opera users cause there (are forced to) use frameworks without opera support.

    Support Opera and YUI will be the first choice for every big website where “It needs to work for everybody” is the most important point!

  2. IE 6 but no Opera? Very disappointing …

  3. [my opinion]
    Opera is one of those browsers that should “just work”, some of our engineers (myself included) always test on Opera. But we don’t make it a show stopper to test on it and it’s not currently in our CI environment.

    If an issue is reported, it will get fixed (Get had an Opera issue that I found & we fixed it). It just doesn’t have a big enough market share for us to waste the effort on testing cycles on it given that things should “just work” anyway.
    [/my opinion]

  4. Opera should indeed “just work”, because it’s 100% standards-compliant.

    Therefore it is actually *valuable* to test for Opera, because if it doesn’t work correctly, it’s almost surely your code that is non-standard.

    Of course Opera tries to be lenient to accept the same deviations as other browsers, but it’s nearly impossible (given the number of sites that tell Opera users to “upgrade to a modern browser”).

    They might as well tell their users “sorry, we only support browsers produced in the USA!” (which is what it amounts to).

    Anyway, test for Opera, support Opera. Given it’s dedication to standards-compliance, it really can only improve your code quality.

  5. @Triple Zero, the numbers we look at to determine YUI’s Target Environments are based on Yahoo! world-wide stats which span all of its sites. Based on these numbers, Opera does not have enough market share to warrant the extra resources required to test it.

    That said we are looking to do several things to get better data and increase the number of devices/browsers on which YUI is automatically tested:

    1. We continue to refine the Yahoo! word-wide browser stats so we have the best insights into which devices and browsers people are using.

    2. We are looking into collecting device/browser stats from our CDN. This will give us a ton of extra data for all website outside of Yahoo! which use YUI from our CDN. Having this sort of data may change which browsers fall on our Target Environments matrix.

    3. Integrate Yeti into our CI environment. This will increase the number of devices and browser in which YUI is automatically tested.