Is having a pure java web browser practical?

474    Asked by AdityaYadav in Java , Asked on Oct 10, 2022

 I know that a Java web browser is possible, but is it practical? I've seen the Lobo project and must admit I am impressed, but from what I've gathered it seems that development stopped in 2009. Would a browser coded in pure Java (no WebKit java bindings of any type) be able to compete with those among the ranks of Chrome or Firefox, or would it be inherently slower, hindering the user?

Answered by Ankit Chauhan

The programming language is, most likely, not going to be the stumbling block in having a pure java web browser. The JVM's mandatory memory management may be a disadvantage in some performance-critical parts (e.g. memory hunger; but then, Java's GC might actually be better at preventing memory leaks than anything you could roll yourself), and there are a few extra security concerns, but other than that, I see no obvious show stoppers.


However,

A web browser on the scale of Firefox or Chromium is a massive undertaking, and both projects have a huge body of experience behind them - Mozilla builds upon decades of browser building (and some famous failures), and Chrome/Chromium has both Google and Apple (a major force in the development of WebKit) behind it and absorbed a lot of knowledge and experience from KDE and other large rock-solid Open Source projects. Both additionally make use of dozens of battle-proven libraries, not only render engines, but all sorts of things. Vector graphics, font rendering, parsing, XML DOM Tree manipulation, networking, caching, cryptography, the list goes on and on, and you don't want to reinvent all those wheels yourself, because they are hard to do and easy to get wrong.

In short, building an industry-strength web browser is pretty damn hard, and that's the reason there is only a handful of success stories in this arena. The programming language has relatively little to do with it, although C and C++ are at an advantage, both technically and socially.



Your Answer

Interviews

Parent Categories