Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Code Reuse in Google Chrome Browser (catonmat.net)
58 points by bdfh42 on Sept 5, 2008 | hide | past | favorite | 13 comments


Thanks for the breakdown of the libraries. Very useful and interesting. (Also saves me time/energy this weekend.)


You're welcome!


Its quite refreshing to see good Software Engineering practices coming out of a large company like Google.


Well, they're google. "Do no evil," which tends to lead me to believe the opposite "do all good," which applies to their coding too ;)

Though they aren't doing all good according to some...I give them the benefit of a doubt.


Code reuse cuts the development time and brings down the defect rate. So it should be a good thing. Quite the opposite approach taken by the Mozilla guys. Those guys alsmost built their own everything (rendering engine, foundation classes, etc). There are a lot of open source libs there also, but i guess google wanted to focus on the minimal UI design and the per process architecture.


Also, consider when the original codebases were written. There was nothing to borrow when Netscape/Mozilla first took a crack at it, in many of these cases.


There was a reason for that (clue: how many platforms does Mozilla support? How many does Chrome).


The hard parts of writing a web browser are the rendering engine, the javascript engine, the transport layer and security code. The rest, comparatively, is trivial and there are cross-platform OSS libs for all of those.

etal got it right though -- Mozilla began as an OSS project in 1998, long before many of those libs were available.


Hmmm, so Mozilla is taking the Java Swing/Squeak Smalltalk strategy of ensuring cross-platform compatibility by doing everything yourself?



I disagree with such opposing view. 25 libraries would be a nightmare to get in just the right version, and specifically compiling a program with many libraries that aren't already compiled in Windows is usually a nightmare (at least with VC++, which I guess is what these guys are using together with Scons?), to compile the software. The idea that Chrome would automatically update in case one of such libraries changed, is probably not very convenient either as such updates could also break the code (because of changes in the interfaces for example, or in the behavior of libraries... while it's not very probable for each library, it becomes quite probable when you have 20+ libraries).


"Free Python library that implements SSL 3.0, TLS 1.0, and TLS 1.1. TLS"

Is Chrome using Python somehow or did they just pullout the underlying C code from the module?


It does not use Python directly. Python is used for testing various parts of Chrome, such as code coverage, dependencies, measures page load times, compares generated html, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: