Firefox: Product or Platform?

13 October 2011 by Matthew Gertner - Category: Rants and Ruminations

Steve Yegge’s sprawling Amazon vs. Google platform rant (linking to Hacker News as Steve has since pulled his original post) has finally spurred me to expand on something I wrote recently about Firefox:

In essence, Mozilla wants to focus on creating the best browser possible. The distractions inherent in maintaining a platform for third-party developers (then XULRunner, now sophisticated extensions) undeniably detract from this goal. But what if being the best browser, in the sense of being truly differentiated from the competition, actually means that Firefox must be a great platform? In tackling the Chrome insurgent by seeking parity with its rapid release schedule, simple extension API, sparser user interface, process-isolated tabs and so forth, Firefox may be losing its strongest reason for existing.

Firefox is underpinned by a remarkably flexible platform. Most of the core functionality of the browser is organized around components that can be accessed (usually from JavaScript as well as C++) via well-defined interfaces. The user interface is specified using a declarative markup language and can be modified almost arbitrarily using overlays that add, change or remove stuff. The component model resembles and is doubtless inspired by Microsoft, which has a muscular platform of its own (as Steve points out). The UI extensibility is far beyond anything I’ve seen in other desktop software.

The peerless extension ecosystem that has grown up around Firefox is a direct result of the strength of its platform. You can make Firefox do pretty much anything with an extension, including many things that the browser’s creators could never have imagined when they designed it. The platform is also the reason why many parties (present company included) have tried at various junctures to promote the platform-as-a-product known as XULRunner. Considering the scope of its ambitions, the platform seemed underutilized to them. This idea was considered and eventually rejected by Mozilla in 2007.

Various subsequent decisions and initiatives imply that Mozilla is now pursuing a path of “deplatformization” for Firefox: deCOMtamination, the thawing of all XPCOM interfaces, the death blow struck to binary XPCOM components and the new, much more limited Add-on SDK.

Granted, the Firefox platform faces many intimidating challenges. Inevitably, many interfaces could do with a redesign. XUL is proprietary and being overtaken by newer revisions of HTML. XBL is great when it works and baffling when it doesn’t, due to patchy error reporting. There is a general lack of good tools when compared to other modern software platforms. The macro-laden C++ syntax is ponderous and doesn’t make much use of the last 15 years of language innovations. More fundamentally, all the cool but unexpected extension functionality that hooks into relatively low-level platform features has put Firefox into a straightjacket that inhibits its evolution.

Killing off the platform is one solution. It’s hard not to be jealous of Chrome, a green-field development free of the shackles of third-party legacy code. Why not become more like Chrome then? Not a platform, just a damn good browser. Focus on responsiveness and minimalistic user interface design, arguably the main drivers of Chrome’s rise to 25% (or so) market share in only three years. Slim down the add-on SDK so that extension developers have enough rope to skip but not enough to hang themselves.

Perhaps this path will prove fruitful, but to me it’s hard to see how Chrome can be dethroned by chasing its tail. Firefox has a much stronger play to make: face the issues with the current platform head-on. Replace the XUL user interface with HTML 5. Develop and deploy tools on par with those available for iOS and .NET. Redesign interfaces that have proven inadequate (they’re mostly pretty good in my experience). Make a commitment to Firefox developers to converge on a set of stable, actively maintained and well-documented interfaces.

I won’t dwell on the arguments for why a strong platform is important. Steve Yegge makes a more compelling case in his 4500-odd words than I ever could. For Firefox the case has even more resonance because it represents a return to its platform-centric roots.


« - »
COMMENTS
  • Benoit Jacob

    This has been discussed many times and AFAIU the conclusion has always been that while having powerful extensions is nice, going beyond that and being a real ‘platform’ hasn’t paid off.

  • http://atlee.ca/blog/ Chris AtLee

    To me it’s wider than just Firefox, it’s what Mozilla as a whole is about. We’re fighting to keep the web open as a platform.

  • http://blog.kylehuey.com Kyle Huey

    I think we’ve shifted from thinking XUL/XBL/XPCOM is the platform to thinking the Web is the platform.

    Whether this is good or bad is an exercise left to the reader.

  • Colby Russell

    The Fennec UI will no longer be XUL:
    https://wiki.mozilla.org/Fennec/NativeUI

    Yegge’s Pinocchio Problem rant is orthogonal, but somewhat related:
    http://steve-yegge.blogspot.com/2007/01/pinocchio-problem.html

  • http://www.peppertop.com/ MarkC

    @Benoit: I would suggest that being a real platform hasn’t paid off because it’s never really been tried. Just saying “here’s a platform and a few docs, good luck” isn’t enough. There needs to be support, marketing and development beyond what’s required for Firefox. There needs to be recognition that platform consumers are also important, and their needs and concerns should be listened to and considered. None of this really happened, and the ability for a third party to consume the platform was almost an accidental by-product rather than a goal in its own right.

    @Chris AtLee: Yes, keeping the web open as a platform is vitally important, but it only addresses one part of a user’s computing experience (albeit an increasingly important part). Firefox lets me “view source” on a web page and learn from it. But it also lets me “view source” on Firefox itself, point the DOM inspector at it, and so on. Promoting the platform means more applications that can be inspected and deconstructed in a similar way to a web page, arguably extending users freedom.

    As for replacing XUL with HTML5, I would argue instead for a vocal and definite push to implement XBL2 (or something similar), then use that technology to reimplement XUL widgets as XBL-bound collections of HTML5 building blocks. Over time the UI can be migrated to native HTML5 widgets, but it wouldn’t need doing all at once. This puts XUL on a more standards-based track, as it is now just a thin veneer over the HTML5 and XBL2 standards. It provides a path for existing XUL apps to be migrated more easily. And in the event that another browser adopts XBL2 it allows the possibility of XUL running outside of Gecko.

  • Johan Sundström

    Good post, especially for seeing where and what you are, and that you can’t likely out-chrome chrome. Firefox fills an essential function for the evolvability of the web UI by third parties, as no other browser effectively exposes 100% of its functionality and presentation for tinkering (I should add: “for whomever goes to the trouble of figuring out how stuff works”) via add-ons.

    Sure, it will be a struggle feeding add-on developers enough tools support not to jump ship for delicious chrome devtools where the grass is already greener, but there are some somewhat effective other reasons primarily in the add-on eco system that make Firefox hard to replace, such as NoScript. You are making good progress with the new add-on design and the web console; keep up the good work, guys!