I’ve been meaning to move this blog off a sub-domain affixed to the Dojo Project for some time, but I finally got all the pieces lined up last night. This blog will continue to be technical in nature and I’ll set up another location here on infrequently.org for political stuff. Thanks for being patient with any latent brokenness.
Blog Move
When Free Isn’t Cheap Enough
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’s going on with organizations that won’t upgrade from IE6 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’ll also look to see how this stacks up with the fairness goal of buyers paying full-freight for the costs of production.
Firms have incentive to maximize returns on existing investments in browsers. That usually means not switching immediately when better versions 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’t work with a new browser all add up to create a large disincentive to any change. A new browser — or even a new version of an existing browser — has to overcome not just compatibility and feature hurdles, but also has to be worth enough in the view of the upgrading firm to outweigh those other potential costs. Once an organization gets large enough, it may cost real money just to figure out if upgrading to a new browser will cost a lot of money. That outlay itself may be hard to justify, so lets assume that big organizations are making decisions about browsers under uncertainty.
Web developers and the folks who employ them would like their customers — the aforementioned firms — to pay at least what it costs to produce an app. As we’ll see, this may be hard to estimate. They’d also like to deliver competitive, compelling apps at as low a cost as possible. But they’re also operating under uncertainty. Developers want to maximize the size of their potential market, which means supporting the broadest swath of browsers as possible. They also wish to avoid rework, or building features twice. They could build a feature once for old browsers and again (perhaps better) for new browsers, but that’s expensive. Only the largest sites and firms can even contemplate such a strategy. This means that developers have incentive to build to the least common denominator since that will ensure an app works for the largest market.
So what browsers to include? There’s historical on how browser usage is evolving, but things move slowly enough in the modern browser era to suggest that the future is going to look a lot like the present, particularly related to average sales and development cycles. Public, widely available statistics about market share might also bear scant resemblance to the audience for a potential app. Developers for enterprises can often count on even more legacy browser users than the numbers from the public web would suggest. App development may be speculative and therefore hard to gauge the eventual profile of user’s browser. It’s unlikely that a firm knows all of its future customers when you starting development, particularly for new applications. It pays to be conservative about what browsers to support, then.
What if a developer builds an app, pays all of the costs related to increased complexity and reduced feature set for supporting old browsers, but does not sell many units to firms using old browsers? There’s potential deadweight loss to the developer of that app in supporting old browsers, but that might be OK from the perspective of the developer; they reduced their uncertainty. They’ll likely never know if the cost/benefit would have worked out the other way, but it’s a moot question for them.
The cumulative effects of this dynamic over time are not additive; they compound. Lets consider the environment that these developers are selling into. Remember that a developer’s customers are also the market for browsers, but on different time scales. The costs of an IT upgrade project for browser replacement may not be known and may dwarf the cost of the app, making it unlikely that the cost savings to the organization for an app targeted at newer browsers (thanks to browser features which reduce development time and therefore cost) will win the day. More likely the customer will lean on their supplier to support their old browser or simply exclude vendors from the bid process all together. Mismatches in size and clout between vendors and clients amplify this dynamic: large clients simply dictate terms, forcing suppliers to bear costs that they might not otherwise. If those suppliers have (or would like to have) other clients, they may pursue a strategy for browser support that includes more than just the supported browsers at their large firm client, again potentially taking deadweight losses. The cumulative effects of large, slow moving organizations aren’t just to reduce the features or increase the cost of a single app; over time the inability of developers to use and stress new features robs the entire market of growth thanks to the third linkage: that of browser makers to application developers.
It might come as a surprise, but browser vendors care very much what web developers do. This shows up clearly in the standards process (a forum historically populated with browser vendors) where a lack of use is cause for removing features from specs. After all, standards are insurance policies that developers and customers take out on their investment in browsers and the features they support, and it doesn’t make sense to insure features that nobody is using. Developers who include slow-moving firms as clients may shy away from using new features, depriving both their app of marginal capabilities but crucially also robbing the process of browser improvement from the feedback that’s critical in cementing progress in place. With this feedback loop weakened, browser makers may assume that web developers simply don’t want new features or perhaps don’t want the ones they’ve clamored for. Worse, they may wrongly think that developers just want better/faster versions of existing features, not new features that open up new markets (assuming wide distribution).
I’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’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.
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 — you’d need a court to accept a theory of “browser pollution” 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.
Reasonable people disagree about how we should attack the problem. My own thinking on the topic has certainly evolved.
For a long time I viewed standards as a solution, and once my faith waned — based on a lack of evidence that standards could do what was being asked of them — I turned to JavaScript to help fill the gaps. It was only when I came to realize how the rate of progress determines our prospects for a better future that I started looking for other solutions. The dynamics I’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. Chrome Frame is an attempt to drive the price of free closer to zero and in the prcoess improve the rate of progress. That’s the reason that Chrome Frame is opt-in for every page and doesn’t render everything with the Chrome engine. That’s the reason we’ve created MSI packages that keep IT administrators in control and continue to do all our work in public. Rendering everything via Chrome or giving admins any reason to distrust the plugin wouldn’t reduce the uncertainty and therefore wouldn’t do anything to address the part of the process of progress that has been broken for so long.
Next time you hear someone say “if only I could use X“, remember that the way we’ll get to a better future is by bringing everyone else along for the ride. We won’t get there by telling them what to do or by implying with moral overtones that their locally optimal decision is “wrong”. 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 opting your pages into the future and working with your users to help them understand how cheap free has truly become.
Side-by-side Chrome Versions Now Supported
Side-by-side versions of different browsers are critical for us webdevs. On some browsers, it’s because multi-year-old versions are still prevalent (luckily, you can start ignoring them). In the case of Chrome, nearly all users are up-to-date with the very latest Stable release. Being the forward thinking chap/gal you are you want to try out new stuff like WebGL that’s only available in the Dev channel. But you don’t want to mistakenly build something that uses features users don’t have yet. What to do? Side-by-side installs, a.k.a. the Canary channel! Now you can test with Stable while plotting world domination on Dev. Awesome.
This new version will auto-update with the new hotness at roughly the same rate as today’s Dev channel but will allow you to install and run it alongside a Stable channel version of Chrome. This new channel is Windows-only for now, but you have VMs for testing anyway, right? Happy testing!
Chrome Frame MSI’s Now Available!
You can get yours here. Note that these are Dev Channel builds, so they contain the new hotness. Also, the new bugs. Caveat emptor.
Huge props to Robert Shield who has been working through the endless details of this effort for months.
Chrome Frame Dev Channel and Testing Gotchas
So you’re making the new shiny — ’cause that’s how you roll — and you’re thinking to yourself “hrm, I’ve told users of legacy browsers to get Chrome Frame or upgrade, but there’s this new awesome feature in the Chrome Developer Channel…but it’s not in the version of Chrome Frame I’m testing with. I thought I was on the Dev channel?”
Indeed, if you installed GCF prior to the Beta release, you would have been on the Dev version, but when the Beta was pushed, all existing GCF users were moved to it as a one-time transition. That means you might not be getting the new shiny features we’re pouring into Dev as quickly as you anticipated…but fear not! There’s a new Dev Channel Release available. If you’re developing sites with GCF and you want to see what’s coming, I highly recommend getting and testing against this version. You won’t be moved to Beta again, so this uninstall/reinstall is a one-time change.
As folks begin to use and test with GCF, one of the first many try is to use the OptInUrls registry key to over-ride a site’s preference about which renderer to use. This tends to cause confusion and spurious bug reports because many sites employ server-side User-Agent detection to send different content to different browsers. Since GCF uses IE’s network stack and reports a slightly modified IE User-Agent instead of Chrome’s UA, server-side detection may send IE-specialized content instead of Chrome-friendly content. This includes many large sites like Yahoo, GMail, and most sites built with GWT’s server-side detection.
These are not bugs.
Those sites are working as intended and GCF is operating correctly. What’s happening, instead, is that by adding sites to the OptInUrls list that do not understand GCF, you’re breaking the contract at the core of how GCF works: existing content works the way it always has. It’s only when you’re sure that a site is sending browser-neutral content (usually when it’s your site) that you should ever add a site to the OptInUrls list for your system or organization. As usual, if you’ve got questions about GCF that aren’t answered in the FAQs or docs, you can ask them on the Google Group for the project. The whole team is subscribed to the list and we’re focused on helping you make awesome apps, so stop by, say howdy, and let us know how it’s going.
Beta!
Today we launched our first Beta release of Google Chrome Frame (aka “GCF”).
In some ways it’s a strange product; it’s working best when you notice it least. As a developer, you shouldn’t have to think much about it other than to include the header or meta tag or and optionally add a couple of lines of script to prompt users to install the plugin — a process which notably doesn’t require a restart and doesn’t take users off of your site. There’s no new tool to learn, no new language you have to wrap your head around…in fact, the hardest part might just be putting down all the habits we’ve collected for catering to legacy browsers. The new features in Chrome Frame are all the existing features you haven’t been able to exercise yet.
As I’ve begun to build exclusively to modern browsers, the experience of concerted un-learning of hacks and the ability to write directly to the platform again, sans toolkit, has been eye opening. Yes, there’s still a lot that can be improved in DOM, CSS, and HTML, but things are moving, and the tools we need now aren’t the tools we have today. Better yet, there’s every indication that things are progressing fast enough that instead of building tools to bring up the rear, we’ll be building them to shield ourselves from the ferocious pace of improvement should we need them at all.
If you’re starting a new project today, I encourage you to prototype to HTML5 and modern features and then think hard about what you’re building and for whom. Do these apps really need to run on legacy browsers? Why not just use GCF to make that pain and expense go away. Once you’ve experienced how good modern web development can be — how rich and fast the apps you can deliver are — I’m convinced that you’ll find it hard to go back. The rich, open, interoperable web is the platform of the future, and I couldn’t be happier that GCF is going to help deliver that future.
JSConf: Metric Tons of Awesome
I had the pleasure and honor of speaking on Google Chrome Frame (slides) at JSConf this past weekend. The conference was small enough that meeting some large percent of the awesome people there was feasible yet large enough that it drew many of the folks doing some of the most interesting work in the JavaScript community today. Frameworks were well represented, as was server-side JS. If you can only go to one conference a year, I can recommend JSConf without reservation. As a speaker, Chris and the organizers treated us better than anyone could hope for, and as an attendee the quality of the content and the hallway conversations left me constantly with the feeling that I was lucky to be where I was but sad that I was probably also missing something else that was awesome.
For some reason Chris — fearless pirate leader that he is — thought it hilarious to have me follow not only Billy Hoffman’s outstanding security talk, but also Brendan Eich’s never-fail wit and delivery. Funny in that “watching people walk the plank…good times” sort of way. I was also between a bunch of people who (apparently) know how to drink and a truly awesome Google-sponsored party. No pressure. None at all.
Somewhat counter-intuitively my talk focused not on what JavaScript can do, but why we’ll be using less of it in the near future; at least for the things we’re currently burning bandwidth and CPU. HTML5, CSS 3, and developers who are liberated to take advantage of them are going to kill off a lot of code. Take, for example, the slides for my talk. The only JS library that’s included is for prompting users to install Google Chrome Frame. GCF will accelerate the transition to new standards and new ways of building apps. We’ll build faster apps not by employing ever-more exotic ways of mangling JavaScript or by giving up the simplicity and directness of HTML and CSS, but rather by simplifying what we write and what we send over the wire.
I’ll be talking more about this at Google I/O next month, so if you missed JSConf, hopefully I’ll see you there.
Some Questions Worth Asking
When I hear the following words or phrases I now have to stop and think about what is really being said since these words and phrases have been so heavily diluted and co-opted that their positive connotations can no longer be assumed:
- “Innovation”
- Is a given innovation socially beneficial? I.e., does it improve the lots of any, many, or just a few? Innovation, it turns out, is a vector. It has both magnitude and direction, and that direction can be negative.
- “Social Change”
- What sort of change? Change is often good. Also, bad. Look closely.
- “Open API”
- The word “open” is so loaded that when combined with “API”, it’s nearly a sociopolitical phenomena of its own right. If you think of nothing else when you hear this phrase, think privacy in public. Who owns what happens on the other side of the API?
What am I missing?
Planet Chromium
All the Chromium news that I care about is now being aggregated at Planet Chromium, joining the similarly awesome Planet Webkit.
View-Source Follow-Up
One of the points I made during last Saturday’s panel was that the further down the path we go with JavaScript, the more pressure there is to use it in ways that defeat view-source. Brendan called me out for seemingly not being aware of beautifiers which can help correct the imballance, but I think that response (while useful) is orthogonal to the thrust of my argument.
Indeed, I hadn’t personally used the excellent jsbeautifier.org, instead using my own hacked-up copy of Rhino to beautify when I need to, but neither tool sufficiently reverses the sorts of optimizations being employed by GWT and the even more aggressive Closure Compiler. Far from the mere obsfucation of ShrinkSafe and its brethren, these new compilers apply multi-pass AST-based transforms on an entire body of code, performing per-browser optimizations, type inference and annotation based optimizations, loop invariant hoisting, function inlining, dead-code removal, and global code motion optimizations that produce code different not only in style but in flow of control. The results are nothing short of stunning. The Closure Compiler can deliver code that’s much, much smaller than I can wring out by hand and that performs better to boot. It’s also totally unrecognizable. De-obsfucators have no hope in this strange land — brand new tools akin to symbol servers and WinDbg-style debuggers are needed to work with the output in a meaningful way. I argued in the panel and in the comments of my last post on the topic that when we get to this place with JavaScript the product is functionally indistinguishable from a bytecode format like SWF or Java and the effects on the learning-lab nature of the open web are the same: less ability to easily share techniques, a smaller group of more professional users, and a heavier reliance on tooling for generating content.
If we assume that the furthest down the code-centric path we’ll go are the Dojo and JQuery style augmentations of existing content, then a simple de-obsfucator is sufficient. But I’m afraid the current generation of high-end sites and apps points in a different direction, one that is less hopeful, and one that implies to a greater extent that the browsers must lead the way out of the wilderness by creating new tags and CSS properties to help re-democratize the process of creating applications. We’ve already seen the alternatives, and while they may be elegant, they lack leverage and the second-order beneficial effects that have made the web as successful as it is today.
If HTML is just another bytecode container and rendering runtime, we’ll have lost part of what made the web special, and I’m afraid HTML will lose to other formats by willingly giving up its differentiators and playing on their turf. Who knows, it might turn out well, but it’s not a vision of the web that holds my interest.
SxSWi ’10 Reflections
I first attended SxSWi amidst the rubble of the dot-com crash, a time when the interactive festival filled only one hallway of the third floor of the Austin Convention Center. It’s changed a lot since then, mostly in scale.
The lack of technical content is something I’ve bemoaned in years past but have finally come to accept. I was grateful to be on an excellent panel this year that touched on some topics that I both think and care a lot about. Our panel was also blessed with amazing audience engagement from people I respect. I chalk most of that up to Michael Lucaccini and Chris Bernard’s excellent prep and panelist selection. Any panel with Chris Wilson and Aza Raskin on it is going to be good.
The explosion of SxSWi has not been a good thing and I went in the hopes that contraction had started as the economic disaster crimps budgets. Guess not. SxSWi was bigger than either the music or movie portions of the conference for the first time this year. Others have commented insightfully on the problems of scale, so I’ll spare you the rundown of what makes an enormous conference uninviting, but suffice to say it seems like SxSWi has gone over some crucial limit and will continue its inexorable expansion until something gives in a dramatic way. Gravity cannot be reasoned with.
Unlike some of those who found themselves post-hoc disappointed, I really didn’t think there was much chance of having a good time. Luckily I was wrong — not so much because it suddenly got better than in ’08, the last time I went — but because I had learned how to cope better with the scale. My brother lives near Austin and getting to hang out with him made the entire experience better. I also employed a series of strategies that helped me have an experience that I’d gladly repeat:
- Aggressive expectation adjustment. The most technical content I saw was at the Google Hackathon fearlessly organized by Chris Schalk and generously attended by some amazing fellow Goolers. My expectations for every other session were set to “entertainment”, and a few delivered.
- Bail early. One key for me to avoiding a bad experience was to be totally unafraid to walk out of talks and panels that weren’t going anywhere.
- Find the people you want to hang out with and stick with them. SxSWi has gotten so large that the process of meeting new people except by introduction is fraught with apprehension. To combat this, I used old skool technology to find and keep up with the people I really wanted to have conversations with. Calling and texting directly in lieu of Twitter really worked. When a conference resembles the real world in scope, simply employ the same aggressive filtering you would in person. Problem solved.
- If there’s a line, it’s not worth it. Once you decide to aggressively filter your experience through the lens of people you already like, it becomes much easier to skip all of the official parties and enormous impersonal events. Ignoring the nagging sense of loss about “missing something” and focusing on having quality conversations with people you enjoy makes all the difference. It doesn’t get better than that.
- Get thyself to the Salt Lick. Nothing makes me happy quite like Texas-style BBQ, so a key to SxSW for me is a pilgrimage to the Salt Lick. This time I got to go with family. Double win.
I think all of this implies that folks who haven’t been to SxSWi before aren’t going to be able to have the same sort of open, trusting experience that I had when I first started attending, and that’s a real loss; but at least I now feel like I can go and have a good and productive time. I’m grateful to have gone this year and I’m looking forward to next year already.
dojo.connect: Online Dojo Conference, Feb 10-12
Its been a rough year (or two) in the tech industry, and conference budgets aren’t what they once were. Dustin Machi’s doing his bit to keep the Dojo community connected by starting a fully virtual set of conferences, the first of which is 3 days full of Dojo goodness — dojo.connect.
I’ll be there virtually and I hope you can join us. The lineup is spectacular, and I can’t think of a more concentrated way to get in touch with the community short of becoming a committer.
Dojo: Twice As Fast When It Matters Most
Some folks have noticed a new landing page for dojotoolkit.org, one that includes hard numbers about the performance of Dojo vs. jQuery. Every library makes tradeoffs for speed in order to provide better APIs, but JavaScript toolkit performance shootouts obscure that reality more often than not. After all, there would hardly be a need for toolkits if the built in APIs were livable. Our new site isn’t arguing that Dojo gives you the fastest possible way to do each of the tasks in the benchmark, all we argue is that we provide the fastest implementation that you’ll love using.

