Pervin’ the Standards

This is not a tightly-honed, logical, and factually persuasive essay. I cannot predict the future well enough to induce others to change from a dangerous course. Consider this as just an honest rant. I’m quite apprehensive of the future of HTML, if enough of us do not rant longly and loudly enough. Just an unedited draft of a rant; happy Friday to ya. 😉

The tipping point for the rant? “An analogue clock using only CSS“. Paul Hayes made an (admittedly studly) example where JavaScript queries the local system’s time, and Cascading Style Sheets move the hour, minute and second hands around.

Stylesheets. For animation.

Not SVG. Not an internal browser-specific drawing language. Not bitmap rotations through JavaScript.

Stylesheets.

Pervy.

Styling guides themselves have been around since SGML days. It’s handy to separate presentation and content.

The “Cascading” in CSS refers to how styling choices of the designer, the reader, and the browser vendor are reconciled together. It’s a tricky task, and Wikipedia has an intro to the innovations in this area in the 1990s.

What’s “a style”? The original intent was font, sizing, color, and other reading attributes. This makes sense. Later it was used for layout and positioning, instead of table-based layout. That’s questionable scope-creep, but is a done deal.

Now Apple is promoting styles as animation engines, transition engines, even 3D engines.

That’s kinky. Otaku, chikan. Ham sup. A Kraft-Ebbing candidate, just a wee bit too twisted.

Questions on CSS already dominate the web-design mailing lists, and have done so for many years. It isn’t clear how to use and practically deploy this cascade of styling instructions between creator, consumer, and browser vendor. Adding 3D and other animation into it may serve the needs of browser vendors, but does not promise to help content creators or their audiences, and runs difficult-to-predict scope creep risks.

If you want to make an animating clock in a browser, then go for it. But please don’t drag poor CSS in for that task! They’re style sheets people… not the kitchen sink!

Think of how such a proposal could possibly evolve. Some browsers will do animation through CSS. Some won’t. We already see it with the over-ambition of Ajax: tricksy sites will request visitors to change their browser brand, or will just outright fail on the smaller mobile browsers.

If animation becomes a mandated feature of CSS, competing proprietary browsers will run the risk of being labeled as non-compliant. It raises the barriers to new browser entrants. It serves to lock-in browsers which have already developed all this extra effluvia.

Sure you can code it. But how will people see it? (And by people I don’t mean “just you and your enlightened friends”… I mean universal access.) Take a tip from Hari Seldon, and think of how the technology would grow.

(Caveat: I’ve “known” Dave Hyatt, Dean Jackson, and Chris Marrin for years online, and I trust them as people. What I’m objecting to is the corporate drive to use a standards body to “bless” Apple’s internal needs for a media-savvy runtime engine via pollution of CSS’s core mission.)

(Related: Sam Ruby on HTML5 Evolution; Doug Crockford on HTML5 reset.)

Here are some of the common objections I expect to the above:

“Oh, we don’t want a full 3D engine like VRML, we just want little 3D effects.”

The clock example shows that people will use technologies in unexpected ways. The creators of Usenet did not intend mass advertising. The creators of email did not intend to create spam. The inventors of IFRAME and mashups did not anticipate third-party exploits. Stuffing the genie back inside the bottle is harder than looking carefully at the bottle before opening it.

“We want patent-unencumbered codecs, so toolmakers can make video tools without licensing modern codecs.”

I’m with you on the goal. But putting VIDEO into the Hypertext spec is not the way to do it. You cannot require new browser vendors to follow your lead. Make an Ogg Theora plugin, so that anyone can use it, with minimal impact on the overall spec itself. Don’t enact dependencies on a particular browser brand.

“But we don’t want a plugin — we want Open Video to be a First Class Citizen on The Open Web!”

So improve your plugin support! WMODE layering is still flakey across the various browsers. JavaScript/plugin intercommunication is still messier and more variable than it should be by this point. Make plugins a first-class citizen in the browser brands you control, and your video will have a wider, more inclusive audience.

“You’re just saying that ’cause Flash pays your salary.”

Adobe actually benefits from increased browser fragmentation, because we sell the tools that reconcile the various browser brands. And the more over-ambitious HTML becomes, the better Flash will do in comparison. But I’d rather not have that income if it comes at increased cost to people actually trying to use HTML.

