The Secret to Making Chrome
Google has
released a new browser,
"Google Chrome". It features quite
a few innovations: some user interface innovations include tabs above
the menus and URL bar, a single field combining the URL and search
fields, search and status bars that disappear when not in use and a home
page showing small versions of your 9 most-visited sites. Perhaps most
interestingly, it runs each tab and plug-in in a separate process so
errors or slow-downs in one cannot affect the rest. It also features a
strikingly fast JavaScript engine (for those fancy "Web 2.0" AJAX pages)
and some interesting security innovations like "scoping" pop-ups to
remain over the page that generated them. And it supports a porn mode...
sorry, "Incognito Mode" where no record is kept of your browsing (is
this because Google knows something about our browsing habits?).
But those are just the new innovations -- more impressive is the list
of "standard" browser features that Chrome supports. It correctly
renders the highly complex HTML and CSS standards, passing the
ACID2 test (it
fails ACID3, but still manages to
attain a higher score than Firefox or Internet
Explorer). It supports the HTTP protocol, with all its complexity like
content negotiation and compression, as well as HTTPS, FTP, and probably
a few others. It has special handling for downloads (showing downloads
in progress, locating them, etc. It implements the entire JavaScript
language, and can correctly display hundreds of thousands of popular
websites. It dynamically generates possible options as you type in the
URL bar (like the recently released Firefox 3 "awesome bar"). It comes
packaged with abilities or plug-ins for displaying flash, PDF, and all
common graphics formats. All in all, it is a full-featured browser,
quite capable of competing on features with Internet Explorer
7,
Firefox 3, Safari
3, or Opera
9. Whether it will compete in market share is
something only time will tell.
If you stop and think about it, this is an astounding accomplishment. A browser of this complexity is a HUGE piece of software -- Google Chrome is 1.6 gigabytes of code (that would take a typical person 20 years just to type in, much less debug!) Now, Google has a lot of extremely smart people working for them, but even so, this is an incredible achievement. Consider: at one point, Netscape was the "king of the internet", the company poised to take on Microsoft for domination of the computer industry. Then Netscape decided that most of their browser needed to be rewritten. Three years later, they released it... and in the meantime, Microsoft had won the first of the browser wars, and Netscape was an irrelevant subdivision of AOL.
Given Google's penchant for secrecy, it is difficult to say just how long they spent developing Chrome, but it is doubtful that it was under development for 3 years (perhaps more like 2). And many of the now "standard" features listed above didn't exist when Netscape 6 was written. So what is Google's secret, that allowed them to build this incredibly complex piece of software in an amazingly short period of time?
The answer is that Chrome is built on open source software. In fact, it uses at least 25 different software libraries! And we're talking about simple little helper utilities, the open source dependencies include "webkit" (the same HTML rendering engine that powers Safari), NSS (which provides all of the encryption needed for SSL and more), pthreads (which supports building a multi-threaded application) and sqllite (an entire database).
This is the new face of software development. Open source is
no longer an obscure, pseudo-communist hippie movement dedicated to
putting professional programmers out of business (it never was, despite
the fact that Microsoft once wanted us to believe it). Instead, it is an
essential part of building modern software applications.
Posted Mon 15 September 2008 by mcherm in Programming