Monday, September 15, 2008

Gecko/WebKit Dichotomy

Many technology experts, specially those who are in the Web arena have started to talk about the WebKit rendering engine with the release of Google's Chrome browser which uses WebKit.

WebKit is an open-source HTML rendering engine that was developed by Apple. Being an extremely lightweight renderer and having smaller memory footprint have made it a popular choice for browser implementations. WebKit is mainly used in Apple's Safari and on the iPhone. On Google's side, it is used in Android mobile browser other than in Chrome.

Gecko was developed at Netscape and is known to be extremely powerful. But the issue with it is that most of its rich features come at an extra cost. Mostly they are memory overheads. And above all its code base is extensively complex.

The two main reasons behind the complex code base of Gecko is its XML-based user interface rendering framework called XUL and its component system called XPCOM. Mozilla's original application suite included a browser, a mail client, Web design tool and an IRC client. So XUL was supposed to be an all-in-renderer and not just a simple HTML renderer. XPCOM of course made the entire browser highly modular, but as stated earlier, all that comes at an extra cost.

When it came to Firefox 3, Gecko received a massive overhaul. Using the Cairo rendering framework enabled features like full-page zooming. Newest additions to Gecko includes support for CSS 3 which is already there in WebKit. With all this, Gecko is in a positions to compete without any hesitation with WebKit.

With all this, one of the most fascinating features of Gecko is that the new XUL runtime that comes with Firefox 3 will allow third-party application developers to come up with some cool applications that run on top of the Mozilla runtime.

So, nobody can ever say WebKit is better than Gecko or vise-versa as each has its own pros and cons.

No comments: