Wednesday, July 8th, 2009

Ouh, shiny! BBC’s Glow is finally out

Category: JavaScript, Library

After being rumoured and showcased at @media Ajax 2008 by Jake Archibald in a pretty epic presentation (audio) the BBC now finally went through all the red tape needed and Glow is available as open source.

Glow is the BBC’s own JavaScript library and in use on their sites. The reason to build an own library instead of using YUIjQueryan existing one was the BBC’s user base and guidelines:

However, on reviewing the major libraries we found that none met our standards and guidelines, with browser support in particular being a major issue.
Our support standards are based on many factors including usage stats and the upgrade paths available to users. For instance, when we had a significant number of users on Safari 1.3, we refrained from asking them to upgrade to Safari 2 as that would require them to buy a new operating system (OSX 10.4).
At the time we were still fully supporting IE5.5 and Safari 1.3, among others, and we continue to support Safari 2. On top of this, we actively avoid causing errors in our “Level 2” browsers. No major libraries were compatible with these requirements, and there was no guarantee that even if they were, they would not change their policies.

This was quite a cause for discussion at @media Ajax and felt a bit backwards-facing. Later this year the same problem came up at the Ajax Experience libraries panel – it is a hard question to answer when it is time for libraries to stop supporting old browsers when support means hacking the experience instead of progressively enhancing it.

One thing is for sure though: Glow has a great benefit – the Beep is dependent on it, which means maintenance and improvement is a given. Have a go:

My hat is off to the team and the BBC for going down this route and embracing the open source community and the idea of sharing the internal goodies with the world to make them better.

Posted by Chris Heilmann at 8:21 am

3.3 rating from 55 votes


Comments feed TrackBack URI

I’ve got a blog post ready about some of the technical details, but BBC rules (or something) mean it can’t go out just yet. They’re probably vetting it.
I’d like 1.5 to be viewed as a “here’s what we have already, how should we improve it” release, 2.0 is the next release where we can break backwards compatibility so we’re wanting to gather enough opinion to make Glow 2.0 really brilliant.
Jake Archibald

Comment by jaffathecake — July 8, 2009

Looks like a great js library.

Love the documentation.

But did we really need another one? The others are open source why not spend the time working with/on them making them more compatible if you really need to support such old browsers.

Plus if you’re making it degrade gracefully then I don’t see any problem in using something like jQuery which supports a good 98% of the browser share.

Comment by jdempster — July 8, 2009


There are legal reasons the BBC needs to support certain browsers, especially if the user has to pay to upgrade, which was the case with using on osx 10.3 using Safari 1.3. Although thankfully Safari 1.3 numbers are insignificant now.

Our library has to contain code that jQuery doesn’t to deal with these browsers. If jQuery had it, it would be (to some extent) slower and larger, and I’m sure they don’t want that.

Basically, if everyone wanted the kind of browser support & accessibility that we aim to have, then I’m sure jQuery and YUI would have it too. So Glow is the option for people who have similar requirements to the BBC.

Comment by jaffathecake — July 8, 2009

The BBC just won the game.

Comment by Darkimmortal — July 8, 2009

Nice Safari 4 denial-of-service demo on the “Forms with Widgets” page.

Comment by spyke — July 8, 2009

@spyke – We’re investigating that at the moment. It’s not very consistent in failing. We’ll probably take down that demo page shortly while we look into it. Say sorry to your Safari 4 from me.

Comment by jaffathecake — July 8, 2009

Well I am glad to see where my licence fee money has gone /sarcasms. Just listened to the audio and can’t help but disagree. The reason they have not used say jquery is as mentioned lack of support for Safari1.3. The general idea is that if such a user navigates to the bbc and something does not work correctly they blame the bbc.

Can’t help but think this approach is all wrong. Surely apple should not be charging for a browser update and even if they do Firefox is free and works on macs.

While developers continue to jump through hoops to support every none standard browser out there then there will never be a true crossover to everyone using standard compliment browsers.

Also there are plenty of places on the bbc site that use flash when it could of been avoided (especially radio1 site) and this does seem to be a problem to them.

Bravo for making it available, but for me this javascript library is coming way to late to be particularly exiting.

Comment by McDaid — July 8, 2009

The Safari denial of service is neat. Could be caused by the confused JS includes:

“gloader.0.1.0.js” is loaded twice (gzipped) and another file “gloader.js” is also loaded. (not gzipped)

They all seem to contain the same code… Maybe Glow requires to be initialized 3 times? :)

Comment by mankz — July 8, 2009

@McDaid Asking people to change their browser to Firefox is a breach of impartiality, the BBC must be impartial.

Comment by jaffathecake — July 8, 2009

Instead of creating a library, you could just made your page degrade gracefully on the unsupported browsers.

Comment by V1 — July 8, 2009

But what percentage of users still use Safari 1.3 or IE 5.5? I’m guessing it’s minuscule.

Comment by jbaker — July 8, 2009

That’s about the dumbest reason to create a javascript library. First off, you should never create a page that “relies” on javascript. Client-side scripting support should be seen as a luxury and/or enhancement to be layered on top of an existing document (HTML) and presentation (CSS). Otherwise, you are putting requirements on a user’s experience that will eventually disappoint those who cannot support it.

Shame on the executives at the BBC stand by this reasoning.

Comment by TheJase — July 8, 2009


Good point, but then listening to the audio I wonder just how impartial the bbc is anyway.

About 30mins into the audio the guy talks about optimising code and using the node.contains? an IE proprietary function, this is checked first because the “bbc has more IE users”. Further browser sniffing is then needed because of a problem with Safari2.

So the code is being optimised for IE which is hardly impartial and I personally don’t like the philosophy. Jquery has now done away with browser sniffing and seems to be better geared for future proofing.

Comment by McDaid — July 8, 2009

The library looks nice, but I agree with the sentiment expressed by other commenters regarding graceful degradation.

When I’m designing an app, old browsers with less than 2% market share are served plain HTML. If someone is using a browser that old, they don’t need anything fancy, and I don’t need to spend trying to come up with hacks.

Comment by WillPeavy — July 8, 2009

I had to chuckle when after reading the reasons for creating such a library I visited the editor page: ( only to see a list of known issues as to why it doesnt work on a range of browsers!

Dont get me wrong im all for frameworks that enhance users experience but I do feel that the extra effort and resource that the BBC have, maybe working with an existing library would have been a bigger benefit… but then I guess you have have been seen as impartial!

Comment by Adz — July 8, 2009

I think a bigger problem than old browsers are mobile browsers. Web sites often work better with old broken desktop browsers than with new shiny mobile browsers. Is there any BBC discussion about this growing (rather than shrinking) problem?

Comment by Nosredna — July 8, 2009

Glow suggests that I check out the API documentation and gives me a link to this stylish 404.

Comment by Nosredna — July 8, 2009

great effort. but seems to me 1 step forward, 2 steps back.

Comment by ajaxery — July 8, 2009

Well, I like it. All of you can just shove off. :P

Comment by mdmadph — July 8, 2009

This is the correct url for the API docs:

It’s found right on the main Glow page.

Comment by whutevr — July 8, 2009


Urm, we’re not suggesting making pages require javascript, quite the opposite. The whole library is built to support progressive enhancement of content on the page.

Building a page that required javascript would require an exemption from BBC standards & guidelines.


I’m the guy in the audio, you can have fun counting how many times I say “urm”.

Serving the browsers our users use isn’t what I mean by being impartial. If being impartial meant not catering for the quirks of browsers we wouldn’t be helping users of our library much.

Code is optimised for the browsers our users use. If making it 50ms faster in IE makes it 1ms slower in Chrome (which is bloody fast anyway), I’d be happy with that, considering the market share of both browsers.


2% may be proportionally small, but that’s still a large number of licence fee paying users for the BBC.

Comment by jaffathecake — July 8, 2009


Thanks for the feedback.

Despite the urms it was a good talk, I liked the Northern Humour!

Comment by McDaid — July 8, 2009

“It’s found right on the main Glow page.” Yes, I found it. Just thought it was amusing that they had the link wrong on their own site.

Comment by Nosredna — July 8, 2009

If the BBC are saying they’re happy to support whichever technologies the licence fee payers wish to use, when can I expect support for Ogg Theora and Ogg Vorbis in the iPlayer? Considering how popular Firefox is, this must surely be a top-priority feature.

Comment by randomrandom — July 8, 2009


I assume you’re joking, but just in case you’re not…

There’s a big difference between using something because you wish to, and using something because you have to.

I couldn’t, for instance, download NN3 and start demanding that the BBC should support it.

When it comes to browser support the BBC give more weight to users who cannot upgrade their browser. So, we could end up supporting browser A but not B, if many users of A cannot upgrade, even if there are a greater number of users using browser B.

With your Ogg Theora example, we’d be benefiting users of very modern browsers without Flash. However, this number is extremely small and I’m not aware of a case when users may be ‘stuck’ in this configuration.

Also, I’m sure our DRM overlords would spontainiously combust at the thought (I don’t work on iplayer so my opinion is personal here).

Comment by jaffathecake — July 8, 2009

I’d say that iPhone users have a very modern browser stuck without Flash. I’m a bit surprised that you would use Flash movies. Do you serve something other than Flash to iPhone users?

Comment by Nosredna — July 8, 2009

Good example. Yes, iphone gets special treatment. MPEG4 I believe.

Comment by jaffathecake — July 8, 2009

Well, BBC wanted their own framework for whatever reasons, they built one, used it, thought it would help others and open sourced it. Now, it is up to the developer community to see if it is any useful. I am not particularly excited about anything about Glow that I can’t find in jQuery, Dojo or MooTools, all of which are being used in one or the other project I am working on. So, IMHO, the discussions should be, “What’s good in Glow” v/s “Why did BBC develop Glow?”

Comment by ragjunk — July 8, 2009

jaffa: no, I’m serious. You said earlier that “Asking people to change their browser to Firefox is a breach of impartiality”, yet you (the BBC) are happy to ask me to install Flash, which is really no different. In fact it’s worse as Flash is proprietary and closed, whereas Firefox isn’t. By the way, almost all of my clients (public sector and military) are not allowed to use Flash or other plugins, so I know for a fact many users are ‘stuck’ without it – at least as much as anyone can be considered stuck with IE6.

The DRM argument makes no sense to me. All of this stuff is broadcast for free over the airwaves, loads of non-geeks now use digital recorders, and the iPlayer isn’t in any way secure as it stands (I use the get_iplayer script which pretends to be an iPhone and lets me have any TV/radio off it for keeps, though sadly the TV comes as .mov).

Anyway, sorry to have a go at you and feel free to ignore as I realise this is nothing to do with you. Glow looks like a great technical achievement and I think it’s great that the BBC are willing to open source stuff like this and Dirac.

Comment by randomrandom — July 8, 2009

Congratulations on the framework release…
Just out of curiosity – “Yes, iphone gets special treatment. MPEG4 I believe.”
Interesting… is this also consumer-dictated? I have a HTC Touch pro / WM6 with Opera and a prototype version of flash installed. Yet I get no MPEG4 and no degradation – just no videos at all–it does not like the flash version either…
how does policy get set on mobile platform and browser support? I realise I am the equivalent Safari 1.3 user here but still–is there a way to feed this back to the powers that be?

Comment by christoff — July 8, 2009

Kudo one shot for BBC. Bringing back the ideals in open source. Probably will be a great library, but that is yet to be seen.

Comment by igmuska — July 9, 2009

Btw, in the article it says “the Beep is dependent on it” when it should say “the Beeb is dependent on it”

Comment by adambankin — July 9, 2009

Hmm, a wider support of browsers versions is always good.

Though creating 1 framework to rule all is madness, code will constantly break each time the browsers go up a generation.

Instead… Look at dynamic loading of js libraries.

create 1 library for crappy old browsers and 1 compliant library for modern browsers. If the dynamic loading is handled properly, you will NEVER ever have to update the crappy browser library (unless adding new functionatlity ofc).

Nay, whilst the effort is admirable and deserves a serious pat on the back, glow isn’t really the best decision, it will be maintenance hell.

SPLIT IT UP before you get into a real mess!

Comment by BenGerrissen — July 9, 2009

@BenGerrissen I agree and disagree. If they use feature detection then maintenance is less of a mess. Also I have noticed that bugs from older browsers seem to present themselves in fresh ways on newer browsers so what I initially thought of as added bloat has turned out to solve problems in more than just old browsers.

Comment by jdalton — July 9, 2009

My theory on JavaScript libraries and browsers is that the tables have turned. The defacto huge JS libraries (especially jQuery) are so heavily used (including by Microsoft), that new browsers and new browser versions will accommodate how jQuery works, not the other way around. If a nightly breaks jQuery some way, the browser maker hears about it.

I’ve never seen feature detection as anything more that a slightly-more-clever browser detection that is still likely to break somewhere along the way. The real solution here is already happening–jQuery (and Prototype, Dojo, MooTools) have a small enough code base and are used in so many places they they are future-proofing themselves just by becoming nearly ubiquitous.

Take Chrome as an example. Chrome made a huge effort to “work with the web as it existing,” testing against real-world web sites. A lot of them have jQuery. So if I use jQuery, or if code the way jQuery is coded, I’m more safe than if I make an effort to follow “standards.” And that’s simply because if a browser breaks on jQuery, the browser, not jQuery, looks broken and unstable.

Comment by Nosredna — July 9, 2009

@jaffathecake – thank you for taking the time to reply.

“2% may be proportionally small, but that’s still a large number of licence fee paying users for the BBC.”

When you get into the “under 2% old browser” category, we’re talking about browsers like IE 5.5 and Fx 1.5. My point is that I doubt most users running a browser that old even want something beyond a basic HTML site, anything more is probably too expensive for their system.

Comment by WillPeavy — July 9, 2009

The BBC is known as the “Beeb”. Not the “Beep”. Think about it.

Comment by ExtAnimal — July 11, 2009

DOA. Broadcasters should stick to broadcasting. There are enough worthless JS libraries to begin with (e.g. virtually every one mentioned here.)

Comment by DavidMark — July 11, 2009


Browser developers do not bend for JS libraries. They break them. The idea that jQuery is future-proof because lots of clueless developers use it is ridiculous. As we have seen, it doesn’t even work in the present.

And your users will not blame their browsers. They don’t know anything except your site doesn’t work (and they sure don’t know what jQuery is!)

Comment by DavidMark — July 11, 2009

It’s just a lot of yank posters not understanding what the BBC’s remit is. Don’t worry about it.

Comment by ExtAnimal — July 12, 2009

Anyway. ITV used jQuery and really screwed it up.

This: is horrible.

Comment by ExtAnimal — July 12, 2009

using jquery and gracefully degrading for old browsers makes much more sense than creating a new library.

where can i vote with 0 stars? :>

Comment by dprieler — July 13, 2009

Another point of the library from my time on the BBC iPlayer was to raise the level of in house JavaScript expertise, to help build the next generation media platforms and sites.

It worked. The knowledge these guys passed on accelerated what the BBC can offer which will continue to trickle down to the developers and most importantly, the users of the sites.

Awesome work Jake & co.

Comment by AdamCraven — July 14, 2009

Leave a comment

You must be logged in to post a comment.