Monday, May 17, 2010

Open source systems in government

In 2009 the UK government announced a new approach to open source. It ensures that open source is treated on a level playing field with proprietary solutions. But I think the government should go much further and use open source as the foundation for its core systems.

It's clear that our current approach to government IT is badly broken. Taxpayers have suffered £26bn of losses as a result of a string of computing disasters involving massively late, over-budget, and broken systems.

We must move to a new model that avoids the reasons behind this catastrophe: reliance on massive system revolutions rather than incremental improvement, lock-in to vendors, a lack of government understanding and control of IT, and the dominance of large suppliers at the expense of small and medium sized businesses.

Contrast this approach with open source groups such as the Linux Foundation or Mozilla. They also develop complex software used by millions of people around the world, following these principles:

  • An army of developers, from huge corporates to individual developers in their spare time
  • A community of developers, carefully cultivated and encouraged by the foundation, with shared values
  • Total freedom from lock-in, using open source licenses
  • Focus on steady evolution rather then complete revolution

In this approach, the major government departments should set up their own IT foundations, with carefully written missions and a budget to encourage community participation (via public prizes, conferences, and total openness in the technical approach). Individual workers, or small, medium and large businesses alike could volunteer to develop the code, as a charity or in the hope of being hired full time.

There would be two additional benefits to developing open source government systems. Firstly, governments around the world could share development costs by contributing together. This could save the UK government huge amounts in the long term. Secondly, building a community of government IT developers in the UK would provide a huge benefit to the economy - building the skills and experience of volunteers (including students) in just the areas likely to require staffing.

So I believe it's time to get much more ambitious about open source in government. We should be using it not just to purchase cheap infrastructure, but to actually lead the development of core systems. Doing so would help free us from many of the issues plaguing government IT, but also provide a real public benefit to the citizens of this country.

Monday, May 03, 2010

SVG can't be part of the web

Microsoft's announcement that IE9 will be supporting SVG brought rejoice to many web standards aficionados. SVG 1.1 was finalised in January 2003 but Internet Explorer's previous lack of support meant that it has never really taken off on the web, despite years of patient enhancement by open source advocates.

But although I'm also an open source and web standards advocate, I still don't think SVG can ever be part of the web, because it just doesn't fit. We need a better solution.

Consider the following points:

  • SVG has a totally different coordinate system to HTML - you can translate SVG coordinates but not HTML ones, and vice versa. So SVG and HTML won't sit well in the same document
  • SVG has a totally different layout model to HTML. It's incompatible with CSS floats, which are fundamental to laying out HTML web pages.
  • SVG has a totally different version of CSS which overlaps at best with HTML. For example, it has a "fill" property (rather than "background-color"), and it can't be positioned using CSS.
  • SVG introduces duplicates of many HTML features - most notably, the hyperlink!
  • SVG has a different DOM to HTML.

If you only want a vector format for image files, SVG is ok (though HTML Canvas can do everything SVG can). But if you want to use SVG to layout and style web pages, it's a terrible kludge.

I believe there's a better way. Going through the SVG table of contents:

Coordinate systems, Transformations and Units
Already covered by CSS3 Units and CSS Transformations
Not possible in HTML
Basic Shapes
Rect, Oblong and Circle are possible in HTML using CSS border radius. Polylines and Polygons are not.
HTML already does text better than SVG
Painting: Filling, Stroking and Marker Symbols
Filling and Stroking are possible in HTML using CSS background-color and color. Marker symbols are not.
Already covered by CSS color
Gradients and Patterns
Covered by CSS3 gradients and CSS3 backgrounds
Clipping, Masking and Compositing
HTML allows clipping and opacity, but not masking or compositing.
Filter effects
Not possible using HTML
Covered by CSS3 transitions and CSS3 animations
Covered by WOFF

So, much of what SVG does is actually already possible using advanced CSS and HTML. So why not just extend CSS a bit more and you'd get all the power of SVG inside HTML, but without needing a whole new markup language? What's more, you'd then be able to apply all these techniques to existing HTML elements, not just SVG ones.

For example, imagine a set of CSS properties which allowed you to modify the shape of any HTML element - not just rectangles, but any shape you could think of. That would be better than introducing new SVG markup for shapes, because you could modify existing HTML semantic elements such as headings.

That's why supporters of the open web should not put their hopes into SVG. To be frank, it doesn't do what you want it to do. A much better approach would be to continue to extend CSS so that it doesn't take new markup to achieve better presentational effects.