Saturday, 22. April 2006, 08:58:04
Opera 9.0 Beta is now
available for download. For those of you who have regularly tested the 9.0
previews and weeklies the difference from those isn't that great (except in stability), but from 8.5 it is huge. There are new
features and
advances in standards. One that has truly progressed since 8.5 is
SVG. While we don't have complete SVG Basic support yet, with full styling and scripting,
we are close. Getting here has been a long journey.
The first version of SVG,
SVG 1.0, became a W3C Recommendation in September 2001. We had an interest in SVG even earlier, but the sheer size of the specification made us decide against it, it was hard to justify putting so much effort into a format that was going to need years to get a foothold in the market. We had done it with PNG before, but that was easy. The arrival of the Adobe plug-in decided the matter, why should we spend our remaining resources on SVG when there was a viable alternative?
We weren't looking for a Flash competitor, which seemed to be Adobe's main drive until they bought Flash several years later. It definitely wasn't to make a Purity of Essence markup language not sullied by the real world like the HTML harlot – many working group members at that time were deeply hostile to the Web. The mobile companies were the next to turn on to SVG, and while there are clear benefits with SVG on phones, the gains can be even larger on a larger screen.
We saw a vector graphics markup language as an adjunct to HTML, together they would become more than they were separately. Each language could provide what the other one could not. HTML augmented with CSS could do both text, layout, hypertext, semantics and more. But it couldn't do the simplest illustrations (except through brutal hacks), or graphs, or fancy boxes or headlines. As HTML was a W3C language and SVG was a W3C language you would have expected that these two were well integrated, that you could easily use one to enhance the other.
That certainly isn't the case and this is a tremendous unfulfilled promise. It isn't all bad, the two languages do integrate with each other after a fashion. They can be looked at as feuding siblings, having them in the same room will cause torment, but they are family. Hopefully some years from now they
will both grow up.
How did it get to this state? One reason was attitude, another was timing, a third the participants. The way W3C works may also have had an influence. Many at the time believed that the Web was fundamentally broken, that it was better to have a fresh start. If the Web was broken, what was the point in integrating with it? Whenever SVG integrated with other specs, it was always to other new and still largely unused specifications. SVG wasn't to enhance the Web, it was to replace it. This was less ridiculous than it might seem now. The Web was war-torn and not in a very presentable state. To this day our
Open the Web team is working on, or rather against, the Web of 1999.
The timing was unlucky too. HTML 4 was done when SVG started, and in the following years that group was preoccupied on reengineering HTML to be on top of XML instead of (ostensibly) on SGML. In any case the climate for HTML, W3C's greatest hit, was chilly. There also seemed to be an implicit W3C assumption that XML made document integration automatic, and then that XML Namespaces would do so.
For one reason or another the browser makers were not involved. Microsoft, that had an SVG precursor in the
VML format, has just won the Browser Wars and could go back to sleep for another half decade. Netscape was busy changing its skin to Mozilla. We were turning our CSS browser into a DOM and CSS browser and, more hidden from view, a browser that could thrive in the most cramped devices. The actual SVG implementors didn't have any great interest in Web integration, for them this was just extra complexity with no direct benefit.
We might have been one of those implementors. In the summer of 2002, mere months after SVG 1.0 was published, our lead SVG developer held an internal demo of a prototype SVG implementation that included the iconic SVG image of the time,
the SVG tiger, looking the same way then as it does now. A bare-bones SVG feature set, much smaller than the extended SVG 1.1 Tiny we released in Opera 8, could have been a part of Opera 7. It would have been scalable vector graphics later to be animated, styleable, and scriptable, but not much more. But the great migration towards Presto had started, SVG had to wait. Further on there was a repeat of the Adobe plug-in story, as
Ikivo made a great SVG Tiny implementation that covered our phone needs if not our cross-platform needs.
Had it made any difference if we had given higher priority to SVG? For the standards, probably not. The odds were against it at the time, and we had little time to spare for W3C work. It might have increased the browser attention to SVG, but none would likely have come up with an actual implementation faster anyway.
Web developers might have caught on to SVG a little earlier, but they would have been even more frustrated with SVG than they were with HTML+CSS. Today Opera 8 (but not Opera 9) suffers from what I see as
a mistake in the specification: If there is anything in SVG a browser doesn't recognize, it is not allowed to show anything at all. For a hardcore graphics SVG implementation, like the one we were contemplating, that would in practice mean that unless the SVG was specifically made for Opera, we would not have been able to show it.
Another and much larger problem is that even with this rule, which was made with the intent to make different implementations interoperable, the existing SVG products today aren't really compatible. We will eventually get this right, but it will take years of slog (déjà vu for any CSS enthusiast).
When the SVG world and the Web world eventually did collide, that meeting was often acrimonious. It probably was unavoidable. While there was ideology on both sides to be dealt with, SVG as a standard needed some years on its own to find its standing. HTML, CSS, and DOM is today a fairly harmonious trinity, but that was not the case at the beginning.
Early on Netscape had annexed HTML, CSS came from W3C and got its first real implementation in Opera, and while Netscape came up with JavaScript, Microsoft trumped it with a superior and more popular DOM. Neutral ground W3C DOM (which is more similar to the MS DOM), while formally the standard DOM created by Microsoft and Netscape together, wasn't really supported by either browser. Mozilla was the first browser to support W3C DOM, followed a few years later by Opera, Konqueror, and most recently iCab. Standards are the first casualty in browser wars, and it took a decade to mend them. But during all this hammering something else happened, the three specs began to fit.
Fitting HTML and SVG the same way should hopefully mean less banging, and the signs are that they are slowly melding, and people from both camps are seing the mutual benefits (and, as many of us are commercial, the business cases). What is more intimidating is that this is going to be the easy part. Uniting HTML and SVG is a bit like uniting magnetism and electicity, there are other forces less mallable to the theory of the Grand Unified W3C.