Apple makes more money when it locks people into Uncle Steve’s Walled Garden. Google makes more money when it knows you better than you know yourself and can sell your attention to advertisers. Web pundits earn more self-esteem when they’re seen as being ahead of new trends. Web journalists earn more when they increase the power of advertising networks. Web devs earn peer respect when they code something new.

All of us have self-interest. None of us are pure. Question the arguments, don’t shoot the messenger.

Fortunately, there’s hope. Check out the apprehension in some of the comments at the Ajaxian write-up:

“While this interesting and maybe a little bit cool, I think it is inappropriate for Webkit to take CSS (even if only for itself) in this direction. CSS was created to define style. This seems more like a behavior to me and that belongs to the Javascript problem space.”

“CSS should be a style guide, not a programming language.”

“To me, it seems like Webkit is trying create CSS behaviors similar to what MS did with IE’s CSS Expressions close to a decade ago (which they have since abandoned in the most recent release of IE). I’m really hoping the W3C doesn’t add these behaviors to the CSS spec – behavior is much better suited to JS.”

“I thought the whole reason for CSS in the first place was separation of purpose, removing styling from content. Now we’re adding behavior into style?”

“Why is it bad when MS goes off in wild proprietary directions with CSS, but if Safari/Apple does it it’s newsworthy?”

“I for one want CSS to do CSS, Javascript to do Javascript, HTML to do HTML and ASP/PHP to do ASP/PHP. Once we start getting into overlap of these technologies it can only cause feature bloat, confusion and problems. I want each tech to be lean and mean to do be the best at what it does and leave other tasks outside their areas for the tech designed to handle those tasks.”

We may not be able to persuasively articulate why this will eventually be considered a bad architectural decision. It’s like when vendors of email clients started talking about how wonderful it would be to add hidden graphics and scripting to the emails strangers send to you. Vague warnings of an unsound future are at a disadvantage to self-interested “But I wanna do it!!” evangelists.

It’s hard to persuasively document future risks. But encumbering HTML and CSS like this is not the way to bless your own multimedia engine.

This is not a sound path. Think it through. Trust your gut.

A clock… in stylesheets!? There is something deeply wrong with this picture.