Smaller is better.
I gathered the numbers and stand behind them, so let me quickly outline where they come from, why they’re fair, and why they matter to your app.
I took the average of three separate runs of the TaskSpeed benchmark in comparing the latest versions of both Dojo and jQuery. The numbers were collected on isolated VM’s on a system doing little else. You may not be able to reproduce the exact numbers, but across a similar set of runs, the relative timings should be representative.
So why is TaskSpeed a fair measuring stick? First, it does representative tasks and the runtime harness is calibrated to ensure statistically significant results. Secondly, the versions of the code for each library are written by the library authors themselves. The Dojo team contributed the Dojo versions of the baseline tasks and the jQuery team contributed theirs. If any library wants to take issue with the tests or the results, they only need to send Pete a patch. Lastly, the tests run in relative isolation in iframes. This isn’t bulletproof — GC interactions can do strange things and I’ve argued for longer runs — but it’s pretty good as these things go. I took averages of multiple runs in part to hedge against these problems.
The comparison to jQuery is fair on the basis of syntax and market share. If you compare the syntax used for Dojo’s tests with the jQuery versions, you’ll see that they’re similarly terse and provide analogous conveniences for DOM manipulation, but the Dojo versions lose the brevity race in a few places. That’s the price of speed, and TaskSpeed makes those design decisions clear. As for market share, I’ll let John do the talking. It would be foolish of me to suggest that we should be comparing Dojo to some other library without simultaneously suggesting that his market share numbers are wrong; and I doubt they are.
Given all of that, do the TaskSpeed numbers actually matter for application performance? I argue that they do for two reasons. First, TaskSpeed is explicitly designed to capture common-case web development tasks. You might argue that the weightings should be different (a discussion I’d like to see happen more openly), but it’s much harder to argue that the tests do things that real applications don’t. Because the toolkit teams contributed the test implementations, they provide a view to how developers should approach a task using a particular library. It’s also reasonable to suspect that they demonstrate the fastest way in each library to accomplish each task. It’s a benchmark, after all. This dynamic makes plain the tradeoffs between speed and convenience in API design, leaving you to make informed decisions based on the costs and benefits of convenience. The APIs, after all, are the mast your application will be lashed to.
I encourage you to go run the numbers for yourself, investigate each library’s contributed tests to get a sense for the syntax that each encourages, and get involved in making the benchmarks and the libraries better. That’s the approach that the Dojo team has taken, and one that continues to pay off for Dojo’s users in the form of deliberately designed APIs and tremendous performance.
View-Source Is Good? Discuss.
I’ve been invited by Chris Messina and some kindly folks at MSFT to participate in a panel at this year’s SxSW regarding the value and/or necessity of view-source, and so with apologies to my fellow panelists, I want to get the conversation started early.
First, my position: ceteris paribus, view-source was necessary (but not sufficient) to make HTML the dominant application platform of our times. I also hold that it is under attack — not least of all from within — and that losing view-source poses a significant danger to the overall health of the web.
That’s a lot to hang on the shoulders of a relatively innocent design decision, and I don’t mean to imply that any system that has a view-source like feature will become dominant. But I do argue that it helps, particularly when coupled with complementary features like reliable parsing, semantic-ish markup, and plain-text content. Perhaps it’s moving the goal line a bit, but when I talk about the importance of view-source, I’m more often than not discussing these properties together.
To understand the importance of view-source, consider how people learn. Some evidence exists that even trained software engineers chose to work with copy-and-pasted example code. Participants in the linked study even expressed guilt over the copy-paste-tweak method of learning, but guilt didn’t change the dynamic: a blank slate and abstract documentation doesn’t facilitate learning nearly as well as poking at an example and feeling out the edges by doing. View-source provides a powerful catalyst to creating a culture of shared learning and learning-by-doing, which in turn helps formulate a mental model of the relationship between input and output faster. Web developers get started by taking some code, pasting it into a file, saving, loading it in a browser and hitting ctrl-r. Web developers switch between editor and browser between even the most minor changes. This is a stark contrast with technologies that impose a compilation step where the process of seeing what was done requires an intermediate step. In other words, immediacy of output helps build an understanding of how the system will behave, and ctrl-r becomes a seductive and productive way for developers to accelerate their learning in the copy-paste-tweak loop. The only required equipment is a text editor and a web browser, tools that are free and work together instantly. That is to say, there’s no waiting between when you save the file to disk and when you can view the results. It’s just a ctrl-r away.
With that hyper-productive workflow as the background, view-source helps turn the entire web into a giant learning lab, and one that’s remarkably resilient to error and experimentation. See an interesting technique or layout? No one can tell you “no” to figuring out how it was done. Copy some of it, paste it into your document, and you’ll get something out the other side. Browsers recovering from errors gracefully create a welcome learning environment, free of the inadequacy that a compile failure tends to evoke. You can see what went wrong as often as not. The evolutionary advantages of reliable parsing have helped to ensure that strict XML content comprises roughly none of the web, a decade after it was recognized as “better” by world+dog. Even the most sophisticated (or broken) content is inspectable at the layout level and tools like Firebug and the Web Inspector accelerate the copy-paste-tweak cycle by inspecting dynamic content and allowing live changes without reloads, even on pages you don’t “own”. The predicate to these incredibly powerful tools is the textual, interpreted nature of HTML. There’s much more to say about this, but lets instead turn to the platform’s relative weaknesses as a way of understanding how view-source is easily omitted from competing technologies.
The first, and most obvious, downside to the open-by-default nature of the web is that it encourages multiple renderers. Combined with the ambiguities of reliable parsing and semantics that leave room for interpretation, it’s no wonder that web developers struggle through incompatibilities. In a world where individual users each need to be convinced to upgrade to the newest version of even a single renderer, differences only in version can wreak havoc in the development process. Things that work in one place may not look exactly the same in another. This is both a strength and a weakness for the platform, but at the level of sophisticated applications, it’s squarely a liability. Next, ambiguities in interpretation and semantics mean that the project of creating tooling for the platform is significantly more complex. If only one viewer is prevalent (for whatever reason), then tools only need to consume and generate code that understands the constraints, quirks, and performance of a single runtime. Alternate forms of this simplification include only allowing code (not markup) so as to eliminate parsing ambiguity. The code-not-markup approach yields a potentially more flexible platform and one that can begin to execute content more quickly (as Flash does). These advantages, taken together, can create an incredibly productive environment for experts in the tools that generate content: no output ambiguity, better performance, and tools that can deliver true WYSIWYG authoring. These tools can sidestep the ctrl-r cycle entirely.
But wait, I hear you shout, It’s possible to do code-only, toolable, full fidelity development in JavaScript! Tools like GWT and Cappuccino generate code that generates UI, ensuring that only those who can write code or have tools that can will participate; removing the potential value of view-source for those apps. But lets be honest: view source is nearly never locally beneficial. I can hardly count the number of times I’ve seen the “how do I hide my code?” question from a web n00b who (rightly or wrongly) imagines there’s value in it. For GWT the fact that the output is an HTML DOM that’s styled with CSS is as much annoyance as benefit. The big upside is that browsers are the dominant platform and you don’t have to convince users to install some new runtime.
Similarly Flex, Laszlo, GWT’s UI Binder, and Silverlight have discovered the value in markup as a simple declarative way for developers to understand the hierarchical relationships between components, but they correspond to completely unambiguous definitions of components they rely on compiled code — not reliably parsed markup — for final delivery of the UI. These tight contracts turn into an evolutionary straightjacket. Great if you’re shipping compiled code down the wire that can meet the contract, but death if those tags and attributes are designed to live for long periods of time or across multiple implementations. You might be able to bolt view-source into the output, but it’ll always be optional and ad-hoc, features that work against it being pervasive. Put another way, the markup versions of these systems are leaky abstractions on the precise, code-centric system that under-girds both the authoring and runtime environments. This code-centric bias is incredibly powerful for toolmakers and “real” developers, but it cuts out others entirely; namely those who won’t “learn to program” or who want to build tools that inject content into the delivery format.
Whatever the strengths of code-based UI systems, they throw web crawlers for a loop. Today, most search engines deal best with text-based formats, and those search engines help make content more valuable in aggregate than it is on its own. Perhaps it’s inevitable that crawlers and search engines will need to execute code in order to understand the value of content, but I remain unconvinced. As a thought experiment, consider a web constructed entirely of Flash content. Given that Flash bytecode lacks a standard, semantic way to denote a relationship between bits of Flash content, what parts of the web wouldn’t have been built? What bits of your work would you do differently? What would the process be? There’s an alternate path forward that suggests that we can upgrade the coarse semantics of the web to deal with ever-more-sophisticated content requirements. Or put another way, use the features of today’s toolkits and code generators as a TODO list for markup driven features. But the jury is still out on the viability that approach; the same dynamic that makes multiple renderers possible ensures that getting them to move in a coordinated way is much harder than the unilateral feature roadmap that plugin vendors enjoy. HTML 5 and CSS 3 work is restarting those efforts, but only time will tell if we can put down the code and pick markup back up as a means to express ourselves.
I’ve glossed over a lot of details here, and I haven’t discussed implications for the server side of a non-text format as our lingua-franca, nor have I dug into the evolution metaphor. Many of the arguments are likewise conditional on economic assumptions. There’s lots of discussion yet to have, so if you’ve got links to concrete research in either direction or have an experience that bears on the debate post in the comments! Hopefully my fellow panelists will respond in blog form and I’ll update this post when they do.
OSCON ’10 RFP Is Open!
It’s that time of year again….and this year OSCON is back in Portland! The deadline for submitting your talk is Feb 1st, so if you’ve been building or learning awesome Open Source technology, don’t hesitate to get your proposal in. Remember that the process is competitive, so write your proposal with an eye toward what works and make sure to get it in before the deadline. Good luck!
