<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Infrequently Noted &#187; openweb</title>
	<atom:link href="http://infrequently.org/category/openweb/feed/" rel="self" type="application/rss+xml" />
	<link>http://infrequently.org</link>
	<description>Alex Russell on browsers, standards, and the process of progress.</description>
	<lastBuildDate>Thu, 16 May 2013 00:07:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Why What You&#8217;re Reading About Blink Is Probably Wrong</title>
		<link>http://infrequently.org/2013/04/probably-wrong/</link>
		<comments>http://infrequently.org/2013/04/probably-wrong/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 21:00:17 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[opensource]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=2005</guid>
		<description><![CDATA[By now you&#8217;ve seen the news about Blink on HN or Techmeme or wherever. At this moment, every pundit and sage is attempting to write their angle into the annoucement and tell you &#8220;what it means&#8221;. The worst of these will try to link-bait some &#8220;hot&#8221; business or tech phrase into the title. True hacks [...]]]></description>
				<content:encoded><![CDATA[<p>By now you&#8217;ve seen the news about <a href="http://chromium.org/blink">Blink</a> on HN or Techmeme or wherever. At this moment, every pundit and sage is attempting to write their angle into the annoucement and tell you &#8220;what it means&#8221;. The worst of these will try to link-bait some &#8220;hot&#8221; business or tech phrase into the title. True hacks will weave a Google X and Glass reference into it, or pawn off some &#8220;GOOGLE WEB OF DART AND NACL AND EVIL&#8221; paranoia as prescience (sans evidence, of course). The more clueful of the ink-stained clan will constrain themselves to objective reality and instead pen screeds for/against diversity despite it being a <a href="http://ccs.mit.edu/papers/CCSWP135.html">well-studied topic</a> to <a href="http://scholar.google.com/scholar?cites=5594983873856483033&#038;as_sdt=2005&#038;sciodt=0,5&#038;hl=en">which they&#8217;re not adding much</a>.</p>
<p>May the deities we&#8217;ve invented forgive us for the tripe we&#8217;re about to sell each other as &#8220;news&#8221;.</p>
<p>What&#8217;s bound to be missing in most of this coverage is what&#8217;s plainly said, if not in so many words, in the <a href="http://blog.chromium.org/2013/04/blink-rendering-engine-for-chromium.html">official blog post</a>: <em>going faster matters</em>.</p>
<p>Not (just) code execution, but <em>cycle times</em>: how long does it take you to build a thing you can try out, poke at, improve, or demolish? We mere humans do better when we have directness of action. <a href="http://vimeo.com/36579366">This is what Bret Victor points us towards</a> &#8212; the inevitable constraints of our ape-derived brains. Directness of action <em>matters</em>, and when you&#8217;re swimming through build files for dozens of platforms you don&#8217;t work on, that&#8217;s a step away from directness. When you&#8217;re working to fix or prevent regressions you can&#8217;t test against, that&#8217;s a step away. When compiles and checkouts take too long, that&#8217;s a step away. When landing a patch in both WebKit and Chromium stretches into a multi-day dance of flags, stub implementations, and dep-rolls, that&#8217;s many steps away. And each step hurts by a more-than-constant factor.</p>
<p>This hit home for me when I got my first workstation refresh. I&#8217;d been working on Chrome on Windows for nearly a year in preparation for the Chrome Frame release, and all the while I&#8217;d been hesitant to ask for one of the shiny new boxes that the systems people were peddling like good-for-you-crack &#8212; who the hell was I to ask for new hardware? They just gave me this shiny many-core thing a year ago, after all. And I had a linux box besides. And a 30&#8243; monitor. What sort of unthankful bastard asks for more? Besides, as the junior member of the team, surely somebody else should get the allocation first. </p>
<p>Months later they gave me one anyway. Not ungrateful, I viewed the new system with trepidation: it&#8217;d take a while to set up and I was in the middle of a marathon weekend debugging session over a crazy-tastic re-entracy bug in a GCF interaction with <code>urlmon.dll</code> that was blocking the GCF launch. If there was a wrong time to change horses, surely this was it. At some point it dawned that 5-10 minute link times provided enough time to start staging/configuring at the shiny i7 box.</p>
<p>A couple of hours later the old box was still force-heating the eerily dark, silent, 80-degree floor of the SF office &#8212; it wasn&#8217;t until a couple of weeks later that I mastered the after-hours A/C &#8212; when my new, <em>even hotter</em> workstation had an OS, a checkout, compiler, and <a href="http://msdn.microsoft.com/en-gb/windows/hardware/gg463009.aspx">WinDBG + cargo-culted symserver config</a>. One build on the new box and I was <em>hooked</em>. </p>
<p>5-10 minute links went to 1-2&#8230;and less in many cases because I could now enable incremental linking! And HT really worked on the i7&#8242;s, cutting build times further. Hot damn! In what felt like no-time at all, my drudgery turned to sleuthing/debugging bliss (if there is such a thing). I could make code changes, compile them, and be working with the results in less time than it took to make coffee. Being able to make changes and then <em>feel</em> them near-instantly turned the tide, keeping me in the loop longer, letting me explore faster, and making me less afraid to change things for fear of the time it would take to roll back to a previous state. It wasn&#8217;t the webdev nirvana of ctrl-r, but it was <em>so</em> liberating that it nearly felt that way. What had been a week-long investigation was wrapped up in a day. The launch was un-blocked (at least by that bug) and the world seemed new. </p>
<p>The difference was directness.</p>
<p>The same story repeats itself over and over again throughout the history of Chrome: shared-library builds, ever-faster workstations, trybots and then faster trybots, <a href="https://code.google.com/p/gyp/">gyp</a> (instead of Scons), many different forms of distributed builds, make builds for gyp (courtesy of Evan Martin), <a href="http://clang.llvm.org/">clang</a>, and of course <a href="http://martine.github.com/ninja/">ninja</a> (also Evan&#8230;dude&#8217;s a <em>frickin hero</em>). Did I mention faster workstations? They&#8217;ve made all the same sort of liberating difference. Truly and honestly, in ways I cannot describe to someone who has not felt the difference between ctrl-r development and the traditional Visual Studio build of a massive project, these are the things that change your life for the better when you&#8217;re lashed to the mast of a massive C++ behemoth.</p>
<p>If there is wisdom in the Chrome team, it is that these projects are not only recognized as important, but the very best engineers volunteer to take them on. They seem thankless, but Chrome is an environment that rewards this sort of group-adaptive behavior: the highest good you can do as an engineer is to make your fellow engineers more productive.</p>
<p>And that&#8217;s what you&#8217;re missing from everything else you&#8217;re reading about this announcement today. To make a better platform faster, you must be able to iterate faster. Steps away from that are steps away from a better platform. Today&#8217;s WebKit defeats that imperative in ways large and small. It&#8217;s not anybody&#8217;s fault, but it <em>does</em> need to change. And changing it will allow us to iterate faster, working through the annealing process that takes a good idea from drawing board to API to refined feature. We&#8217;ve always enjoyed this freedom in the Chromey bits of Chrome, and unleashing Chrome&#8217;s Web Platform team will deliver the same sorts of benefits to the web platform that faster iteration and cycle times have enabled at the application level in Chrome.</p>
<p>Why couldn&#8217;t those cycle-time-improving changes happen inside WebKit? After all, much work has happened in the past 4 years (often by Googlers) to improve the directness of WebKit work: EWS bots, better code review flow, improved scripts and tools for managing checkins, the commit queue itself. The results have been impressive and have enabled huge growth and adoption by porters. WebKit now supports multiple multi-process architecture designs, something like a half-dozen network stack plug-ins, and similar diversity at every point where the engine calls back to outside systems for low-level implementation (GPU, network, storage, databases, fonts&#8230;you name it). The community is now committed to enabling porters, and due to WebKit&#8217;s low-ish level of abstraction each new port raises the tax paid by every other port. As <a href="https://plus.google.com/104985880647110483202/posts">James Robinson</a> has observed, this diversity creates an ongoing drag when the dependencies are intertwined with core APIs in such a way that they can bite you every time you go to make a change. The <a href="http://www.chromium.org/developers/content-module/content-api">Content API boundary</a> is Blink&#8217;s higher-level &#8220;embedding&#8221; layer and encapsulates all of those concerns, enabling much cleaner lines of sight through the codebase and the removal of abstractions that seek only to triangulate between opaque constraints of other ports. Blink gives developers much more assurance that when they change something, it&#8217;s only affecting the things they think it&#8217;s affecting. Moving without fear is the secret of all good programming. Putting your team in a position to move with more surety and less fear is hugely enabling.</p>
<p>Yes, there are losses. Separating ourselves from a community of hugely talented people who have worked with us for years to build a web engine is not easy. The decision was wrenching. We&#8217;ll miss their insight, intelligence, and experience. In all honesty, we may have paid too high a price for too long because of this desire to stay close to WebKit. But whatever the &#8220;right&#8221; timing may have been, the good that will come from this outweighs the ill in my mind.</p>
<p>Others will cover better than I can how this won&#8217;t affect your day-to-day experience of WebKit-derived browser testing, or how it won&#8217;t change the feature-set of Chrome over-night, or how the new feature governance process is more open and transparent. But the most important thing is that we&#8217;ll all be going faster, either directly via Blink-embedding browsers or via benchmarks and standards conformance shaming. You won&#8217;t feel it overnight, but it&#8217;s the sort of change in model that enables concrete changes in architecture and performance and <em>that</em> is something to cheer about &#8212; <a href="http://fronteers.nl/congres/2012/sessions/the-web-platform-and-the-process-of-progress-alex-russell">change is the predicate for positive change, after all</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2013/04/probably-wrong/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Reforming the W3C TAG</title>
		<link>http://infrequently.org/2012/12/reforming-the-w3c-tag/</link>
		<comments>http://infrequently.org/2012/12/reforming-the-w3c-tag/#comments</comments>
		<pubDate>Fri, 07 Dec 2012 12:24:34 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1958</guid>
		<description><![CDATA[And so it has come to pass that W3C Technical Architecture Group (TAG) elections are afoot. Nominations have ended and the candidates have been announced. There are four seats open and nine candidates running, so it&#8217;s worth understanding why anyone should vote for the reformers (myself, Yehuda Katz, Anne van Kesteren, Peter Linss, and Marcos [...]]]></description>
				<content:encoded><![CDATA[<p>And so it has come to pass that <a href="http://www.w3.org/2001/tag/">W3C Technical Architecture Group (TAG)</a> elections are afoot. Nominations have ended and the <a href="http://www.w3.org/2012/12/03-tag-nominations">candidates have been announced</a>. There are four seats open and nine candidates running, so it&#8217;s worth understanding why anyone should vote for the reformers (myself, <a href="https://plus.sandbox.google.com/106300407679257154689/posts">Yehuda Katz</a>, <a href="http://annevankesteren.nl/">Anne van Kesteren</a>, <a href="http://www.linkedin.com/pub/peter-linss/2/251/956">Peter Linss</a>, and <a href="http://www.linkedin.com/in/marcosc">Marcos Caceres</a>). For general background, see my <a href="http://infrequently.org/2012/11/election-season/">previous post</a>. Here I&#8217;ll include more specifics, so if that sounds boring, <a href="http://www.flickr.com/photos/kittytoes/8247156949/in/pool-99442622@N00/" target="_new">here&#8217;s a kitten!</a></p>
<p>After doing much reading of TAG <a href="http://www.w3.org/2001/tag/tag-weekly">meeting minutes</a>, <a href="http://www.w3.org/2001/tag/">f2f notes</a>, <a href="http://www.w3.org/2001/tag/group/track/">issues</a>, <a href="http://www.w3.org/2001/tag/group/track/products">delivered products</a>, and <a href="http://www.w3.org/2001/tag/findings#approved">findings</a> I&#8217;ve come to a sobering conclusion: the TAG isn’t focused on eliminating the biggest sources of developer pain today. Now, you can argue that this might not be their job, but I won&#8217;t agree. It&#8217;s the TAGs job to help ensure the health of the platform, both for publishers and search engines, but also for authors. And the web as a platform is in some real trouble today.</p>
<p>There doesn&#8217;t seem to be a sense of urgency in the TAG about the corrosive effects of poor design and integration on the overall usability and health of the system. The Web to the TAG, as I can understand it through the meeting minutes and notes, is a collection of documents that represent internally-referential collections of data which are are linked to other documents, not a series of applications that are attempting ever more impressive feats of richness on a platform that stymies them every time you hit one of the seams. In reality it is (aspirationally) both things but the very real tensions between them don&#8217;t appear in the TAG&#8217;s work, leading me to believe that it doesn&#8217;t comprehend the latter aspect of web development today and what that means for the future health and viability of the platform.</p>
<p>I drone <a href="http://infrequently.org/2012/04/bedrock/">on</a> and <a href="http://infrequently.org/2012/04/one-for-dave-and-david/">on</a> and <em><a href="http://infrequently.org/2012/11/layers-of-confusion/">on</a></em> about layering because explaining each bit of the platform in terms of the one below it relieves much of the tension created by disconnected declarative forms and APIs. This matters because in today&#8217;s web when you go <em>ever so slightly</em> off the path paved by a spec&#8217;s use-cases, the drop-off is impossibly steep, and the only way to keep from risking life-threatening abstraction level transitions is to flood the entire canyon with JavaScript and hope you can still swim in the resulting inland sea of complexity. This is what our biggest, &#8220;best&#8221; webapps do today, relying on ENORMOUS piles of JavaScript that largely serve to re-create what browsers already do in the hopes of marginally extending that capability. It&#8217;s simply nuts, but the TAG doesn&#8217;t seem to acknowledge the threat this poses to everything it holds dear: linking, declarative forms, data&#8230;it&#8217;s all about to be lost beneath the waves, and because the TAG doesn&#8217;t understand the growing importance of JS, it seemingly doesn&#8217;t see the threat. Declarative forms disappear first beneath imperatively-delivered complexity; lingua-franca APIs next. Without ways of getting what your app needs while keeping one foot on the declarative path, app developers do what they must; declarative data and relationships become &#8220;nice to haves&#8221; not &#8220;the way you do it&#8221;. Layering provides easy steps between the levels of abstraction, avoiding the need to re-create what the platform was already doing for you along with whatever custom thing you need &#8212; and it&#8217;s not the TAG&#8217;s current agenda.</p>
<p>If elected, I will work to fix that. The TAG is the right group to formulate and articulate a theory of good layering in the web platform&#8217;s architecture and it&#8217;s the only group at the W3C whose mission is to help spec authors wrestle with large-scale design and integration problems like this. My background is in apps, and JS, and browsers, and I work at one of the few places deeply invested in ensuring that we maintain a healthy, declarative web for the future. I care tremendously about the viability of the largely-declarative web. Through my work with Dimitry Glazkov and many others on Web Components I&#8217;ve done as much as anyone in the last decade to help build a bridge between the JS and declarative worlds. Dimitry and I created and led the team here at Google that have put Shadow DOM, CSS Variables, Custom Elements, Mutation Observers (and Object.observe) into specs and on the platform agenda, all with the explicit goal of creating better layering; explaining the magic in today&#8217;s platform and drawing connections between the bits that had none before. And I think we need to keep building more of those bridges, but it&#8217;s hard when W3C culture views that agenda with suspicion. Why would any WG concern itself with integration with specs outside its charter? It&#8217;s the TAGs job to inject that global perspective. I believe the TAG should pursue the following work as a way of filling its <a href="http://www.w3.org/2004/10/27-tag-charter.html">charter</a>:</p>
<ul>
<li><b>Getting reconnected to web developers</b>: <a href="http://www.w3.org/2001/tag/">today&#8217;s TAG</a> isn&#8217;t composed of web developers (<a href="http://www.youtube.com/watch?v=Ug6XAw6hzaw&#038;t=1m29s" target="_new">Sir Tim excepted</a>) and the general level of familiarity on the committee with the pressing issues in web development seems low. As a member I&#8217;ll press to ensure that at least one of the face-to-face meetings each year overlaps with an industry web development conference (not an academic symposium). Having the TAG simply go and listen, and perhaps answer questions in such a forum, would do much to illuminate the gulf in understanding. I also support <a href="http://marcosc.com/2012/12/w3c-tag-elections/">Marco&#8217;s agenda</a> of direct developer outreach (G+, AMA, IRC, etc.)</li>
<li><b>Forming and expressing an opinion about idiomatic JS APIs</b>: the W3C is the body that specifies JavaScript&#8217;s largest, most important standard library yet it doesn&#8217;t seem to treat that task with any care. Poor integration with JS types, idioms, library conventions, and calling conventions are the calling card of W3C APIs. The detrimental effects are pervasive and corrosive. The TAG should produce a guide on designing idiomatic JS APIs for WGs to use. Additionally, the TAG should use its spec review perch to call out poorly designed JS APIs as such and propose changes that improve full-stack integration. Lastly, the TAG should be open to facilitating (or teaching!) classes on how to design good APIs for the web. It&#8217;s a skill that can be learned like any other, and the TAG has  a unique responsibility towards ensuring that the next generation of APIs is better than the last.</li>
<li><b>Bridge building to TC39</b>: I&#8217;ve served on ECMA TC39 &#8212; the standards body for JavaScript &#8212; since 2007 and in that time I&#8217;ve seen how the dysfunctional relationship with the W3C enables terrible API design. Needless to say, the results haven&#8217;t been great. For a small taste, go look at some <a href="http://www.html5rocks.com/en/tutorials/indexeddb/todo/">IndexedDB samples</a>. There are dozens of terrible DOM APIs (from the perspective of JS) and JS fails to help describe interfaces well enough (from the perspective of DOM). The impasse has even <a href="http://www.w3.org/TR/WebIDL/">been codified</a>. For the sake of the platform and the developers who must use it, we need to do better. I will push to ensure that at least one of the face-to-face meetings of TC39 each year overlaps with a TAG meeting. I&#8217;m hopeful that with my fellow TC39 delegate (Yehuda Katz) and the maintainer of DOM (Anne van Kesteren) also on the TAG, we can make serious progress on this front, actively building a culture of understanding between TC39 and the W3C and furthering the common goal of a web that&#8217;s competitive and well integrated.</li>
<li><b>Advocate for layering</b>: it&#8217;s the TAGs natural role to advocate for coherence in the platform, not only at the markup level, but also inside the app runtime bits that take up so very much of the time in W3C&#8217;s most active WGs. If the TAG doesn&#8217;t do this, asking the important questions at the right time and working to show the benefits of collaboration and cross-API thinking, who will? To combat this, I propose that the TAG take as an open issue the lack of coherence in the client side platform and work to identify the largest developer pain-points in findings that work to set an agenda for WGs in the future. There is no hope for a well-integrated, layered platform without every WG accepting some responsibility for the usability and layering commons, and if elected I will work to ensure the TAG is a tireless advocate for that commons.</li>
</ul>
<p>If that sounds like meaningful progress to you, I&#8217;d appreciate your organization&#8217;s vote; along with your consideration to vote for my fellow reformers: Yehuda Katz, Anne van Kesteren, Peter Linss, and Marcos Cáceres. AC reps for each organization can <a href="https://www.w3.org/2002/09/wbs/33280/tag-20121203/">vote here</a> and have 4 votes to allocate in this election. Voting closes near the end of the month, and it&#8217;s also holiday season, so if you work at a <a href="http://www.w3.org/Consortium/Member/List">member organization</a> and aren&#8217;t the AC rep, please, find out who that person in your organization is and make sure they vote. The TAG can&#8217;t fix the web or the W3C, but I believe that with the right people involved it can do a lot more to help the well-intentioned people who are hard at work in the WGs to build in smarter ways that pay all of us back in the long run.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/12/reforming-the-w3c-tag/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Origin(al) Sins</title>
		<link>http://infrequently.org/2012/12/original-sins/</link>
		<comments>http://infrequently.org/2012/12/original-sins/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 13:01:52 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[talks]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1949</guid>
		<description><![CDATA[Video is now up from a talk I gave in October at OWASP&#8217;s AppSec USA conference &#8212; something of a departure from my usual speil: Origin(al) Sins &#8211; Alex Russell from OWASP AppSec USA on Vimeo. I made some pretty glaring errors in the talk: you can&#8217;t combine sandboxing with seamlessness for cross-origin content. It&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>Video is now up from a talk I gave in October at OWASP&#8217;s AppSec USA conference &#8212; something of a departure from my usual speil:</p>
<p><iframe src="http://player.vimeo.com/video/54157396?badge=0" width="500" height="275" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/54157396">Origin(al) Sins &#8211; Alex Russell</a> from <a href="http://vimeo.com/appsecusa">OWASP AppSec USA</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>I made some pretty glaring errors in the talk: you can&#8217;t combine sandboxing with seamlessness for cross-origin content. It&#8217;s something I&#8217;m hoping we can improve on in the browsers/specs, but it&#8217;s not the current state of play. I also failed to mention that CSP is Mozilla&#8217;s brain-child and they deserve huge credit for pushing it down the field. Similarly, I failed to mention that IE 10&#8242;s CSP support is actually <a href="http://caniuse.com/contentsecuritypolicy">quite shite, supporting only the <code>sandbox</code> directive</a>. Lastly, my objections to the OCAP worldview may have been oblique so, before the flames arrive in the comments, let me try again:</p>
<p>I think that you&#8217;ll always end up with some variant of &#8220;object capabilities&#8221;, if only through wrapper objects that hide protocol details. The OCAP world calls these &#8220;membranes&#8221; for particularly high-fidelity versions of this. When you have a word for it, it&#8217;s probably common. Vending objects that represent capabilities is natural at some level, but I strongly resist the urge to take the pun too far. Don&#8217;t get me wrong, I&#8217;m a huge fan of capabilities as the model for building apps that have real security by default; and I hope their pervasive use combined with more restrictive, separated execution contexts creates the world we all want to be in. My only quibble is on the developer ergonomics front. OCAP encourages the (perhaps naive) programmer to build many things inside the same &#8220;vat&#8221; (heap, context, whatever), leading to brittleness whereas protocols and true sandboxing can create secure boundaries that, importantly, <em>look</em> like boundaries. Systems that provide big &#8220;this is a security boundary!&#8221; disclaimers on their APIs while making it hard to screw them up stand a better chance of weathering the storms of human imperfection. Can you do OCAP right? Sure, it&#8217;s possible, but as I argue in the  talk, betting on humans to do the right thing is eventually and inevitably a loser. So I favor large, knobby interfaces over which you can send messages and no more. Wrap &#8216;em up with an RPC layer&#8230;cool&#8230;whatever. But design a protocol with side-effects that are straight-forward to reason about on both sides &#8212; not an object which can be easily intertwined with many others in a dense graph &#8212; and you&#8217;ve got my vote. I&#8217;m even in favor of building those protocols and then wrapping them with easier-to-use APIs (call it &#8220;CAP->O&#8221;, if you will), but eliding the step of a large boundary over which you can only send data, and making it relatively hard to cross? Nah, I&#8217;ll be over here with the easy-to-reason about solutions that don&#8217;t make my small-ish brain melt, thanks.</p>
<p>Also, I wasn&#8217;t sure to <a href="https://vimeo.com/channels/appsecusa/54087885">what extent Doug was joking about &#8220;incompetent&#8221; programmers in his talk</a>, so our disagreements may not be what they seem. Caveat emptor.</p>
<p>Thanks to <a href="http://jeremiahgrossman.blogspot.co.uk/">Jeremiah</a> and the other organizers for taking a risk and inviting someone who&#8217;s been out of the security space for so long to give a talk. I promise to them that should they be so foolish in the future, I&#8217;ll be sure to duck out and get one of my betters on the Chrome Security Team to stand in instead ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/12/original-sins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hoisted From The Comments</title>
		<link>http://infrequently.org/2012/04/hoisted-from-the-comments/</link>
		<comments>http://infrequently.org/2012/04/hoisted-from-the-comments/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 10:40:49 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1844</guid>
		<description><![CDATA[Some stuff is too good to leave in the shadows. On my Bedrock post, James Hatfield writes in with a chilling point, but one which I&#8217;ve been making for a long while: ”every year we’re throwing more and more JS on top of the web” The way things are going in my world, we are [...]]]></description>
				<content:encoded><![CDATA[<p>Some stuff is too good to leave in the shadows. On my <a href="">Bedrock</a> post, <a href="http://www.emenoh.com/">James Hatfield</a> writes in with a chilling point, but one which I&#8217;ve been making for a long while:</p>
<blockquote><p>
”every year we’re throwing more and more JS on top of the web”</p>
<p>The way things are going in my world, we are looking at replacing the web with JS, not simply layering. At a certain point you look at it all and say “why bother”. Browsers render the DOM not markup. They parse markup. Just cut out the middle man and send out DOM – in the form of JS constructs.</p>
<p>The second part is to stop generating this markup which then must be parsed on a server at the other end of a slow and high latency prone communication channel. Instead send small compact instructions to the browser/client that tells it how to render and when to render. Later you send over the data, when it’s needed&#8230;
</p></blockquote>
<p>This is a clear distillation of what scares me about the road we&#8217;re headed down because for each layer you throw out and decide to re-build in JS, you end up only doing what you <em>must</em>, and that&#8217;s often a deadline-driven must. Accessibility went to hell? Latency isn&#8217;t great? Doesn&#8217;t work at all without script? Can&#8217;t be searched? When you use built-ins, those things are more-or-less taken care of. When we make them optional by seizing the reigns with script, not only do we wind up playing them off against each other (which matters more, a11y or latency?) we often find that developers ignore the bits that aren&#8217;t flashy. Think a11y on the web isn&#8217;t great now? Just wait &#8217;till it&#8217;s <em>all</em> JS driven.</p>
<p>It doesn&#8217;t have to be this way. When we get <a href="http://code.google.com/p/mdv/">Model Driven Views</a> into the browser we&#8217;ll have the powerful &#8220;just send data and template it on the client side&#8221; system everyone&#8217;s looking for but without threatening the searchability, a11y, and fallback behaviors that make the web so great. And this is indicative of a particularly strong property of markup: it&#8217;s about <em>relationships</em>. &#8220;This thing references that thing over there and does something with it&#8221; is hard for a search engine to tease out if it&#8217;s hidden in code, but if you put it in <em>markup</em>, well, you&#8217;ve got a future web that continues to be great for users, the current crop of developers, and whoever builds and uses systems constructed on top of it all later. That last group, BTW, is you if you use a search engine.</p>
<p>But it wasn&#8217;t all clarity and light in the comments. <a href="http://mailmarkup.org/">Austin Cheney</a> <a href="http://infrequently.org/2012/04/one-for-dave-and-david/#comment-239698">commented</a> on the <a href="http://infrequently.org/2012/04/one-for-dave-and-david">last post</a> to say:</p>
<blockquote><p>
This article seems to misunderstand the intention of these technologies. HTML is a data structure and nothing more. JavaScript is an interpreted language whose interpreter is supplied with many of the most common HTML parsers. That is as deep as that relationship goes and has little or nothing to do with DOM.</p>
<p>&#8230;It would be safe to say that DOM was created because of JavaScript, but standard DOM has little or nothing to do with JavaScript explicitly. Since the release of standard DOM it can be said that DOM is the primary means by which XML/HTML is parsed suggesting an intention to serve as a parse model more than a JavaScript helper.</p>
<p>Types in DOM have little or nothing to do with types in JavaScript. There is absolutely no relationship here and there shouldn’t be&#8230;You cannot claim to understand the design intentions around DOM without experience working on either parsers or schema language design, but its operation and design have little or nothing to do with JavaScript. JavaScript is just an interconnecting technology like Java and this is specifically addressed in the specification in Appendix G and H respectively.
</p></blockquote>
<p>And, after <a href="http://infrequently.org/2012/04/one-for-dave-and-david/#comment-239699">I tried to make the case that noting how it is today is no replacement for a vision for how it should be</a>, Austin <a href="http://infrequently.org/2012/04/one-for-dave-and-david/#comment-239701">responds</a>:</p>
<blockquote><p>
The problem with today’s web is that it is so focused on empowering the people that it is forgetting the technology along the way. One school of thought suggests the people would be better empowered if their world were less abstract, cost radically less to build and maintain, and is generally more expressive. One way to achieve such objectives is alter where costs exist in the current software life cycle of the web. If, for instance, the majority of costs were moved from maintenance to initial build then it could be argued that more time is spent being creative instead of maintaining.</p>
<p>I have found that when working in HTML alone that I save incredible amounts of time when I develop only in XHTML 1.1, because the browser tells you where your errors are. &#8230; Challenges are removed and costs are reduced by pushing the largest cost challenges to the front of development.</p>
<p>&#8230; The typical wisdom is that people need to be empowered. If you would not think this way in your strategic software planning then why would it make sense to think this way about strategic application of web technologies? &#8230;
</p></blockquote>
<p>This might all sound very rational on one level, but a few points need to be made:</p>
<ul>
<li>If we&#8217;re not building technology <em>for people</em>, WTF are we doing with these CPU cycles exactly?
</li>
<li>Speed of iteration is a key enabler of progress in any technology stack I&#8217;ve ever worked in
</li>
<li>Strictness fails in the wild
</li>
</ul>
<p>I think Austin&#8217;s point about moving costs from maintenance to build is supposed to suggest that if we were only more strict about things, we&#8217;d have less expensive maintenance of systems, but it&#8217;s not clear to me that this has anything to do with strictness. My observation from building systems is that this has a lot more to do with being able to build modular, isolated systems that compose well. Combine that with systems that let you iterate fast, and you can grow very large things that can evolve in response to user needs without turning into spaghetti quite so quickly. Yes, the web isn&#8217;t great for that today, but strictness is orthogonal. Nothing about <a href="http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html">Web Components</a> demands strictness to make maintainability infinitely better.</p>
<p>And the last point isn&#8217;t news. <a href="http://en.wikipedia.org/wiki/Jon_Postel#Postel.27s_Law">Postel&#8217;s Law</a> isn&#8217;t a plea about what you, dear software designer, <em>should</em> be doing, it&#8217;s an insightful clue into the economics of systems at scale. XML tried being strict and <em>it didn&#8217;t work</em>. Not even for RSS. Mark Pilgrim&#8217;s famously heroic attempts at building a reliable feed parser match the war stories I&#8217;ve heard out of the builders of every large RSS system I&#8217;ve ever talked to. It&#8217;s not that it&#8217;s a nice idea to be forgiving about what you accept, it&#8217;s that there&#8217;s no way around it if you want scale. What Austin has done is the classic bait-and-switch: he has rhetorically substituted what works in his organization (and works well!) for what&#8217;s good for the whole world, or even what&#8217;s plausible. I see this common logical error in many a standards adherent/advocate. They imagine some world in which it&#8217;s <em>possible</em> to be strict about what you accept. I think that world might be possible, but the population would need to be less than the size of a small city. Such a population would never have ever created any of the technology we have, and real-world laws would be how we&#8217;d adjudicate disputes. As soon as your systems and contracts deal with orders of magnitude more people, it <em>pays to be reliable</em>. You&#8217;ll win if you do and lose if you don&#8217;t. It&#8217;s inescapable. So lets banish this sort of small-town thinking to the mental backwaters where it belongs and get on with building things for <em>everyone</em>. After all, this is about people. Helping <em>sentient beings</em> achieve their goals in ways that are both plausible and effective.</p>
<p>If helping people is <em>not</em> what this is about, I want out.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/04/hoisted-from-the-comments/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>For Dave and David</title>
		<link>http://infrequently.org/2012/04/one-for-dave-and-david/</link>
		<comments>http://infrequently.org/2012/04/one-for-dave-and-david/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 14:49:16 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1819</guid>
		<description><![CDATA[Dave Herman jokingly accused me a couple of TC39 meetings ago of being an &#8220;advocate for JavaScript as we have it today&#8221;, and while he meant it in jest, I guess to an extent it&#8217;s true &#8212; I&#8217;m certainly not interested in solutions to problems I can&#8217;t observe in the wild. That tends to scope [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://calculist.org/">Dave Herman</a> jokingly accused me a couple of TC39 meetings ago of being an &#8220;advocate for JavaScript as we have it today&#8221;, and while he meant it in jest, I guess to an extent it&#8217;s true &#8212; I&#8217;m certainly not interested in solutions to problems I can&#8217;t observe in the wild. That tends to scope my thinking aggressively towards solutions that look like they&#8217;ll have good adoption characteristics. Fix things that are broken for real people in ways they can understand how to use.</p>
<p>This is why I get so exercised about <a href="http://www.w3.org/TR/WebIDL/">WebIDL</a> and the way it breaks the mental model of JS&#8217;s &#8220;it&#8217;s just extensible objects and callable functions&#8221;. It&#8217;s also why my discussions with folks at last year&#8217;s <a href="http://www.w3.org/2011/11/TPAC/">TPAC</a> were so bleakly depressing. I&#8217;ve been meaning to write about TPAC ever since it happened, but the time and context never presented themselves. Now that I got some of my words out about <a href="http://infrequently.org/2012/04/bedrock/">layering in the platform</a>, the time seems right.</p>
<p>Let me start by trying to present the argument I heard from multiple sources, most likely from (in my feeble memory) <strike><a href="http://annevankesteren.nl/">Anne van Kestern</a></strike> Jonas Sicking(?):</p>
<blockquote><p>
ECMAScript is not fully self-describing. <a href="http://es5.github.com/#x8.6.2">Chapter 8 drives a hole right through the semantics, allowing host objects to whatever they want</a> and more to the point, there&#8217;s no way in JS to describe e.g. list accessor semantics. You can&#8217;t subclass an Array in JS meaningfully. JS doesn&#8217;t follow it&#8217;s own rules, so why should we? DOM is just host objects and all of DOM, therefore, is Chapter 8 territory.
</p></blockquote>
<p>Brain <em>asploded</em>.</p>
<p>Consider the disconnect: they&#8217;re not saying &#8220;oh, it sure would be nice if our types played better with JS&#8221;, they&#8217;re saying &#8220;you and what army are gonna make us?&#8221; Remember, WebIDL isn&#8217;t just a shorthand for describing JavaScript classes, it&#8217;s an <a href="http://www.w3.org/TR/WebIDL/#idl-types">entirely parallel type hierarchy</a>.</p>
<p>Many of the Chapter 8 properties and operations are still in the realm of magic from JS today, and we&#8217;re working to open more of them up over time by giving them API &#8212; in particular I&#8217;m hopeful about Allen Wirfs-Brock&#8217;s work on making array accessors something that we can treat as a protocol &#8212; but it&#8217;s magic that DOM is appealing to and even <a href="http://www.w3.org/TR/WebIDL/#es-platform-objects">specifying itself in terms of</a>. Put this in the back of your brain: DOM&#8217;s authors have declared that they <em>can and will do magic</em>.</p>
<p>Ok, that&#8217;s regrettable, but you can sort of understand where it comes from. Browsers are largely C/C++ enterprises and DOM started in most of the successful runtimes as an FFI call <em>from</em> JS <em>to</em> an underlying set of objects which are owned by C/C++. The truth of the document&#8217;s state was not owned by the JS heap, meaning every API you expose is a conversation with a C++ object, not a call into a fellow JS traveler, and this has profound implications. While we have one type for strings in JS, your C++ side might have <code>bstr</code>, <code>cstring</code>, <code>wstring</code>, <code>std::string</code>, and/or some variant of <code>string16</code>. </p>
<p>JS, likewise, has <code>Number</code> while C++ has <code>char</code>, <code>short int</code>, <code>int</code>, <code>long int</code>, <code>float</code>, <code>double</code>, <code>long double</code>, <code>long long int</code>&#8230;you get the idea. If you&#8217;ve got storage, C++ has about 12 names for it. Don&#8217;t even get me started on <code>Array</code>.</p>
<p>It&#8217;s natural, then, for DOM to just make up it&#8217;s own types so long as its raison d&#8217;être is to front for C++ and not to be a standard library for JS. Not because it&#8217;s malicious, but because that&#8217;s just what one <em>does</em> in C++. Can&#8217;t count on a particular platform/endianness/compiler/stdlib? Macro that baby into submission. <a href="http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/platform/">WTF</a>, indeed.</p>
<p>This is the same dynamic that gives rise to the tussle over <a href="http://infrequently.org/2011/10/real-constructors-webidl-last-call/">constructable constructors</a>. To recap, there is no way in JS to create a function which cannot have <code>new</code> on the left-hand-side. Yes, that might return something other than an instance of the function-object on the right-hand side. It might even throw an exception or do something entirely non-sensical, but because <code>function</code> is a JavaScript concept and because all JS classes are <em>just functions</em>, the idea of an unconstructable constructor is entirely alien. It&#8217;s not that you <em>shouldn&#8217;t</em> do it&#8230;the moment to have an opinion about that particular question never arises in JS. That&#8217;s not true if you&#8217;re using magic to front for a C/C++ object graph, though. You <em>can</em> have that moment of introspection, and you can choose to say &#8220;no, JS is wrong&#8221;. And they do, <a href="http://lists.w3.org/Archives/Public/public-script-coord/2011JulSep/thread.html#msg114">over and over</a>.</p>
<p>What we&#8217;re witnessing here isn&#8217;t &#8220;right&#8221; or &#8220;wrong&#8221;-ness. It&#8217;s entirely conflicting world views that wind up in tension because from the perspective of some implementations and all spec authors, the world looks like this:</p>
<p><img src="http://infrequently.org/wp-content/uploads/2012/04/today_small.png" alt="" title="The layers of today&#039;s platform." width="404" height="274" class="aligncenter size-full wp-image-1821"/></p>
<p>Not to go all Jeff Foxworthy on you, but if this looks reasonable to you, <em>you might be a browser developer</em>. In this worldview, JS is just a growth protruding from the side of an otherwise healthy platform. But that&#8217;s not how webdevs think of it. True or not, this is the mental model of someone scripting the browser:</p>
<p><img src="http://infrequently.org/wp-content/uploads/2012/04/a_choice_cut_of_well_marbled_platform.png" alt="" title="The Well-Marbled Platform" width="404" height="275" class="aligncenter size-full wp-image-1824" /></p>
<p>The parser, DOM, and rendering system are browser-provided, but they&#8217;re just JS libraries in some sense. With <code>&lt;canvas&gt;</code>&#8216;s 2D and 3D contexts, we&#8217;re even punching all the way up to the rendering stack with JS, and it gets ever-more awkward the more our implementations look like the first diagram and not the second.</p>
<p>To get from parser to DOM in the layered world, you have to describe your objects <em>as JS objects</em>. This is the disconnect. Today&#8217;s spec hackers don&#8217;t think of their task as the work of describing the imperative bits of the platform in the platform&#8217;s imperative language. Instead, their mental model (when it includes JS at all) pushes it to the side as a mere consumer in an ecosystem that it is not a coherent part of. No wonder they&#8217;re unwilling to deploy the magic they hold dear to help get to better platform layering; it&#8217;s just not something that would ever occur to them.</p>
<p>Luckily, at least on the implementation side, this is changing. Mozilla&#8217;s work on <a href="https://github.com/andreasgal/dom.js">dom.js</a> is but one of <a href="https://github.com/arv/JS-DOM-Test">several</a> projects looking to move the source of truth for the rendering system out of the C++ heap and into the JS heap. Practice is moving on. It&#8217;s time for us to get our ritual lined up with the new reality.</p>
<p>Which brings me too David Flanagan who last fall <a href="https://twitter.com/#!/__DavidFlanagan/status/109415801542557696">asked to read my manifesto on how the platform should be structured</a>. Here it is, then:</p>
<blockquote><p>
The network is our bottleneck and markup is our lingua-franca. To deny these facts is to design for failure. Because the network is our bottleneck, there is incredible power in growing the platform to cover our common use cases. To the extent possible, we should attempt to grow the platform through markup first, since markup provides the most value to the largest set of people and provides a coherent way to expose APIs via DOM.</p>
<p>Markup begets JS objects via a parser. DOM, therefore, is merely the largest built-in JS library.</p>
<p>Any place where you cannot draw a line from browser-provided behavior from a tag to the JS API which describes it is magical. The job of Web API designers is first to introduce new power through markup and second to banish magic, replacing it with understanding. There may continue to be things which exist outside of our understanding, but that is a challenge to be met by cataloging and describing them in our language, not an excuse for why we cannot or should not.
</p></blockquote>
<p>The ground below our feet is moving and alignment throughout the platform, while not inevitable, is clearly desirable and absolutely doable in a portable and interoperable way. Time, then, to start making Chapter 8 excuses in the service of being <em>more</em> idiomatic and <em>better</em> layered. Not less and worse.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/04/one-for-dave-and-david/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Bedrock</title>
		<link>http://infrequently.org/2012/04/bedrock/</link>
		<comments>http://infrequently.org/2012/04/bedrock/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 05:41:28 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[dhtml]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1789</guid>
		<description><![CDATA[Jetlag has me in its throes which is as good an excuse as any to share what has been keeping me up many nights over the past couple of years; a theory of the web as a platform. I had a chance last week to share some of my thinking here to an unlikely audience [...]]]></description>
				<content:encoded><![CDATA[<p>Jetlag has me in its throes which is as good an excuse as any to share what has been keeping me up many nights over the past couple of years; a theory of the web as a platform.</p>
<p>I had a chance last week to share some of my thinking here to an unlikely audience at <a href="http://www.eclipsecon.org/2012/keynotes">EclipseCon</a>, a wonderful experience for which my thanks go to Mike Milinkovich and Ian Skerrett for being crazy enough to invite a &#8220;web guy&#8221; to give a talk.</p>
<p>One of the points I tried (and perhaps failed) to make in <a href="http://infrequently.org/12/eclipsecon/#1">the talk</a> was that in every platform that&#8217;s truly a <em>platform</em> it&#8217;s important to have a stable conceptual model of what&#8217;s &#8220;down there&#8221;. For Java that&#8217;s not the language, it&#8217;s the JVM. For the web&#8230;well&#8230;um. Yes, it bottoms out at C/C++, but that&#8217;s mostly observable through spooky action at a distance. The expressive capacity of C/C++ show up as limitations and mismatches in web specs all the time, but the essential semantics &#8212; C/C++ is just words in memory that you can do whatever you please with &#8212; are safely hidden away behind APIs and declarative forms that are unfailingly high-level. Until they aren&#8217;t. And you can forget about composition most of the time.</p>
<p>For a flavor of this, I always turn back to <a href="http://blog.j15r.com/">Joel Webber&#8217;s</a> question to me several years ago: why can&#8217;t I over-ride the rendering of a border around an HTML element?</p>
<p>It&#8217;s a fair question and one I wrote off too quickly the first time he posed it. We have <code>&lt;canvas&gt;</code> which lets us draw lines however we like, so why can&#8217;t we override the path painting for borders? Why isn&#8217;t it just a method you implement like in Flex or Silverlight?</p>
<p>Put another way: there are some low level APIs in the web that <em>suggest</em> that such power should be in the hands of us mortals. When using a low-level thing, you pay-as-you-go since lower-level things need more code (latency and complexity)&#8230;but that&#8217;s a choice. Today&#8217;s web is often mysteriously devoid of the sort of sane layering, <em>forcing</em> you to re-build parallel systems to what&#8217;s already in the browser to get a job done. You can&#8217;t just subclass the right thing or plug into the right lifecycle method most of the time. Want a <code>&lt;canvas&gt;</code>? Fine. There you go. Want a <code>&lt;span&gt;</code>? Hot <code>&lt;span&gt;</code>s coming up! But don&#8217;t go getting any big ideas about using the drawing APIs from <code>&lt;canvas&gt;</code> to render your <code>&lt;span&gt;</code>. Both are magic in their own right and for no reason other than that&#8217;s the way it has always been.</p>
<p>The craziest part in all of this is that JavaScript <em>does</em> exist in the web so you can strictly speaking do whatever you want. Goodness knows that when the platform fails us today, we&#8217;re all-too-willing to just throw JS at it. It&#8217;s crazy, in this context then, that spec authors seem to be trying to uphold a golden principle: JavaScript <em>doesn&#8217;t</em> exist. Writing it out of the story allows you to just claim that your bit of the system is magic and that it doesn&#8217;t need an exposed lifecycle and plug-in architecture. New things can just be bolted onto the magic, no layering required. It&#8217;s magical turtles all the way down.</p>
<p>You can see why people who think in terms of VM&#8217;s and machine words might find this a bit <em>ahem</em> limiting.</p>
<p>But how much should we &#8220;web people&#8221; care about what they think? After all, &#8220;real programmers&#8221; have been predicting the imminent death of this toy browser thing for so long that I&#8217;m forgetting exactly when the hate took its various turns through the 7 stages; &#8220;Applets will save us from this insanity!&#8221;&#8230;&#8221;Ajax is a hack&#8221;&#8230;&#8221;just put a compiler in front of it and treat it as the dumbest assembler ever&#8221; (which is at least acceptance, of a sort). The web continues to succeed in spite of all of of this. So why bother with the gnashing of teeth?</p>
<p>Thanks to <a href="http://httparchive.org/trends.php">Steve Souders, I have an answer</a>: every year we&#8217;re throwing more and more JS on top of the web, dooming our best intended semantic thoughts to suffocation in the Turing tar pit. Inexorably, and until we find a way to send less code down the wire, us is them, and more so every day.</p>
<p><img style="height: 300px; width: 450px;" src="http://chart.apis.google.com/chart?chd=t:-1|12,11,12,12,12,12,12,12,12,12,13,13,13,13,13,14,14,13,14,14,14,14,14,13,14,14,14,14,14,14,14,14|-1|113,113,115,115,116,117,117,119,121,123,125,125,126,128,131,135,139,137,140,144,147,148,152,155,161,167,172,170,173,175,179,180&amp;chxl=0:|+%7C11%2F30%7C+%7C+%7C1%2F21%7C+%7C+%7C2%2F26%7C+%7C+%7C4%2F15%7C+%7C+%7C6%2F1%7C+%7C+%7C7%2F15%7C+%7C+%7C9%2F1%7C+%7C+%7C10%2F15%7C+%7C+%7C12%2F1%7C+%7C+%7C1%2F15%7C+%7C+%7C3%2F1&amp;chxt=x,y,r&amp;chs=450x300&amp;cht=lxy&amp;chco=E63C0B,982807&amp;chm=N,E63C0B,0,1::3,12,,h::8|N**kB,982807,1,1::3,12,,h::8&amp;chds=9,99,0,30,9,99,100,200&amp;chts=982807,24&amp;chtt=JS+Transfer+Size+%26+JS+Requests&amp;chma=5,5,5,25&amp;chls=1,6,3|1&amp;chxr=1,100,200,20|2,0,30,10&amp;chxs=1,982807,11.5,-0.5,lt,982807,982807|2,E63C0B,11.5,-0.5,lt,E63C0B,E63C0B&amp;chxtc=0,4|1,4&amp;chxp=0&amp;chdl=JS+Requests|JS+Transfer+Size+(kB)&amp;chdlp=bv|r"/></p>
<p>Let that picture sink in: at 180KB of JS on average, script isn&#8217;t some helper that gives meaning to pages in the breech, it <em>is</em> the meaning of the page. Dress it up all you like, but that&#8217;s where this is going.</p>
<p>Don&#8217;t think 180KB of JS is a lot? Remember, that&#8217;s <em>transfer size</em> which accounts for gzipping, not total JS size. Oy. And in most cases that&#8217;s more than 3x the size of the HTML being served (both for the page and for whatever iframes it embeds). And that&#8217;s not all; it&#8217;s worse for many sites which should know better. Check out those loading &#8220;filmstrip&#8221; views for <a href="http://httparchive.org/viewsite.php?pageid=905867">gawker</a>, <a href="http://httparchive.org/viewsite.php?pageid=903377">techcrunch</a>, and <a href="http://httparchive.org/viewsite.php?pageid=903208">the NYT</a>. You might be scrolling down, looking at the graphs, and thinking to yourself &#8220;looks like Flash is the big ticket item&#8230;&#8221;, and while that&#8217;s true in absolute terms, Flash isn&#8217;t what&#8217;s blocking page loads. <a href="http://httparchive.webpagetest.org/video/compare.php?tests=120315_8F_QAVB-r:1-c:0">JS is</a>.</p>
<p>And what for? What&#8217;s all that code doing, anyway?</p>
<p>It&#8217;s there for three reasons: first, to clean up the messes that browser vendors aren&#8217;t willing or able to clean up for themselves; second, to provide an API that becomes the new platform, and lastly to provide the app-specific stuff you are trying to get across. Only the last one is strictly valuable. You&#8217;re not including JQuery, Backbone, Prototype or Dojo into your pages <em>just</em> because you like the API (if you are, stop it). You&#8217;re doing it because the combination of API and even behavior across browsers makes them the <em>bedrock</em>. They are the new lisp of application construction; the common language upon which you and your small team can agree; just don&#8217;t expect anyone else to be able to pick up your variant without squinting hard.</p>
<p>This is as untenable as it is dangerous. It was this realization that set me and <a href="https://plus.google.com/111648463906387632236/posts">Dimitri Glazkov</a> off to build a team to do something about it more than a year and a half ago. The results are showing up now in the form of <a href="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html">Web Components and Shadow DOM</a>, <a href="http://www.youtube.com/watch?v=eRZ4pO0gVWw">Mutation Observers</a> as plumbing for <a href="http://code.google.com/p/mdv/">Model Driven View</a>, and a host of new CSS capabilities and JavaScript language expressiveness wins. If that sounds like a huge pile of seemingly un-related work, let me walk back to one of the motivating questions and then I&#8217;ll fast forward to the approach:</p>
<blockquote><p>What would it mean to be able to subclass an HTML Element?</p></blockquote>
<p>We observed that most of what the current libraries and frameworks are doing is just trying to create their own &#8220;widgets&#8221; and that most of these new UI controls had a semantic they&#8217;d like to describe in a pretty high-level way, an implementation for drawing the current state, and the need to parent other widgets or live in a hierarchy of widgets.</p>
<p>Heeeeeyyyyyy&#8230;.wait a minute&#8230;that sounds a lot like what HTML does! And you even have HTML controls which generate extra elements for visual styling but which you can&#8217;t access from script. This, BTW, is what you want when building your own controls. Think the bullets of list items or the sliders generated by <code>&lt;input type="range"&gt;</code>. There are even these handy (<a href="http://infrequently.org/2011/10/real-constructors-webidl-last-call/">non-constructable!?!</a>) constructors for the superclasses in JS already.</p>
<p>So what would you need access to in order to plug into that existing system? And how should it be described? This, by the way, is the danger zone. Right about this point in the logical chain most folks tend to fall back to what they know best: C++ hacker? Give &#8216;em a crappy C++-inspired high-level-ish JS API that will make the people yelling loudest stop beating you up. Declarative guy? Force everyone to describe their components as separate documents and&#8230;yeah. XUL. You get the idea. JavaScript person? Demand the lowest level API and as much unwarranted power as possible and pretend you don&#8217;t need the browser. JS libraries are the &#8220;fuck it, we&#8217;ll do it live!&#8221; of the web.</p>
<p>None of these are satisfying. Certainly not if what we want is a platform of the sort you might consider using &#8220;naked&#8221;. And if your &#8220;platform&#8221; always needs the same shims here and polyfills there, let me be candid: it ain&#8217;t no platform. It&#8217;s some timber and bolts out of which you can make a nice weekend DIY project of building a real platform.</p>
<p>So we need to do better.</p>
<p>What does better look like?</p>
<p>Better is layered. Better is being able to just replace what you need, to plug in your own bits to a whole that supports that instead of making you re-create everything above any layer you want to shim something into. This is why mutable root prototypes in JS and object mutability in general are such cherished and loathed properties of the web. It <em>is</em> great power. It&#8217;s just a pity we need it so often. Any plan for making things better that&#8217;s predicated on telling people &#8220;oh, just go pile more of your own parallel systems on top of a platform that already does 90% of what you need but which won&#8217;t open up the API for it&#8221; is <b><em>DOOMED</em></b>.</p>
<p>Thus began a archaeology project, one which has differed in scope and approach from most of the recently added web capabilities I can think of, not because it&#8217;s high-level or low-level, but because it is layered. New high-level capabilities are added, but instead of then poking a hole nearly all the way down to C++ when we want a low-level thing, the approach is to look at the high-level thing and say:</p>
<blockquote><p>How would we describe what it&#8217;s doing at the next level down in an API that we could expose?</p></blockquote>
<p>This is the reason low-level-only API proposals drive me <em>nuts</em>. New stuff in the platform tends to be driven by <em>scenarios</em>. You want to do a thing, that thing probably has some UI (probably browser provided), and might invoke something security sensitive. If you start designing at the lowest level, throwing a C++ API over the wall, you&#8217;ve turned off any opportunity or incentive to layer well. Just tell everyone to use the very fine JS API, after all. Why should anyone want more? (hint: graph above). Instead of opening doors, though, it&#8217;s mostly burden. Everything you have to do from script is expensive and slow and prone to all sorts of visual and accessibility problems by default. If the browser can provide common UI and interaction for the scenario, isn&#8217;t that better <em>most</em> of the time? Just imagine how much easier it would be to build an app if the initial cut at location information had been <code>&lt;input type="location"&gt;</code> instead of the <a href="http://dev.w3.org/geo/api/spec-source.html">Geolocation API we have now</a>. True, that input element would need lots of configuration flags and, eventually, a fine-grained API&#8230;if only there were a way to put an API onto an HTML element type&#8230;hrm&#8230;</p>
<p>In contrast, if we go declarative-only we get a lot of the web platform today. Fine at first but horrible to work with over time, prone to attracting API barnacles to fill perceived gaps, and never quite enough. The need for that API keeps coming back to haunt us. We&#8217;re gonna need both sides, markup and imperative, sooner or later. A framework for thinking about what that might look like seems in order. Our adventure in excavation with Web Components has largely been a success, not because we&#8217;re looking to &#8220;kernalize the browser&#8221; in JS &#8212; good or bad, that&#8217;s an idea with serious reality-hostile properties as soon as you add a network &#8212; but because when you force yourself to think about what&#8217;s <em>already</em> down there as an API designer, you start making connections, finding the bits that are latent in the platform and should be used to explain more of the high level things in terms of fewer, more powerful primitives at the next layer down. This isn&#8217;t a manifesto for writing the whole world in JS; it&#8217;s a reasonable and practical approach for how to succeed by starting high and working backwards from the 80% use-case to something that eventually has most of the flexibility and power that high-end users crave.</p>
<p>The concrete steps are:</p>
<ol>
<li>Introduce new platform capabilities with high-level, declarative forms. I.e., <em><b>invent new tags and attributes</b></em>. DOM gives you an API for free when you do it that way. Everyone&#8217;s a winner.
</li>
<li>When the thing you want feels like something that&#8217;s already &#8220;down there&#8221; somewhere, try to <em><b>explain</b></em> the bits that already exist in markup in terms of a lower-level JS or markup primitive. If you can&#8217;t do that or you think your new API has no connection to markup, go back to step 1 and start again.
</li>
<li>When it feels like you&#8217;re inventing new language primitives in DOM just to get around JS language limitations, <em><b>extend the language</b></em>, not the API
</li>
</ol>
<p>On the web, JavaScript <em>is</em> what&#8217;s down there. When it&#8217;s not, we&#8217;re doing it wrong. It has taken me a very long time to understand why the Java community puts such a high premium on the &#8220;pure java&#8221; label, and fundamentally what it says to others in the community is &#8220;I appealed to no gods and no magic in the construction of this, merely physics&#8221;. That&#8217;s a Good Thing (TM), and the sort of property that proper platforms should embody to the greatest extent possible.</p>
<p>And this brings me to my final point. C/C++ might be what&#8217;s &#8220;down there&#8221; for web browsers, but that&#8217;s also been true of Java. What separates the web and Java, however, is that the Java community sees their imperative abstraction that keeps them from having to think about memory correctness (the JVM) as an <em>asset</em> and many &#8220;web people&#8221; think of JS as pure liability. I argue that because of the &#8220;you&#8217;re gonna need both sides&#8221; dynamic, trying to write JS out of the picture is a dumb as it is doomed to fail. JavaScript <em>is</em> what&#8217;s &#8220;down there&#8221; for the web. The web has an imperative backbone and we&#8217;re never going to expose C/C++ ABI for it, which means JS is our imperative successor. The archaeological dig which is adding features like Web Components is providing more power to JS by the day and if we do this right and describe each bit as a layer with an API that the one above builds on, we can see pretty clearly how the logical regress of the &#8220;you must use JS to implement the whole browser&#8221; isn&#8217;t insane. JS itself is implemented as C/C++, so there&#8217;s always room for the mother tongue and of course many of the APIs that we interact with from JS must be C/C++; you can&#8217;t write it out of the story &#8212; but that doesn&#8217;t mean we need to design our APIs there or throw bad design decisions over the wall for someone else to clean up. It is high time we started designing low-level stuff for the web in idiomatic JS (not IDL), start describing the various plug-in points for what they are. We can provide power from our imperative abstraction <em>to</em> and <em>through</em> our declarative layer in ways that make both high and low-level users of the web platform more able to interoperate, build on each other&#8217;s work, and deliver better experiences at reasonable cost. That&#8217;s the difference between a minefield and a platform. Only one of them is reasonable to build on.</p>
<p>The trash truck just came by which means it&#8217;s 6AM here in almost-sunny London. WordPress is likewise telling me that I&#8217;m dangerously out of column-inches, so I guess I&#8217;ll see if I can&#8217;t get a last hour or two of sleep before the weekend is truly over. The arguments here may not be well presented, and they are subtle, but layering matters. We don&#8217;t have enough of it and when done well, it can be a powerful tool in ending the battle between imperative and declarative. I&#8217;ll make the case some other time for why custom element names are a good idea, but consider it in the layered context: if I could subclass <code>HTMLElement</code> from JavaScript in the natural way, why can&#8217;t I just put a new tag name in the map the parser is using to create instances of all the other element types? Aside from the agreement about the names, what makes the built-in elements so special, anyway?</p>
<p>Cognitive dissonance, ahoy! You&#8217;re welcome ;-)</p>
<p><b>Note:</b> this post has evolved in the several days since its initial posting, thanks largely to feedback from <a href="https://plus.google.com/112108146349792378878/posts">Annie Sullivan</a> and <a href="http://souders.org/">Steve Souders</a>. But it&#8217;s not their fault. I promise.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/04/bedrock/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Misdirection</title>
		<link>http://infrequently.org/2012/02/misdirection/</link>
		<comments>http://infrequently.org/2012/02/misdirection/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 23:04:26 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1724</guid>
		<description><![CDATA[As the over-heated CSS vendor prefix debate rages, I can&#8217;t help but note the mounting pile of logical fallacies and downright poor reasoning being deployed. Some context is in order. Your Moment Of Zen The backdrop to this debate is that CSS is absolutely the worst, least productive part of the web platform. Apps teams [...]]]></description>
				<content:encoded><![CDATA[<p>As the over-heated CSS vendor prefix debate rages, I can&#8217;t help but note the mounting pile of logical fallacies and downright poor reasoning being deployed. Some context is in order.</p>
<h3>Your Moment Of Zen</h3>
<p>The backdrop to this debate is that CSS is <em>absolutely</em> the worst, least productive part of the web platform. Apps teams at Google are fond of citing the meme that &#8220;CSS is good for documents, but not for apps&#8221;. I push back on this, noting the myriad ways in which CSS is <em>abysmal</em> for documents. That isn&#8217;t to minimize the pain it causes when building apps, it&#8217;s just that the common wisdom is that CSS surely must be <em>fantastic</em> for <em>somebody else</em>. Once we find that person, I&#8217;ll be sure to let you know. In the mean time we should contemplate how very, very far behind the web platform is in making it delightful to build the sorts of things that are work-a-day in native environments.</p>
<p>But it&#8217;s worse than simply being under-powered: CSS has the weakest escape hatches to imperative code and demands the most world-view contortion to understand its various layout modes and their interactions. Imagining a more congruent system isn&#8217;t hard &#8212; there are many in the literature, might I humbly suggest that now might be a good time to read <a href="http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.101.4819">Badros &#038; Borning</a>? &#8212; and even CSS could be repaired were we able to iterate quickly enough. Things have been moving faster lately, but fast enough to catch up with the yawning gap in platform capabilities? We&#8217;ll come back to the speed/scale of change later.</p>
<p>For now, consider that the debate (as <a href="http://folktrash.com/css-vendor-prefixes/">captured by Nate Vaughn</a>) is about the <em>retrospective</em> implications of the few things that have already gotten better for some set of developers in <em>some</em> situations. That this sort of meaningful progress (corners, gradients, animations, transitions, flexing boxes, etc.) is rare makes the debate all the more bone-chilling to me. We finally got a few of the long list of things we&#8217;ve been needing for a decade or more, and now because the future is unevenly distributed, we&#8217;re about to blow up the process that enabled even that modicum of progress? How is it we&#8217;re extrapolating causality about engine usage from this unevenness, anyhow? None of this is obvious to me. The credible possibility of losing prefixes as a way to launch-and-iterate is mind-exploding when you realize that the salient competition isn&#8217;t other browsers, it&#8217;s <em>other platforms</em>. Either the proponents of squatting other vendor&#8217;s prefixes haven&#8217;t thought this through very hard or they&#8217;re bad strategists on behalf of the web as a platform&#8230;not to mention their own products. The analysis that we&#8217;re being asked to accept rests on an entire series of poor arguments. Lets start with the&#8230;</p>
<h3>Uncomfortable Assumptions</h3>
<p>In an <a href="http://www.alistapart.com/articles/the-vendor-prefix-predicament-alas-eric-meyer-interviews-tantek-celik/">interview out yesterday with Eric Meyer</a>, <a href="http://tantek.com/">Tantek Çelik of Mozilla</a> tried to present this debate as a question of barriers to the adoption of non-WebKit based browsers, specifically <a href="http://www.mozilla.org/en-US/mobile/">Firefox Mobile</a>. Opera has made a similar case. What they ommit is that the only platforms where they can credibly ship such browsers are Android and S60 (a dead end). That&#8217;s <a href="http://en.wikipedia.org/wiki/File:World-Wide-Smartphone-Market-Share.png">a large (and growing) chunk</a> of the world&#8217;s handsets &#8212; good news for me, as I now work on Chrome for Android here in London &#8212; but for whatever reason it appears that <a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=0&#038;qpcustomd=1">iOS users surf a whole lot more</a>.</p>
<p>Let that sink in: on the devices that are the source of most mobile web traffic today, it&#8217;s not <em>even possible</em> to install a browser based on a different engine, at least not without a proxy architecture like the one used in the excellent <a href="https://market.android.com/details?id=com.opera.mini.android&#038;hl=en">Opera Mini</a> or <a href="http://amazonsilk.wordpress.com/">Amazon&#8217;s Silk</a>. iOS and Windows Phone are both locked-down platforms that come with only one choice of engine (if not browser shell). When folks from the vendors who want to appropriate others&#8217; prefixes talk about &#8220;not being able to compete&#8221;, remember that competition <em>isn&#8217;t even an option</em> for the most active users of mobile browsers. And it&#8217;s prefixes that are keeping us down? We must go deeper.</p>
<p>The tension comes into focus when we talk in terms of <b>conversion</b>, <b>retention</b>, and <b>attrition</b>. Conversions are users who, if able, <em>switch</em> to a new product from an old one. Retention is a measure of how many of those users <em>continue to use</em> the product after some period of time. Today (and since Windows first included a browser), the <em>single largest factor</em> in the conversion of users to new browsers is <em>distribution with an OS</em>. This is the entire rationale behind the <a href="http://arstechnica.com/microsoft/news/2010/02/microsofts-eu-browser-ballot-approved-arrives-march-1.ars">EU&#8217;s browser choice UI, mandated on first start of new Windows installs</a>. Attrition is the rate at which users stop choosing to use your product day after day, and for most desktop installed software, attrition is <em>shockingly</em> high after 3 to 6 months. The attrition rate is usually measured by cohorts over time; users who installed on the same day/week/month to measure what % of that group continue to use the product over increasingly long periods of time. The rate of decay falls, but the overall attrition invariably continues to rise. You might not get un-installed, but that doesn&#8217;t mean you&#8217;ll still be the go-to icon on the user&#8217;s home screen or desktop. Eventually every device is recycled, wiped, or left for history in a drafty warehouse and along with it, your software. A key factor in getting attrition under control for Chrome has been evangelism to improve site compatibility, e.g. &#8220;I&#8217;m not using your browser because my bank website doesn&#8217;t work with it&#8221;. That argument &#8212; that site compatibility is key to ensuring a competitive landscape for what otherwise are substitutes &#8212; puts the entire thing in some perspective. Attrition isn&#8217;t the same thing as conversion, and conversion is driven primarily by integrations and advertising. Implicit in the arguments by Tantek and others is a sub-argument of the form:</p>
<blockquote><p>Our product would have measurably more users if sites were more compatible.</p></blockquote>
<p>Thanks to what we know about what drives conversions, in the short run this is simply false. Long term, what invariably gives you more users is <em>starting with more users</em>. The set of things that are most effective at convincing users to swap browsers, even for a day, include: advertising, word-of-mouth, a superior product, distribution/bundling, and developer advocacy. Depressingly, only one of those involves <em>actually being a better product</em>, and the prerequisite for all of them is the ability to switch (thanks, Android team!). There&#8217;s a similar dynamic at work when doing advocacy to web developers: if you&#8217;re nowhere in their browser stats, they&#8217;re adding support for a standard or worse a second prefix in order to do service to a cause, not because it&#8217;s <em>measurably good for them</em>. Clearly, that&#8217;s going to be somewhat less effective. Where, then, is the multi-million dollar advertising campaign for Fennec? The carrier and OEM rev-share deals for bundling on new Android phones? Hmm. To hear Tantek et. al. tell it, non-WebKit-based browsers would be prevalent on mobile if only it weren&#8217;t for those damned browser prefixes causing users of other browsers to receive different experiences! Also, those kids and that damned dog.</p>
<p>Over the long haul compatibility can have a dramatic effect on the rate of attrition by changing the slope of the curve &#8212; which, remember, is a rate with decay and not a single % &#8212; but it begs the next uncomfortable question: what do we mean by &#8220;compatibility&#8221; here? What sorts of incompatibility <em>cause</em> attrition? Is it content that looks <em>slightly worse</em> but still essentially works (think grey PNG backgrounds on IE6) or does it simply turn you away, not allow you to play in any way, and generally fails (think the ActiveX dependencies of yore)?</p>
<h3>Inaccessible or Ugly?</h3>
<p>Eric was good enough to call out what I view as a key point in this debate: what sort of &#8220;broken&#8221; are we talking about? Tantek responded with a link to side-by-side screenshots of various properties rendered on <a href="http://people.mozilla.com/~atrain/mobile/Evangelism/chrome-compare/chrome-compare.html">Chrome for Android&#8217;s Beta and current Fennec</a>. In some of these cases we may be looking at Fennec bugs. <a href="http://wordpress.com">WordPress.com</a> serves the same content to Fennec which seems to bork what <code>float: left;</code> means. That, or some media query is preventing the main blocks from being floated; it&#8217;s hard to tell which from a quick <code>view-source:</code>. For the versions of google.* included in the list, the front end is simply serving the desktop version to Fennec which makes the wonky button rendering even stranger. Is there room to improve what gets sent to Fennec? You bet, but that&#8217;s not what&#8217;s being argued in the main. Ask yourself this: is what you see on that page worth destroying the prefix system for? &#8216;Cause that&#8217;s what the advocates of prefix-squatting would have you believe. In effect, they&#8217;re suggesting that <em>nothing</em> will cause developers to test on non-pervasive engines, a deeply fascinating assertion. Even if we accept it, it doesn&#8217;t point clearly to a single tactic to resolve the tension. It certainly doesn&#8217;t argue most strongly for prefix-squatting.</p>
<p>An important point Eric failed to follow up on was Tantek&#8217;s assertion that Mozilla will be cloaking user-agent strings. Does he imagine that the only thing that might be cause someone to send different content is CSS support? API support for things like touch events differs, the performance characteristics of device classes and browsers vary wildly, and application developers are keen to deliver known-good, focused experiences. The <a href="http://code.google.com/mobile/articles/webapp_fixed_ui.html">endless saga of <code>position: fixed;</code> as plumbed by Google teams</a> and others is a story of competing constraints: browser vendors optimize for content, content fights back. Repeat. What does Mozilla imagine is going to happen here? Maintained content will react to the browser usage of end-users (and as we&#8217;ve covered, compat != conversions). Unmaintained content, well, that&#8217;s what fallback is all about. And bad things deserve to lose. Assuming that your browser is 100% compatible with developer expectations and testing if you only switch the UA and implement a few prefixes is NPAPI-level crazy all over again, and it&#8217;s entirely avoidable. Tantek and Brendan, of all people, should be able to reason that far. I guess they&#8217;ll find out soon enough &#8212; although we will have all been made poorer for it.</p>
<p>Now, what about the related argument that Mozilla &#038; Co. are only going to be doing this for properties which are &#8220;stable&#8221; (nevermind their actual <a href="http://www.w3.org/Style/CSS/current-work">standardization status</a>)? The argument says that because something hasn&#8217;t changed in another vendor&#8217;s prefixed version in a while, it must be safe to squat on. Not only is this (again) incredibly short-sighted, it says that instead of forcing a standard over the line and clobbering both developers and other vendors with the dreaded label of &#8220;proprietary&#8221; (the usual and effective tactic in this situation), they&#8217;re instead willing to <em>claim ownership and therefore blame</em> for the spread of this soon-to-be-proprietary stuff, all the while punting on having an independent opinion about how the features should be structured and giving up on the standards process&#8230;and all for what?</p>
<h3>Product vs. Platform</h3>
<p>Perhaps there wasn&#8217;t space in Tantek&#8217;s interview with Eric, but both of them chose not to be introspective about the causes of WebKits use in so many mobile browsers, with Tantek merely flagging the use of a single engine by multiple products as &#8220;a warning sign.&#8221; But a warning of what, exactly? Eric didn&#8217;t challenge him on this point, but I sorely wish he had. Why did Safari, the Android Browser, Chrome, Silk, Black Berry, and many others all pick WebKit as the basis for their mobile browsers?</p>
<p>WebKit <em>isn&#8217;t a browser</em>. It&#8217;s just not. To make a browser <em>based</em> on WebKit, one might bring along <em>at least</em> the following bits of infrastructure which WebKit treats as bits to be plugged in:</p>
<ul>
<li>Networking</li>
<li>Caches of some sort</li>
<li>Graphics rendering</li>
<li>A build system</li>
<li>POSIX or other platform plumbing</li>
</ul>
<p>And that&#8217;s a <em>minimum</em>. Competitive ports tend to include WebSQL, LocalStorage, and Indexed DB back-ends, video codecs, 3D infrastructure (deeply non-trivial), perhaps an alternative JavaScript engine (V8 or other), and alternative/additional image decoders (e.g., <a href="http://code.google.com/speed/webp/">WebP</a>). All of that is in addition to needing to create your own UI for bookmarking, navigation, etc. WebKit is an <em>engine</em>, not a fully-functioning vehicle. Therein may lay some of the difference in the relative success of the WebKit and Gecko on mobile to date. Want to build a Gecko-based browser? Great, first clone <a href="https://wiki.mozilla.org/Mobile/Build/Fennec#Install_build_dependencies_.28non-Maemo.29">the <em>entire Firefox codebase</em> from Mercurial</a>, then layer your stuff on top/around. Oh, wait, things might not cleanly be factored to allow you to plug in your own X, Y, or Z? Your builds take forever? Welcome to life in the Mozilla universe where your product is always second fiddle to Firefox. Now, that&#8217;s not by way of criticism, mind you. <em>It is entirely reasonable</em> for a product like Firefox not to pay coordination costs with other vendors/users of their code. God knows the overhead over here in WebKit land of trying to keep the menagerie of ports building against all changes is downright daunting. Mozilla (the organization) has made choices that prioritized the success of their <em>product</em> (Firefox) over their <em>codebase</em> (Gecko). WebKit was structured as platform only (no product), both forcing enormous costs onto every port while also freeing them from swimming upstream against a single product&#8217;s imperatives in the codebase.</p>
<p>What we&#8217;re witnessing isn&#8217;t open vs. closed, it&#8217;s differences in initial cost of adoption. In JS terms, it&#8217;s jQuery (focused core, plugins for everything else) vs. Sencha or Dojo (kitchen sink). Entirely different target users, and both will find their place. Nobody should be shocked to see smaller, more focused bits of code with good plugin characteristics spreading as the basis for new projects. The Mozilla Foundation wants to help prevent monoculture? In addition to making the Firefox product a success, there are concrete engineering things they can do to make Gecko more attractive to the next embedder, Firefox-branded or not. I haven&#8217;t heard of progress or prioritization along those lines, but I&#8217;m out of the loop. Perhaps such an effort is underway, if so, I applaud it. Whatever the future for Gecko, Product success isn&#8217;t related to platform success as a first approximation. Having a good, portable, pluggable core increases the odds of success in evolutionary terms, but it&#8217;s absolutely not determinant; see MSIE.</p>
<p>Speaking of IE&#8230;I respect those guys a lot, but the logical leap they&#8217;re asking us to swallow is that <em>the reason people return Windows Mobile phones is that some CSS doesn&#8217;t work</em>. That&#8217;s what attrition means on a platform where they&#8217;re the only native runtime. Data would change my mind, but it&#8217;s a hell of a lot to accept without proof.</p>
<h3>The Time Component</h3>
<p>Lets take a step back and consider Tantek&#8217;s claim that Mozilla has gotten very little traction in evangelizing multi-prefix or prefix-free development for the past year: Firefox for Android has been available since Oct. 2010 and stable for just 6 months. Opera Mobile on Android has been stable for just over a year. IE 9 (the only IE for mobile you could ever seriously consider not serving fallback experiences to) only appeared with Windows Phone 7.5 (aka &#8220;Mango&#8221;), shipped to users an <em>entire</em> 6 months ago.</p>
<p>And we expect webdevs to have updated all their (maintained) content? Never mind the tenuous correlation between the sorts of soft incompatibilities we&#8217;re seeing at the hands of CSS and user attrition; the argument that even this lesser form of harm hasn&#8217;t been blunted by evangelism appears suspect. Taking the incompatibilities seriously, I can quickly think of several other measures which are preferable to destroying the positive incentives towards standardization the prefix system creates (from least to most drastic):</p>
<ul>
<li>Continued evangelism to web developers with particular focus on major sites</li>
<li>Political pressure on browser vendors to start dropping prefixes (i.e., we&#8217;d all be <em>equally</em> disadvantaged until users pick up the standard version)</li>
<li>UA spoofing <em>without</em> prefix squatting</li>
<li>Blacklists to trigger alternative identity (UA/prefixes) on a subset of sites</li>
</ul>
<p>All of these are less blow-up-the-world than what MSFT, Mozilla, and Opera are proposing. It&#8217;s not even an exhaustive list. I&#8217;m sure you can think of more. Why these have either been not considered or dismissed remains a mystery.</p>
<h3>It&#8217;s More Complicated Than That</h3>
<p>In all of this, we&#8217;re faced with an existential question: what right do web developers have to shoot themselves in the foot? Is there a limit to that right? What sort of damage do we allow when some aspect of the system fails or falls out of kilter for some period of time? It&#8217;s a question with interesting parallels in other walks of life (for a flavor, substitute &#8220;web developers&#8221; with &#8220;banks&#8221;).</p>
<p>Can we show active harm to other browsers from the use of prefixes? The data is at best unclear. Arguing that any harm rises to a level that would justifies destroying the prefixes system entirely is rash. I argued many of the reasons for this in my <a href="http://infrequently.org/2011/11/vendor-prefixes-are-a-rousing-success/">last post</a>, but lets assume in our mental model that developers respond to incentives in <em>some</em> measure. If, concurrently with achieving as-yet un-managed distribution, Mozilla et. al. implement others&#8217; prefixes, what should we expect developers to do in response? After all, they will have reduced whatever tension might have been created by content that &#8220;looked wonky&#8221; and, where standards exist, will have reduced the incentive to switch to the standard version.</p>
<p>Now lets play the model one more turn of the wheel forward too: assume that Chrome or Safari (or both!) act in good faith and contemplate removing the <code>-webkit-*</code> prefix support for standardized features at a quick clip&#8230;and Mozilla doesn&#8217;t. You see how this quickly leads to a Mexican standoff: web developers won&#8217;t stop using prefixed versions because those are the way you get 100% support (thanks to Mozilla&#8217;s support for them); vendors won&#8217;t un-prefix things because <em>others</em> who squat their prefixes will then have a compatibility advantage; and nobody will be keen to add new things behind prefixes because they can no longer be assumed to be experiments that can change. Lose, lose, lose.</p>
<p>Some on the other side of the debate are keen to cite game theory as a support for their course of action, but the only conclusion I can draw is that their analysis must be predicated on a set of user and developer motivations that are entirely unlike the observable world we inhabit.</p>
<h3>A Call To Reason, Not Arms</h3>
<p>Based on a better understanding of the landscape, what should the various parties do to make the world better for themselves now and in the long run and for the web as a platform?</p>
<ul>
<li><b>Web Devs</b>: first, do no harm; test in multiple runtimes, pointedly including a &#8220;fallback&#8221;. Then enhance with prefixes. Do not apologize for giving some (or even many) of your users a better experience. That, after all, is your <em>job</em>. But know this: prefixed properties are not supported, <em>will</em> go away, and when something you didn&#8217;t test the fallback for falls over, it&#8217;s <em>your</em> fault.</li>
<li><b>Browser Vendors</b>: invest in advocacy and distribution enhancing moves for your product before threatening to blow up effective standards policies. If you&#8217;re going to implement a prefixed version, please have a different opinion or push to ram a standard through to Recommendation ASAP. Incompatible right-hand-sides help developers understand that things are still evolving. <em>DO NOT</em> squat on prefixes. It&#8217;s both relative ineffective and will make developer&#8217;s lives harder when they want to <em>legitimately</em> move to standard or support your prefixes.</li>
<li><b>Vendor CSS WG Reps</b>: get it through your heads, you&#8217;re <em>behind</em>. It&#8217;s not quaint and it&#8217;s not excusable. The platform needs more powerful CSS features, and stat. It&#8217;s long past time to start stealing good ideas from the pre-processors. Appeals to a lack of manpower to implement must never block others and shouldn&#8217;t block standardization, so please stop making them. If you care about the platform&#8217;s success, let those who are able and willing to take risks do so.</li>
<li><b>The CSS WG (as a whole)</b>: get the lead out. It&#8217;s not exclusively the W3C&#8217;s fault that things are slow, but the current MTTR (Mean Time To Recommendation) is still glacial. It is unreasonable to expect vendors to drop prefix support immediately upon standardization, but the W3C has a role here to advocate for quick sunsetting. Daniel Glazman is, as ever, right on most of this, but more can be done to streamline the process post CR.</li>
<li><b>The WebKit Project</b>: Add build flags to allow WebKit-based products to enable/disable vendor prefix support independently.</li>
<li><b>Chrome/Safari/Other-prefix-supporting-browsers</b>: Sunset prefixes as soon as is practicable post-standardization. Similarly, don&#8217;t ship prefixed features you&#8217;re not willing to be on the hook for via your reps to the CSS WG. Disabling them may be painful, but it&#8217;s the only good-faith thing to do.</li>
</ul>
<h3>Endnotes</h3>
<p>I&#8217;ve left a lot out of this post, but it&#8217;s too long already. I do truly hope it&#8217;s the last I write on prefixes because, as I said up front, we have <em>much</em> bigger fish to fry. Stat. Prefixes <em>do</em> work, they&#8217;re essential to delivering a future platform that can compete, and yes, they should be torn down at the same pace they&#8217;re erected.</p>
<p>A few things that folks have asked about as tangents to this debate:</p>
<ul>
<li>It&#8217;s never a good thing for there to be homogeneity in the experimentation phase. The <em>explicit goal</em> of the prefixes system is to enable diversity of early opinion and fast coalescing around the best answer, thereby enabling the writing of a standard which is likely to need less revising and iteration. Diversity provides some value, the market tests the alternatives, and we deliver the most value we can over time through the <em>standard</em> version. It has always been thus, but prefixes make it less risky&#8230;assuming we don&#8217;t start stepping on everyone else&#8217;s toes.</li>
<li>If the reasoning behind prefixes is to set up and tear down large-scale experiments, iterate, and collect feedback then Lea&#8217;s <a href="http://leaverou.github.com/prefixfree/">-prefix-free</a> approach and PPK&#8217;s <a href="http://www.quirksmode.org/blog/archives/2012/02/alpha_and_beta.html"><code>-alpha-*</code>/<code>-beta-*</code></a> proposals are equally counter-productive and should be avoided at all costs. Making prefixes less painful to use reduces the natural incentives for migrating to a standard while blindly assuming the same right-hand for a future standard version as we have for <em>some</em> prefixed versions is plainly idiotic. What were they thinking?</li>
<li><code><a href="http://felipe.wordpress.com/2012/02/02/a-proposal-to-drop-browser-vendor-prefixes/">@-vendor-unlock</a></code> is only slightly smarter, but in every possible way inferior to <a href="http://lists.w3.org/Archives/Public/www-style/2011Mar/0478.html">CSS Mixins</a>. Would that the WG spent as much time on Mixins as they have on this prefix kerfuffle.</li>
<li>Yes, I was in Paris when the CSS WG F2F was happening. No, I wasn&#8217;t at the meetings. Duty (Chrome for Android) called.</li>
<li>If you&#8217;ve read this far, congrats. You may be the only one. I&#8217;ve been assured by CSS WG delegates that nobody cares what I think, which statistically seems to just be rounding down by a tiny bit. Fair enough.</li>
</ul>
<p><em><b>Update</b>: <a href="http://infrequently.org/2012/02/misdirection/comment-page-1/#comment-239566">Michael Mullany of Sencha adds epicly good, epicly long context about what causes developers to target UAs and what the incentives that&#8217;ll change their minds about supporting a given browser really are.</a></em></p>
<p><em>Thanks to <a href="http://fberriman.com/">Frances Berriman</a>, <a href="http://jakearchibald.com/">Jake Archibald</a>, <a href="http://gent.ilcore.com/">Tony Gentilcore</a>, and <a href="http://www.xanthir.com/blog/">Tab Atkins</a> for reviewing earlier versions of this post. Errors of fact and form are all mine, however. Updated occasionally for clarity and to remove typos.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2012/02/misdirection/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Vendor Prefixes Are A Rousing Success</title>
		<link>http://infrequently.org/2011/11/vendor-prefixes-are-a-rousing-success/</link>
		<comments>http://infrequently.org/2011/11/vendor-prefixes-are-a-rousing-success/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 14:36:27 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1715</guid>
		<description><![CDATA[tl;dr version: Henri Sivonen&#8217;s arguments against vendor prefixing for CSS properties focus on harm without considering value, which in turn has caused him to come to a non-sensical set of conclusions and recommendations. Progress is a process, and vendor prefixes have been critical in accelerating that process for CSS. For a while now I&#8217;ve been [...]]]></description>
				<content:encoded><![CDATA[<p><em>tl;dr version: Henri Sivonen&#8217;s arguments against vendor prefixing for CSS properties focus on harm without considering value, which in turn has caused him to come to a non-sensical set of conclusions and recommendations. Progress is a process, and vendor prefixes have been critical in accelerating that process for CSS.</em></p>
<p>For a while now I&#8217;ve been hearing the meme resurface from CSS standards folks and a few implementers that &#8220;vendor prefixes have failed&#8221;. I&#8217;d assumed this was either a (bad) joke or that it was one of those things that web developers would scoff at loudly enough to turn the meme recessive. I was wrong.</p>
<p>Henri Sivonen, Mozilla hacker extrordinare, <a href="http://hsivonen.iki.fi/vendor-prefixes/">has made the case directly and at length</a>. Daniel Glazman, co-chair of the CSS WG posted a <a href="http://www.glazman.org/weblog/dotclear/index.php?post/2011/11/16/CSS-vendor-prefixes-an-answer-to-Henri-Sivonen">point-by-point response.</a> If you have the patience, you should read both.</p>
<p>Lost in the debate between &#8220;browser people&#8221; and &#8220;spec people&#8221; is the the essential nature of what has happened with prefixes: they <em>worked</em>. From the perspective of a web developer, any first approximation of the history of vendor prefixes are <em>pure win</em>, even if only a fraction of the value that has been delivered behind them is attributable to prefixes un-blocking vendors from taking risks and shipping early.</p>
<p>Daniel&#8217;s rebuttal to Henri gets a lot of things right, but he gives in on an essential point; by agreeing with Henri that vendor prefixes are &#8220;hurting web authors&#8221; he wites off the benefits that they&#8217;ve delivered &#8212; namely the ability of vendors to get things out to devs in a provisional way that has good fallback and future-proofing properties and the ability for devs to build with/for the future in an opt-in, degradable way.</p>
<p>Rounded corners, gradients, animations, flex box, etc. are all design and experience enablers that developers have been able to take advantage of while waiting for the standards dust to settle, and thanks to W3C process, it takes a LONG time to to settle. Yes, that has some costs associated with it. Henri is very worried that browsers that aren&#8217;t keeping up quickly will be &#8220;left behind&#8221; by webdevs who use only one vendor&#8217;s prefix. But surely that&#8217;s a lesser harm than not getting new features and not having the ability to iterate. And it provides incentive for following browsers to try to make a standard happen. What&#8217;s not to love? More to the point, I just don&#8217;t believe that this is a serious problem in practice. What front-ender in 2011 doesn&#8217;t test on <em>at least</em> two browsers? Yes, yes, i&#8217;m sure such a retrograde creature exists, but they were going to be making non-portable content <em>regardless of prefixes</em>. Assuming you&#8217;re testing fallback <em>at all</em> (e.g., by testing on more than one browser), prefixes not appearing on some browser are just the fallback case. CSS FTW! Webdevs who don&#8217;t test on more than one browser&#8230;well, they&#8217;re the ones hanging the noose around the neck of their own apps. Vendor prefixes no more enable this stupidity than the existence of the <code>User-Agent</code> header. Compatibility is a joint responsibility and the best each side (browser, webdev) can hope of the other is some respect and some competence. Cherry picking egregious examples and claiming &#8220;it&#8217;s hurting the web&#8221; seems, at a minimum, premature.</p>
<p>And how did we think we&#8217;d get a good standard, anyway? By sitting in a room in a conference center more often and thinking about it harder? Waiting on a handfull of early adopters to try something out in a tech demo and never stress it in practice? That&#8217;s not a market test (see: XHTML2), it doesn&#8217;t expose developers to the opportunities and tradeoffs that come with a new feature, and doesn&#8217;t do anything to address the inevitable need to integrate feedback at <em>some</em> point.</p>
<p>Yes, we could go with Henri&#8217;s suggestion that the first person to ship wins by default, never iterate on any designs, and avoid any/all first-mover disadvantage situations, but who among the browser vendors is perfect? And what would the predictable consequences be? I can only assume that Henri thinks that we&#8217;ll end up in a situation where vendors coordinate with the CSS WG early to add new stuff, will design things more-or-less in the open, and will only ship features to stable (no flag) when they&#8217;re sure of their design. That could happen at the limit, but I doubt it. Instead, the already fraught process of adding new features to the platform will be attempted by even fewer engineers. Who wants the responsibility for having to be perfect lest you screw the web over entirely? Fuck that noise, I&#8217;m gonna go work on a new database back-end or tune something to go faster. Browsers are made by smart people who have a choice of things to be working on, and any time you see a new platform feature, it probably came about as the result of an engineer taking a risk. Many times the engineers in a position to take those risks don&#8217;t have a great sense for what good, idiomatic web platform features might be designed, so they&#8217;ll need to tweak/iterate based on feedback. And feedback is painfully hard to extract from webdevs unless you&#8217;ve made something available in a tangible way such that they can use it and discover the limitations.  Shipping things only to dev is perhaps a good idea for other aspects of the platform where we can&#8217;t count on CSS&#8217;s forgiving parsing behavior (the basis for prefixes). Syntax changes for JS and CSS seem like good examples. But for features that are primarily new CSS properties? Oy. Making the stakes even higher, reducing the ability to get feedback and iterate isn&#8217;t going to lead to a harmonious world of good, fast standards creation. It&#8217;s going to predictably reduce the amount of new awesome that shows up in the platform.</p>
<p>Prefixes are an enabler in allowing the <em>necessary</em> process of use, iteration, and consensus building to take place. Want fewer messes? There&#8217;s an easy way to achieve that: try less stuff, add fewer features, and make each one more risky to add. That&#8217;s Henri&#8217;s prescription, wether or not he knows it, and the predictable result is a lower rate of progress &#8212; advocating this sort of thing is <em>much</em> worse for the web and for developers than any of the harm that either Henri or Daniel perceive.</p>
<p>Which brings me to Henri&#8217;s undifferentiated view of harm. His post doesn&#8217;t acknowledge the good being done by prefixed implementations &#8212; I get the sense he doesn&#8217;t build apps with this stuff or it&#8217;d be obvious how valuable prefixed implementations are for work-a-day web app building &#8212; instead focusing on how various aspects of the process of prefixed competition can be negative. So what? Everything worth having costs <em>something</em>. Saying that things &#8220;hurt the web&#8221; or &#8220;hurt web developers&#8221; without talking in terms of <em>relative harm</em> is just throwing up a rhetorical smoke screen to hide behind. If you focus only on the costs but write the benefits out of the story of <em>course</em> the conclusion will be negative. In many cases, the costs that Henri points out are <em>correctly aligned</em> with getting to a better world: having to type things out many times sucks, creating demand among webdevs for there to be a single, standardized winner. Having multiple implementations in your engine sucks, creating demand from vendors to settle the question and get the standards-based solution out to users quickly. Those are good incentives, driven by prices that are low but add up over time in ways that encourage a good outcome:  a single standard implemented widely.</p>
<p>And as Sylvain Galineau pointed out, what looks like pure cost to one party might be huge value to another. I think there&#8217;s a lot of that going on here, and we shouldn&#8217;t let it go un-contextualized. The things that Henri sees as down-sides are the predictable, relatively minor, costs inherent in a process that allows us to make progress faster and distribute the benefits quickly, all while <em>minimizing</em> the harm. That he&#8217;s not paying the price for not having features available to build with doesn&#8217;t mean those opportunity costs aren&#8217;t real and aren&#8217;t being borne by webdevs every day. Being able to kill table and image based hacks for rounded corners is providing HUGE value, well ahead of the spec. Same for gradients, transitions, and all the rest. Calling prefixed implementations in the wild a bad thing needs to argue that the harm is greater than all of that value. I don&#8217;t think Henri could make that case, nor has he tried.</p>
<p>I think the thing that most shocks me about Henri&#8217;s point of view is that he&#8217;s arguing against a process when in fact the motivating examples (transforms, gradients) have been sub-optimal in <em>exactly</em> the better-than-before ways we might have hoped for! Gradients, for example, saw a lot of changes and browsers had different ideas about what the syntax should be. Yes, it&#8217;s harder to get a consistent result when you&#8217;re trying to triangulate multiple competing syntaxes, but we got to <em>use</em> this stuff, get our hands dirty, and get most of the benefits of the feature while the dust settled. Huzzah! This is <em>exactly</em>> the way a functioning market figures out what&#8217;s good! Prefixes help developers understand that stuff can and will change, and they clear the way for competition of ideas without burdening the eventual feature&#8217;s users with legacy bagage tied to a single identifier.</p>
<p>So what about the argument that there might be content that doesn&#8217;t (quickly?) adopt the non-prefixed version, or that vendors can&#8217;t remove their prefixed implementations because content depends on it?</p>
<p>To the first, I say: show me a world where 90+% of users have browsers support the standard feature and I&#8217;ll show you a world in which nobody (functionally) continues to include prefixes. That process is gated in part by the WG&#8217;s ability to agree to a spec, and here I think there&#8217;s real opportunity for the CSS WG to go faster. The glacial pace of CSS WG in getting things to a final, ratified spec is in part due to amazingly drawn-out W3C process, and in part a cultural decision on the part of the WG members to go slow. My view is that they should be questioning both of these and working to change them, not blaming prefixes for whatever messes are created in the interim.</p>
<p>As for removing prefixes, this is about vendors just doing it, and quickly. But the definition of &#8220;quickly&#8221; matters here. My view is that vendors should be given <em>at least</em> as long as it took to get a standard finalized from the introduction of their prefixed version for the removal process to be complete. So if Opera adds an amazing feature behind a <code>-o-</code> prefix in early 2012 and the standard is finalized in 2014, the deprecation and eventual removal should be expected to take 2 years (2016). This has the nice symmetry of incentives that punish the WG for going slow (want to kill prefix impls? get the standard done) while allowing the vendors who took the biggest risks to provide the softest landings for their users. And it doesn&#8217;t require that we simply go all-in on the first person&#8217;s design to ship. Yes, there will be mounting pressure to get <em>something</em> done, but that&#8217;s good too!</p>
<p>The standards process needs to lag implementations, which means that we need spaces for implementations to lead in. CSS vendor prefixes are one of the few shining examples of this working in practice. It&#8217;s short-term thinking in the extreme to either flag the costs associated with them as either justifying their removal or even suggesting that the costs are too high.</p>
<p>And webdevs, always be skeptical when someone working on an implementation or a spec tells you that something is &#8220;hurting the web&#8221; when your experience tells you otherwise. The process of progress needs more ways to effectively gauge webdev interest, collect feedback, and test ideas. Not fewer or narrower channels.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2011/11/vendor-prefixes-are-a-rousing-success/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Google &amp; the Future of JavaScript</title>
		<link>http://infrequently.org/2011/09/google-the-future-of-javascript/</link>
		<comments>http://infrequently.org/2011/09/google-the-future-of-javascript/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 00:36:54 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1657</guid>
		<description><![CDATA[Simply stated, Google is absolutely committed to making JavaScript better, and we're pushing hard to make it happen.]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s very little public information yet about Dart (nee, Dash), and as I&#8217;m not on Lars&#8217; team I can&#8217;t comment about it. More details will be forthcoming at the <a href="http://gotocon.com/aarhus-2011/presentation/Opening%20Keynote:%20Dart,%20a%20new%20programming%20language%20for%20structured%20web%20programming">GOTO session next month</a>. I&#8217;ll also be at GOTO, <a href="http://gotocon.com/aarhus-2011/presentation/Send%20Less,%20Do%20More,%20Go%20Faster:%20The%20Future%20of%20Front%20End%20Development">speaking on JavaScript and the state of the web platform</a>.</p>
<p>Making the rounds is an accidentally leaked early draft of notes from a meeting last year that discusses both Dart and JavaScript. I work on many web platform-related things at Google, including serving as a representative to TC39, the body that standardizes the JavaScript language. I wasn&#8217;t at the meetings having previously committed to <a href="http://2010.full-frontal.org/">presenting at FFJS</a>, but my views were represented by others and my name is on the document. As I said, though, it was a draft and doesn&#8217;t reflect either the reality of what has happened in the meantime or even the decisions that were taken as a result. And it certainly doesn’t reflect my personal views.</p>
<p>So what&#8217;s the deal with Google and JavaScript?</p>
<p>Simply stated, Google is absolutely committed to making JavaScript better, and we&#8217;re pushing hard to make it happen.</p>
<p>Erik Arvidsson, Mark Miller, Waldemar Horwat, Andreas Rossberg, Nebojša Ćirić, Mark Davis, Jungshik Shin and I attend TC39 meetings, work on implementations, and try to push JS forward in good faith. And boy, does it need a push.</p>
<p>Erik and I have specifically been working to focus the TC39 agenda away from syntax-free, semantics-only APIs (Object.defineProperty, anyone?) which might be good for tools, compilers, and frameworks but which are hard for day-to-day use.</p>
<p>Through <a href="http://code.google.com/p/traceur-compiler/">Traceur</a> and other efforts we&#8217;ve been socializing the idea that the one thing the committee can exclusively do &#8212; and should do more of &#8212; is to carve out syntax for commonly exercised semantics. Seemingly small things like the <a href="http://wiki.ecmascript.org/doku.php?id=harmony:classes"><code>class</code> keyword as sugar</a> for the constructor function pattern, or a <a href="http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax&#038;s=short+function">shorter syntax for functions</a> are big improvements, if only because it&#8217;s TC39 that&#8217;s making them. Syntax can end battles over common patterns and help you say what you mean, and JS is overdue for some of this. Larger but more subtle things, like agreement to use pragmas as a way to enable the process of progress in a compatible web, are even more exciting to me. Even proposals that haven&#8217;t made it through like <a href="http://wiki.ecmascript.org/doku.php?id=strawman:scoped_object_extensions">Scoped Object Extensions</a> and <a href="http://wiki.ecmascript.org/doku.php?id=strawman:deferred_functions">deferred functions</a> have been fought for by us because we desperately want JavaScript to get better. We&#8217;re big fans of much of the work coming out of Mozilla for the same reason &#8212; in particular Dave Hermann&#8217;s excellent <a href="http://wiki.ecmascript.org/doku.php?id=harmony:modules">modules proposal</a>. Together, these are going to do much to help give modern JS some &#8220;backbone&#8221; in the near term. I’m proud of what we’ve accomplished in TC39 over the last year, and while I hoped for more, the result is an ES.next that looks like it’ll embody many of the things I feel are currently missing. The day-to-day practice of writing JS is going to change dramatically for the better when ES.next arrives.</p>
<p>But it&#8217;s not the end &#8212; not by a long shot. Classes will give us a humane, interoperable inheritance syntax, but it leaves composition unaddressed by syntax. I&#8217;m hopeful that we bless traits in future versions, removing the use of inheritance in most cases. Similarly, I think we can find a way to repair &#8220;this&#8221; binding foot-guns with softly-bound &#8220;this&#8221;. Repairing the shared-prototypes issue, either through DOM or through something like Scoped Object Extensions, can and should be done. And once we have all of this, the stage will be set for a flexible, advanced type system that does not need to be all-or nothing and does not need to be hobbled by the ghost of C++/Java&#8217;s inflexible nominal-only types. That&#8217;s the dream, and we&#8217;re not shying away from it.</p>
<p>It&#8217;s hard to square this sort of wild enthusiasm for &#8220;raw&#8221; JavaScript with what&#8217;s in the leaked memo, and I can only beg for some amount of understanding. As committed and enthusiastic as I am about the prospects for JavaScript, others are just as enthused about Dart. Google is big, can do many things at once, and often isn&#8217;t of one mind. What we do agree on is that we&#8217;re trying to make things better the best we know how. Anyone who watches Google long enough should anticipate that we often have different ideas about what that means. For my part, then, consider me and my team to be committed JS partisans for as long as we think we can make a difference.</p>
<h3>Reality Check</h3>
<p>There are risks, of course. TC39 is long on seasoned language design skill and short on webdev experience, meaning that many things that Erik and I may take for granted as pressing problems need to be explained, sometimes to an incredulous audience. The flip side risk is that naïve solutions may have better alternatives that seasoned language hands can quickly spot and that simple answers have non-obvious risks or preclude movement in other important areas later. It&#8217;s good, then, that the committee is working well and is taking appeals to developer productivity seriously.</p>
<p>Whatever you might think about programming languages for the browser, let me assure you of one thing: your problem isn&#8217;t the language. Not really, anyway. We&#8217;ve made good progress in the last year repairing some of the seams between JS and DOM, and Cameron McCormack has helped us drive a new version of WebIDL that correctly explains DOM as a reasonable prototype chain. But it&#8217;s only the beginning. The DOM is in terrible shape, and not due to implementation differences. The malign neglect of IDL-addled designs, the ghosts of dead-end XML experiments, and endless cruft will plague any language that sidles up to it. Until we get a real <a href="http://wiki.whatwg.org/wiki/Component_Model">Component Model</a>, a better CSS OM, and some sort of a pragma for DOM that allows us to fix DOM&#8217;s abhorrent JS bindings, we&#8217;ll continue to be hostage to C++ APIs inartfully wired up to an incredibly dynamic language. And that’s to say nothing of the pressing need for <a href="http://code.google.com/p/experimental-css/">better CSS</a>, animations, and <a href="http://code.google.com/p/mdv/">a built-in data-binding/templating system</a>. When the platform doesn’t provide it, today, we get it from JavaScript. But that’s not where the solutions always belong.</p>
<p>Let me put it another way: when you find yourself thinking &#8220;man, JavaScript sucks,&#8221; remember that it&#8217;s only painful in large quantities. And why do you need so much of it? &#8216;Cause the DOM, CSS, and HTML standards are letting you down. Any language wired up to the browser today is subject to the same fate, and the insane reality that these things are specified under different roofs in processes that aren&#8217;t subject to the popular will of web developers. Python doesn’t have it’s DOM APIs decided by the W3C, they borrow the idiomatic <a href="http://docs.python.org/library/xml.etree.elementtree.html">ElementTree API</a> from within their own community. WebIDL is an artifact of a different time that has a tenuous relationship to idiomatic JavaScript, the CSS-OM barely exists, and DOM apologists are doing more harm than any of JavaScript&#8217;s warts ever have. We can fix these things, of course, and here at Google we&#8217;re trying – in good faith – to work in standards to make them better. But the bottom line is that the language isn’t the problem. I repeat: the language isn’t the problem, the platform is.</p>
<p>The only thing that&#8217;s going to replace the web as universal platform is the next version of the web. Those of us working on Chrome believe that to the core and feel a deep urge to make things better faster. We might not always agree on the &#8220;how,” but we all believe that we can’t do it alone.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2011/09/google-the-future-of-javascript/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Non-Admin Chrome Frame, Now Stable!</title>
		<link>http://infrequently.org/2011/08/non-admin-chrome-frame-now-stable/</link>
		<comments>http://infrequently.org/2011/08/non-admin-chrome-frame-now-stable/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 04:17:28 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1638</guid>
		<description><![CDATA[The title says it all: you can now put a link like this in your app and users will get the stable version of either admin or non-admin Chrome Frame, depending on what rights they have on their system: &#60;!--[if lt IE 9 ]&#62; &#60;p&#62;Your browser is &#60;em&#62;ancient!&#60;/em&#62; &#60;a href=&#34;http://microsoft.com/ie&#34;&#62;Upgrade&#60;/a&#62; or &#60;a href=&#34;http://www.google.com/chromeframe/?redirect=true&#34;&#62; install Google [...]]]></description>
				<content:encoded><![CDATA[<p>The title <a href="http://blog.chromium.org/2011/08/non-admin-chrome-frame-reaches-stable.html">says it all</a>: you can now put a link like this in your app and users will get the stable version of either admin or non-admin Chrome Frame, depending on what rights they have on their system:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if lt IE 9 ]&gt;
&lt;p&gt;Your browser is &lt;em&gt;ancient!&lt;/em&gt;
&lt;a href=&quot;http://microsoft.com/ie&quot;&gt;Upgrade&lt;/a&gt; or
&lt;a href=&quot;http://www.google.com/chromeframe/?redirect=true&quot;&gt;
   install Google Chrome Frame&lt;/a&gt; to experience this app.
&lt;/p&gt;
&lt; ![endif]--&gt;</pre></td></tr></table></div>

<p>The <code>redirect=true</code> ensures that once the the install completes, users are automatically redirected back to your site (slick, huh?) and the conditional comments keep the prompt from being shown to folks with modern browsers.</p>
<p>At the top of your document you&#8217;ll still need to add the <a href="http://www.chromium.org/developers/how-tos/chrome-frame-getting-started#TOC-Making-Your-Pages-Work-With-Google-">header or meta tag to your apps/pages</a> to opt-in to Chrome Frame rendering:</p>
<pre>
    <b>&lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;</b>
</pre>
<p>Couldn&#8217;t be easier, and if you&#8217;re using a starter kit like the excellent <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>, it&#8217;s already in there!</p>
<h3>Nearly forgot&#8230;</h3>
<p>So, why, you might ask, did it take this long from <a href="http://www.youtube.com/watch?v=3YkEUpJQP3o">showing user-mode at I/O</a> to get this to the the world?</p>
<p>Good, if convoluted question. The answer is long, complicated, and involves a harrowing-yet-seamless transition of hundreds of millions of Chrome installs to a new installer infrastructure, but I&#8217;ll skip to the punch line: <em>millions of users won&#8217;t even have to download Chrome Frame</em> to install it. Chrome Frame&#8217;s quick-enable mode is available on every system that has Chrome installed &#8212; even if Chrome isn&#8217;t being used as the default browser &#8212; which means that for many of your users installing Chrome Frame can be nearly instant. No download, no traditional install process. Just &#8220;activate&#8221;, &#8220;accept&#8221; and those users are on their way back to your site to experience the HTML5 goodness you&#8217;ve built.</p>
<p>If you&#8217;re contemplating adding a prompt to your site or app, know that you&#8217;re not alone either. As promised, GMail is asking all IE 6 and 7 users to upgrade or install Chrome Frame. A growing list of sites like <a href="http://chrome.angrybirds.com">Angry Birds</a> couldn&#8217;t have been built without assuming Chrome Frame as a solution to &#8220;the IE problem&#8221;.</p>
<p>Chrome Frame is all about turning HTML5 from a &#8220;someday&#8230;&#8221; prospect to a reality for your very next project, even if you&#8217;re deploying to users and organizations that can&#8217;t join us here in the future by adopting modern browsers. Only the trailing edge has been standing still, and now that we&#8217;re all free of it I can&#8217;t wait to see we build.</p>
<p>The web is about to get better a whole lot faster.</p>
<p><b>Update:</b> Erik Wright informs me that we don&#8217;t even need the <code>prefersystemlevel</code> now! Post updated to reflect this.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2011/08/non-admin-chrome-frame-now-stable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Half Lives</title>
		<link>http://infrequently.org/2011/03/half-lives/</link>
		<comments>http://infrequently.org/2011/03/half-lives/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 16:04:02 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://infrequently.org/?p=1616</guid>
		<description><![CDATA[I&#8217;m headed to Austin soon for spring break SxSWi, and this year I&#8217;m lucky and grateful to be representing Chrome on the always-packed browser panel (more usable Lanyrd talk page here). The context for this year&#8217;s panel is interesting to me &#8212; a couple of years into a renewed era of browser competition, users have [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m headed to Austin soon for <del>spring break</del> SxSWi, and this year I&#8217;m lucky and grateful to be <a href="http://schedule.sxsw.com/events/event_IAP7286">representing Chrome on the always-packed browser panel</a> (more usable <a href="http://lanyrd.com/">Lanyrd</a> talk page <a href="http://lanyrd.com/2011/sxsw/scrxm/">here</a>). The context for this year&#8217;s panel is interesting to me &#8212; a couple of years into a renewed era of browser competition, users have more choice but developers are still struggling with the same landscape, even as HTML5 starts to materialize as the platform of choice for <em>most</em> apps &#8212; even the ones wrapped up in native wrappers to jump the various app-store-form distribution hurdles.</p>
<p>It&#8217;s good to see <a href="http://ie6countdown.com/">MSFT belatedly trying to put IE6 out to pasture</a>, but what about IE 7? Or 8? Lets take stock of where we really are and where we&#8217;re likely to be in the next couple of years. First, remember that there&#8217;s no IE 9 for Windows XP &#8212; an OS that&#8217;s currently the most popular in the world &#8212; and no matter what happens with IE 6, IE 8 is the end of the upgrade road for XP. Unless you think half of the world&#8217;s computers will be replaced/upgraded in the next couple of years, it seems likely that IE 8 will be with us for the foreseeable future.</p>
<p>And what about the folks who <em>do</em> get IE 9? Well, so far, there&#8217;s nothing to make me believe that the uptake rate will be anything better than the IE 8 transition; a process which has taken 2 years to give ~30% of the market the latest version. If anything, we should expect that rate to be retarded somewhat by the XP hurdle.</p>
<p>MSFT&#8217;s browser replacement rates bear understanding because they&#8217;re the most popular and suffer from the longest half-lives. That is to say, the time it takes for an old version of IE to decay in the wild is much, much higher than for other browsers. Some part of this is surely due to sheer market share, but not all of it. The XP hurdle, for instance, is a form of structural drag on uptake rates &#8212; a flaw that browsers that aren&#8217;t tightly tied to OSes don&#8217;t suffer from. For web developers, I dare say that half-life of popular browsers matters much, much more than the current or trending market share since it&#8217;s predictive of our potential for browser improvement in the near future. It&#8217;s one thing to get the new shiny, but how long will it take you to install it? If the shiny is old and dingy by the time it&#8217;s in place, what good is that? It&#8217;s this lens that makes browser market share stats interesting to me; i.e., what percentage of the web&#8217;s users will get the new features soonest? &#8216;Cause those are the folks we can start building super compelling content for.</p>
<p>The average half-life of the majority of browsers in the wild also gates the rate of progress in standards. When the process is working well, bugs in browsers or pre-standards implementations of features aren&#8217;t a permanent features of the landscape. Instead, they&#8217;re the understandable and inevitable result of a process that prioritizes implementation experience and iteration over raw compliance with an academic spec that may or may not actually get it right on the first go &#8217;round. But that iterative, feedback-rich process only works when browsers iterate quickly and web developers can target the future without thinking so hard about the past, else progress simply turns into something to resent and distrust. That&#8217;s good for no one, and a shorter half-life is the key to making progress more than just a spec-tease.</p>
<p>I&#8217;m personally hopeful that when IE 9 is finally RTM&#8217;d, that it includes some provisions for shortening its life expectancy in the ways that Chrome and Firefox have through aggressive auto-updating. Getting IE 9 out to the world will be a good thing, but only if it happens quickly and if IE 10 can follow it even faster.</p>
<p>There&#8217;s obviously a lot more to talk about at the browser panel &#8212; <a href="http://chrome.blogspot.com/2011/03/speedier-simpler-and-safer-chromes.html">Chrome 10 just launched with Crankshaft</a>, for instance &#8212; but the fact that nearly every Chrome user will have those improvements <em>this week</em> and that if you&#8217;re building a Chrome Web Store app, you&#8217;ll get to target those improvements nearly instantly seems like the biggest, most interesting change from where we were just a couple of years ago.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2011/03/half-lives/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>When Free Isn&#8217;t Cheap Enough</title>
		<link>http://infrequently.org/2010/08/what-to-do-when-free-isnt-cheap-enough/</link>
		<comments>http://infrequently.org/2010/08/what-to-do-when-free-isnt-cheap-enough/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 12:19:56 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[chromeframe]]></category>
		<category><![CDATA[gcf]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=1377</guid>
		<description><![CDATA[The concepts of negative externality and moral hazard describe situations where one person can impose costs on another without paying for it, often resulting in less-than optimal outcomes for everyone. That sounds a lot like what&#8217;s going on with organizations that won&#8217;t upgrade from IE6 to me. Lets quickly consider both sides of the browser [...]]]></description>
				<content:encoded><![CDATA[<p>The concepts of <a href="http://en.wikipedia.org/wiki/Externality">negative externality</a> and <a href="http://en.wikipedia.org/wiki/Moral_hazard">moral hazard</a> describe situations where one person can impose costs on another without paying for it, often resulting in less-than optimal outcomes for everyone. That sounds a lot like <a href="http://arstechnica.com/microsoft/news/2010/08/despite-petition-uk-government-to-keep-ie6.ars">what&#8217;s going on with organizations that won&#8217;t upgrade from IE6</a> to me. Lets quickly consider both sides of the browser equation and then sketch out some possible solutions, keeping in mind that the assumed goal is a better, less frustrating web experience for users and developers. We&#8217;ll also look to see how this stacks up with the fairness goal of buyers paying full-freight for the costs of production.</p>
<hr width="60%" size="1" noshade />
<p>Firms have incentive to maximize return on investments, meaning not switching immediately when better browsers are available, even if the nominal price is zero since the real price may be much higher. Retraining, support, validation, and rework of existing systems that won&#8217;t work with a new browser all add up to create a large disincentive to <em>any</em> change. A new browser &#8212; or even a new version of an existing browser &#8212; has to be worth enough to outweigh those potential costs. It may cost real money just to figure out <em>if</em> upgrading will cost a lot. Lets assume that organizations are deciding <a href="http://www.jstor.org/pss/1805441">under uncertainty</a>.</p>
<p>Web developers want their customers to pay at least what it costs to produce an app. This may be hard to estimate. They&#8217;d also like to deliver competitive apps at as low a cost as possible and often want to maximize the size of their addressable market, which means supporting the broadest swath of browsers as possible. They <em>could</em> build features once for old browsers and again (perhaps better) for new browsers, but that&#8217;s expensive. Only the largest sites and firms can contemplate such a strategy, and usually as a way of mopping up marginal market share once they&#8217;ve &#8220;won&#8221; the primary market battle. Developers of new apps have strong incentives to build to the least common denominator and address the largest potential market.</p>
<p>So what browsers to include? There&#8217;s historical data on browser share but things move slowly enough that the future is going to look a lot like the present, particularly related to development cycles. Public statistics on browser share may not even resemble the market for a vertically focused product. Enterprise software developers can count on more legacy browser users than consumer sites. In any case, it&#8217;s unlikely that a firm knows all of its future customers. It pays to be conservative about what browsers to support.</p>
<p>What if a developer builds an app, bears the pain of supporting old browsers, but does not sell many units to users of old browsers? There&#8217;s potential <a href="http://en.wikipedia.org/wiki/Deadweight_loss">deadweight loss</a> in this case, but it might be OK; the developer reduced their uncertainty and that&#8217;s worth something.</p>
<p>What&#8217;s good for a single firm may be bad for the ecosystem, though. The cumulative effects of this dynamic compound. Application buyers are also the market for browsers, but on different time scales. The costs of a browser upgrade may not be known and may dwarf the cost of any individual app, making it unlikely that cost savings for an app targeted at newer browsers will win the day. More likely the customer will lean on their supplier to support their old browser. Mismatches in size and clout between vendors and clients amplify this dynamic. What small consulting firm can tell a Fortune 500 firm who may be their largest customer to go stuff it if they don&#8217;t upgrade from IE 6? Small vendors may be able to target more than just the supported browsers at their largest client, but again potentially taking deadweight losses. Large, slow moving organizations may hurt individual apps but cumulatively they can also rob the market of growth thanks to the third linkage: the connection between browser makers and application developers.</p>
<p>It might come as a surprise, but browser vendors care very much what web developers do. We see this in the standards process where a lack of use is cause for removing features from specs. After all, standards are insurance policies that developers and customers take out against their investment in technologies &#8212; in this case browsers and the features they support. It doesn&#8217;t make sense to insure features that nobody is using. Developers whose clients are slow-moving may shy away from using new features, robbing the process of the feedback that&#8217;s critical in cementing progress. With the feedback loop weakened, browser makers may assume that developers don&#8217;t want new features or don&#8217;t want the ones they&#8217;ve built. Worse, they may wrongly think that developers just want better/faster versions of existing features, not new features that open up new markets.</p>
<p>I&#8217;ve glossed over lots of details at every step here, but by now we can see how the dynamic caused by legacy content in organizations that demand continuity robs us all of forward momentum. More frustratingly, we can also see how everyone in the process is behaving rationally(ish) and without obvious malice. That doesn&#8217;t mean the outcomes are good. If firms could make new web features available for their suppliers to target faster, they would strengthen the feedback loop between developers and browser makers and also reduce their own procurement costs for applications, assuming they could continue to use their old applications. The key to enabling this transition to a better equilibrium lies in reducing those potential costs of change. In many ways, that comes down to reducing the uncertainty. If new features could work along side legacy content without retraining, added support costs, and without the need for exploratory work to understand the potential impacts, organizations should be more willing to accept modern applications. We need to make free cheaper.</p>
<p>There are other ways of addressing market imbalances like this, of course. One traditional answer is for governments to tax those who externalize their costs onto others, bringing the actual price of goods back into line. Regulation to prevent externalization in the first place can also be effective (e.g., the Clean Water Act). The use of the courts to find and provide remedies sometimes works but looks implausible here &#8212; you&#8217;d need a court to accept a theory of &#8220;browser pollution&#8221; in order to show harm. Derivative contracts may allow first parties (developers) to spread their potential costs, assuming they can find buyers who can judge the risks, but this looks to be a long way out for web development. Building basic schedules for relatively differentiated goods is hard enough. Asking others to trade on one small-ish aspect of a development process feels far-fetched.</p>
<hr width="60%" size="1" noshade />
<p>Reasonable people disagree about how we should attack the problem. My own thinking on the topic has certainly evolved.</p>
<p>For a long time I viewed standards as a solution, and once my faith waned &#8212; based on a lack of evidence that standards could do what was being asked of them &#8212; I turned to JavaScript to help fill the gaps. It was only when I came to realize how the <em>rate</em> of progress determines our prospects for a better future that I started looking for other solutions. The dynamics I&#8217;ve outlined here are roughly how I came to view what I did for a living in 2008, when I began to look into building a swappable renderer for IE based on WebKit. <a href="http://code.google.com/chrome/chromeframe/">Chrome Frame</a> is an attempt to drive the price of free closer to zero and in the prcoess improve the rate of progress. That&#8217;s the reason that Chrome Frame is <a href="http://www.chromium.org/developers/how-tos/chrome-frame-getting-started">opt-in for every page</a> and doesn&#8217;t render everything with the Chrome engine. That&#8217;s the reason we&#8217;ve created <a href="http://alex.dojotoolkit.org/2010/07/chrome-frame-msis-now-available/">MSI packages that keep IT administrators in control</a> and continue to do all our work in public. Rendering everything via Chrome or giving admins any reason to distrust the plugin wouldn&#8217;t reduce the uncertainty and therefore wouldn&#8217;t do anything to address the part of the process of progress that has been broken for so long.</p>
<p>Next time you hear someone say &#8220;if only I could use <em>X</em>&#8220;, remember that the way we&#8217;ll get to a better future is by bringing everyone else along for the ride. We won&#8217;t get there by <a href="http://www.theregister.co.uk/2010/05/06/death_of_ie6_plan/">telling them what to do</a> or by implying with moral overtones that their locally optimal decision is &#8220;wrong&#8221;. Instead we can bring them along by understanding their interests and working to reduce the very real friction that robs us all of a better future. You can do your part by <a href="http://www.chromium.org/developers/how-tos/chrome-frame-getting-started">opting your pages into the future</a> and working with your users to help them understand how cheap free has truly become.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2010/08/what-to-do-when-free-isnt-cheap-enough/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>An Now For Something Entire&#8230;.Oooh! Shiny!</title>
		<link>http://infrequently.org/2009/04/an-now-for-something-entireoooh-shiny/</link>
		<comments>http://infrequently.org/2009/04/an-now-for-something-entireoooh-shiny/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:42:28 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[openweb]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=951</guid>
		<description><![CDATA[The Google O3D team just launched and the news stories are already starting to trickle out. Ok, so it&#8217;s shiny&#8230;but so what? First, O3D embeds V8. This means that while you might be running your O3D code in a browser with a terrible JavaScript engine, or worse, an engine with terrible GC pauses, your O3D [...]]]></description>
				<content:encoded><![CDATA[<p>The Google <a href="http://code.google.com/apis/o3d/">O3D team just launched</a> and the news stories are already starting to <a href="http://arstechnica.com/software/news/2009/04/google-releases-3d-graphics-plugin-for-browsers.ars">trickle out</a>.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/uofWfXOzX-g&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/uofWfXOzX-g&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>Ok, so it&#8217;s shiny&#8230;but so what?</p>
<p>First, O3D embeds <a href="http://code.google.com/p/v8/">V8</a>. This means that while you might be running your O3D code in a browser with a terrible JavaScript engine, or worse, an engine with terrible GC pauses, your O3D content isn&#8217;t subject to those problems. This is a Big Win (TM). Most of the web can limp by with bad GC behavior, but interactive 3D just can&#8217;t. You might have seen the difference this makes by running <a href="http://www.chromeexperiments.com/detail/monster/">Dean&#8217;s Monster demo</a> in Chrome and then trying it in other browsers.</p>
<p>Next, O3D presents a scene graph. Direct-mode proposals to the 3D-on-the-web discussion are based on the idea that JavaScript programmers will ship enormous toolsets down the wire in order to re-create the scene graph and/or to parse shape descriptions. Having direct access to the OpenGL surface description is <a href="http://ajaxian.com/archives/metatunnel-the-future-web-strikes-back">incredibly powerful</a>, but I suspect not sufficient in the long term to really bootstrap a world where 3D is a first-class citizen. Also, using the web as a way to break-open some of the closed interchange challenges of today&#8217;s 3D world isn&#8217;t going to happen when everyone&#8217;s description of things is entirely programmatic, so I&#8217;m excited by the direction of O3D as a force for good.</p>
<p>Congrats to the O3D team. It&#8217;s a big day for them and the deserve huge props for shipping concurrently on Windows and Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/04/an-now-for-something-entireoooh-shiny/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Dojo 1.3 Is Out!</title>
		<link>http://infrequently.org/2009/03/dojo-13-is-out/</link>
		<comments>http://infrequently.org/2009/03/dojo-13-is-out/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 15:52:58 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[dhtml]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[dojo13]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=905</guid>
		<description><![CDATA[Dojo 1.3 is here! (download site) If you&#8217;re already using Dojo, this should be a no-brainer upgrade. It&#8217;s out-and-out better. As a quick example, dojo.create("tagname", { /*properties*/ }) is now the preferred way to build DOM nodes quickly. Its simple API will be natural to anyone who has used dojo.attr(). Even better, Pete&#8217;s exciting PlugD [...]]]></description>
				<content:encoded><![CDATA[<p>Dojo 1.3 <a href="http://www.dojotoolkit.org/2009/03/31/dojo-1-3-now-available">is here</a>! (<a href="http://download.dojotoolkit.org/release-1.3.0/">download site</a>)</p>
<p>If you&#8217;re already using Dojo, this should be a no-brainer upgrade. It&#8217;s out-and-out better. As a quick example, <code>dojo.create("tagname", { /*properties*/ })</code> is now the preferred way to build DOM nodes quickly. Its simple API will be natural to anyone who has used <code>dojo.attr()</code>. Even better, Pete&#8217;s <a href="http://code.google.com/p/plugd">exciting PlugD version of dojo.js has been updated to 1.3 as well</a>.</p>
<p>1.3&#8242;s Core features the new &#8220;Acme&#8221; CSS selector engine which provides a big boost in speed for many operations in the fast-path. <a href="http://alex.dojotoolkit.org/2009/03/dojo-13b3-is-out/">I blogged before</a> about the work we did to make Acme fast, and rest assured it is (in aggregate, across all use cases) quicker than any other selector system you can get your hands on today. But selector performance isn&#8217;t where it&#8217;s really at, and I&#8217;ve been saying that for a long time. </p>
<p>Luckily, Pete Higgins decided to prove it and has been working on a new set of benchmarks with the help of other toolkit vendors (to ensure fairness) called &#8220;<a href="http://dante.dojotoolkit.org/taskspeed/">TaskSpeed</a>&#8220;. Dojo 1.3 wins by a wide margin. Across all the reported browsers so far, <b>Dojo is <em>at least</em> 2 times faster than other toolkits on common DOM operations</b>. We&#8217;ve worked very hard over the years to make sure that Dojo&#8217;s APIs don&#8217;t encourage you to do things that will hurt you later, and TaskSpeed finally shows how much this philosophy pays off:</p>
<p><a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html"><img src="http://alex.dojotoolkit.org/wp-content/uploads/2009/03/taskspeed.png" alt="taskspeed" title="taskspeed" width="560" height="400" class="aligncenter size-medium wp-image-916" /></a></p>
<div style="padding-left: 3em; padding-right: 3em;"><i>The numbers above are from <a href="http://dante.dojotoolkit.org/taskspeed/">TaskSpeed</a>, a new toolkit benchmark developed by Pete Higgins with tests contributed by other toolkit authors to ensure fairness. Shorter is better.</i></div>
<p><strike>Given that DOM is the primary bottleneck in most apps</strike> <em>DOM is a big bottleneck in today&#8217;s apps, usually just behind network I/O</em> and these tests demonstrate how Dojo&#8217;s approach to keeping things fast pays off not just on micro benchmarks like CSS selector speed, performance improvements to single toolkit functions, or even file size &#8211; but on aggregate performance where it really matters. Dojo&#8217;s modern, compact syntax for these common operations doesn&#8217;t slow it down, either. For instance, if you go check out the <a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html">TaskSpeed reporting page</a>, you&#8217;ll see that where browsers are slowest (IE6/7/8, etc.), Dojo&#8217;s focus on performance pays off most. Why use a toolkit that&#8217;s going to hurt you when it really counts, particularly when Dojo so easy to get started with?  Dojo&#8217;s Core has been designed from the ground up with APIs that encourage you to do things that are fast and keep you from doing things that are slow unless you really know what you&#8217;re doing. In some cases, we&#8217;ve made hard size-on-the-wire tradeoffs in order to keep actual app performance speedy. That hard engineering doesn&#8217;t show up in micro-benchmarks or single test release-over-release improvements or the &#8220;my toolkit is smaller&#8221; comparisons that some would prefer that web developers focus on. It&#8217;s easy to win rigged games, after all. It&#8217;s only when you see APIs composed together in real-world ways, across browsers, that you can start to see the real impact of a toolkit&#8217;s design philosophy. Dojo is designed to help you make things that are awesome for users, and that means they need to be <em>FAST</em>.</p>
<p>Other toolkits have released performance numbers of late, and most of them have been either reported badly or run without much rigor, so it&#8217;s exciting to see everyone finally pitching in to build end-to-end tests that show how library design decisions interact with real-world realities of browsers. The TaskSpeed tests have been designed to be both even-handed and reliable (no times below timer resolution, etc.). The <a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html">reporting page is also designed to make the results understandable</a> and put them in context. A lot of care has been taken to keep this benchmark honest. JavaScript developers have suffered at the hand of <a href="http://ajaxian.com/archives/querying-the-dom-on-the-sly">chart junk</a> for far too long.</p>
<p>I can&#8217;t do 1.3 justice in a single blog post, so I recommend that you check out these resources and then just dive in:</p>
<ul>
<li><a href="http://www.dojotoolkit.org/2009/03/31/dojo-1-3-now-available">Pete&#8217;s release announcement</a></li>
<li><a href="http://www.dojotoolkit.org/book/dojo-1-3-release-notes">The Official 1.3 Release Notes</a></li>
<li><a href="http://docs.dojocampus.org/">The new Documentation (at Dojo Campus)</a></li>
<li><a href="http://download.dojotoolkit.org/release-1.3.0/cheat.html">The new 1.3 Core Cheat Sheet</a></li>
<li><a href="http://code.google.com/p/plugd/">PlugD: An even easier way to get going with Dojo</a></li>
<li><a href="http://dante.dojotoolkit.org/taskspeed/">Run the TaskSpeed tests for yourself</a> then <a href="http://dante.dojotoolkit.org/taskspeed/report/charts.html">see how the toolkits stack up</a> (hint: everything you thought you knew about JS library performance was probably wrong.)</li>
<li>Check out integrations for Dojo that you can probably drop right in to your workflow, no matter what stack you&#8217;re using: , <a href="http://www.springsource.org/webflow">Spring Web Flow (Java)</a>, <a href="http://code.google.com/p/dojango/">Dojango (Django/Python)</a>, <a href="http://code.google.com/p/d-rails/">DRails (Ruby/RoR)</a>, <a href="http://code.google.com/p/tatami/">Tatami (Java/GWT)</a>, <a href="http://framework.zend.com/">Zend (PHP)</a>, or <a href="http://dojomino.com/">Dojomino (Domino Server)</a>.</li>
</ul>
<p>Big thanks to the folks who tried out the betas and RC&#8217;s and helped make 1.3 solid.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/03/dojo-13-is-out/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Whoa.</title>
		<link>http://infrequently.org/2009/01/whoa/</link>
		<comments>http://infrequently.org/2009/01/whoa/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 23:38:00 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[dojo]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[palm]]></category>
		<category><![CDATA[pre]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=867</guid>
		<description><![CDATA[Via Dion, Palm&#8217;s new Mojo framework for the Pre is based on Dojo! As far as I know, it was a total surprise to the Dojo community (myself included). I can&#8217;t wait to get started writing apps for this thing and see what device APIs Palm has surfaced.]]></description>
				<content:encoded><![CDATA[<p><a href="http://ajaxian.com/archives/palm-mojo-uses-dojo-view-the-source">Via Dion</a>, Palm&#8217;s new <a href="http://developer.palm.com/">Mojo</a> framework for the <a href="http://www.palm.com/us/products/phones/pre/index.html">Pre</a> is based on Dojo!</p>
<p>As far as I know, it was a total surprise to the Dojo community (myself included). I can&#8217;t wait to get started writing apps for this thing and see what device APIs Palm has surfaced.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/01/whoa/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