7 Responses to Pervin’ the Standards

  1. Glenn Williams says:

    I agree 100%.
    Just going to end up with more fragmentation. Just when I thought we were heading in the opposite direction.
    And as always, if M$ make these kind of bad moves the world jumps on them, but when Apple start to push it’s ok. I have to say I’m getting more and more frustrated with Apple. Having said that I do think webkit is tip-top, I just hope that this CSS misuse is not the shape of things to come.
    At the end of the day I’m a flex\CF\LC developer so I’m well out of the HTMheL browser compatibility head ache, but I still care about the direction and future of html\js\css.
    and as for video in HTML. well, just no.
    ‘CSS 3D Transforms Module Level 3’ – I hardly know where to begin with how much I disagree with that documents proposals.
    glenn

  2. John Dowdell says:

    The author of the clock project, Paul Hayes, checks in on some of the subsequent discussion. (Like I said, I admire the work itself, and appreciate that Paul took it as such… it’s the ongoing scope-creep of projects calling themselves “HTML5” that prompts my concerns.)

  3. Steve Jones says:

    Even if you claim this isn’t an official Adobe position, I believe the company should be concerned about these developments. You’ve complained non-stop in the past weeks about these new browser technologies – maybe you haven’t realized it yet, but subconsciously you know this is a big threat to Adobe. The fact that you’re responding emotionally rather than, as you say, a factual logical essay is a big hint.
    [jd sez: Uncritical scope creep killed Usenet, killed email, killed browser security. I should have spoken louder during earlier mistakes.]
    I’ve been making my living off Flash/Flex/CF contract work for years. It’s been a great gig. I love the Adobe technologies and tools. But even with all the amazing new features in Flash 10 and Flex, I’m seeing less interest in Flash and more interest in Ajax (whatever that term means!). Hopefully it is a trend that will reverse, but it is a pretty big one, and I don’t see Adobe with much of an answer. My job used to be lots of fun AS coding, but most of that has moved to the Web page with Ajax and has left my Flash work to be “yet another embedded video”. Boring!
    These new features coming to browsers might not be huge hacks, but it is happening and people are excited about it. Whether they call them standards or not doesn’t matter – what matters is that they exist. The big takeaway here isn’t that Apple is trying to get a standards rubber-stamp, it is that they are giving control of the technology away, which allows other browsers to implement it freely and have input on the final result. As far as I can guess, this is a major reason why the browsers don’t like Flash, and possibly why Flash is not on iPhone (why give control of your platform to a competitor?)
    Mozilla and Google are doing the same thing with their 3d engine and the video in HTML. I’m not a fan of Apple, but I pay attention when Google does something. For years Google have been fighting Microsoft with things like Google Docs. Now they seem to be taking a stance against Adobe (and YouTube is the biggest Flash site on the internet).
    Adobe, please wake up and realize your market is disappearing. Adding more technology to Flash isn’t working – you need to do something else. Complaining about competitors doesn’t work either.
    PS. Rather than complain about browsers not implementing WMODE better, why doesn’t Adobe step up to the plate and do it themselves? Firefox and WebKit are open source – there is nothing stopping Adobe from contributing.
    [jd sez: Adobe already contributes both to Mozilla (Tamarin) and WebKit (AIR).]

  4. Steve Jones says:

    > [jd sez: Adobe already contributes both to Mozilla (Tamarin) and WebKit (AIR).]
    Exactly! So why don’t you actually contribute to the thing you’re complaining about?
    [jd sez: Sorry, I lost track on this second sequential digression, but I gather you don’t also get a funny feeling in your stomach when one company adds proprietary animation extensions to its CSS implementation and then tries to ram this scope-creep through committee…?]
    Or is it that your point of view isn’t a company priority?
    It would be nice to know what Adobe’s official position is on these technologies – as a stock holder I’m very interested.
    BTW – I noticed a typo in my original comment: “These new features coming to browsers might not be huge hacks” was supposed to be “might *be* huge hacks” – oops. Hacky or not, right or wrong, they are happening. Complaining about them will not help. Make compelling alternatives.

  5. Joe says:

    I’m in two minds on this one. I’m no firm believer in design by committee and consider ‘bastardization by committee’ to be even worse. That said: – there’s a niggling feeling that a standardization process is somewhat inevitable. I do believe it would lead to constraining design of innovations, but on the plus side it would lead to interoperability across implementations.
    Is extending CSS a hack? Well, really CSS is an elaborate way of declaratively setting values on an object model through rules (by name, type etc). Similar concepts exist in Flex/Silverlight and other presentation technologies. I don’t see a problem with CSS specifically, more a problem with the underlying HTML DOM. The fact that it *is* a ‘DOM’ – Document Object Model rather than a presentation object model is really the underlying problem.
    Is this inevitable? I don’t think so. In the future I can imagine a browser being built on top of the current presentation virtual platforms. HTML and CSS would be a way of communicating to the real underlying platform (Flash, WPF, Cocoa, JavaFX). This is a natural extension to the CSS/Flex relationship already in place.
    This gives developers the option of adopting the lowest common denominator (HTML DOM) but breaking out of these confines where it is required.

  6. Steve Jones says:

    > [jd sez: Adobe already contributes both to Mozilla (Tamarin) and WebKit (AIR).]
    Exactly! So why don’t you actually contribute to the thing you’re complaining about?
    [jd sez: Looks like not only specs bloat, but talk about specs bloat. I’m voting against 3D animation via CSS/HTML right here right now, and Adobe has people working on the W3C committees too; your assumption’s off. Meanwhile, the main topic — of scope-creep being a danger to HTML’s continued practicality — remains.]
    Or is it that your point of view isn’t a company priority?
    It would be nice to know what Adobe’s official position is on these technologies – as a stock holder I’m very interested.
    BTW – I noticed a typo in my original comment: “These new features coming to browsers might not be huge hacks” was supposed to be “might *be* huge hacks” – oops. Hacky or not, right or wrong, they are happening. Complaining about them will not help. Make compelling alternatives.

  7. With regards to the barrier of entry being raised, is that not always the case? Would you argue that the img element should have never been added to HTML, as that raised the barrier of entry? Would you argue that CSS 2.0 should never have been published, as it raised the barrier to entry?
    [jd sez: Hi Geoffrey, IMG & CSS2 already exist. That’s why I’m asking about HTML5’s explicit scopecreep now.]