Of course it’s good news that the BBC’s in-house Javascript library, Glow has been released as open source. It’s a very respectable chunk of code, with some quite nice built-in widgetry. But why on earth should the BBC have its own Javascript library in the first place? Its ‘lead product manager’ – itself a worrying job title – justifies its existence as follows:
The simple answer can be found in our Browser Support Standards. These standards define the levels of support for the various browsers and devices used to access bbc.co.uk: some JavaScript libraries may conform to these standards, but many do not, and those that do may change their policies in the future. Given this fact, we decided that the only way to ensure a consistent experience for our audiences was to develop a library specifically designed to meet these standards.
They’re clearly sensitive to this question, as there’s a whole section about it on the Glow website itself, specifically referencing my own current favourite, jQuery. ‘On reviewing the major libraries we found that none met our standards and guidelines, with browser support in particular being a major issue,’ they explain.
So why not contribute to something like jQuery, to make up for its deficiencies? Isn’t that the whole point of open source? ‘Many of the libraries had previously supported some of our “problem” browsers, and actively chosen to drop that support… Forking an existing library to add the necessary browser support was another option, and one that might have had short term benefits. However, as our fork inevitably drifted apart from the parent project we would be left with increasing work to maintain feature parity, or risk confusing developers using our library.’
I’ve written here in the past in praise of the BBC’s browser standards policy, and I stand by that. But I’m afraid I’m not buying this defence of their decision to reinvent the wheel – and, it must be noted, ending up with results remarkably close to jQuery. The best argument seems to be the risk that libraries which currently meet their standards might not in the future; or that they might have to do work to keep a fork in sync. And even if that should happen, the worst case scenario is that they’d have to churn out a load of new Javascript. Which is what they’ve chosen to do anyway.
Plus, crucially, this isn’t about a bunch of geeks directing their spare-time volunteering efforts in one direction, rather than another. These are people being paid real money, taxpayers’ money, to do this, at a time when the BBC is supposed to be trimming its ambitions. If they’re at a loose end, perhaps they might want to address the News homepage’s 416 HTML validation errors, and abandon the ‘table’ markup.