<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexander Borisov on Medium]]></title>
        <description><![CDATA[Stories by Alexander Borisov on Medium]]></description>
        <link>https://medium.com/@lex.borisov?source=rss-4d9e62588c2c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ociB4hFiKfBVk30g.</url>
            <title>Stories by Alexander Borisov on Medium</title>
            <link>https://medium.com/@lex.borisov?source=rss-4d9e62588c2c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 03:59:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lex.borisov/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Browser != Browser engine]]></title>
            <link>https://medium.com/@lex.borisov/browser-browser-engine-35d2fb18eb07?source=rss-4d9e62588c2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/35d2fb18eb07</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[high-performance]]></category>
            <dc:creator><![CDATA[Alexander Borisov]]></dc:creator>
            <pubDate>Sat, 03 Mar 2018 23:27:06 GMT</pubDate>
            <atom:updated>2018-03-03T23:27:06.372Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*LK6BDkHYLHyDSFXtub65lA.png" /></figure><p>Hello everyone!</p><p>With this article I want to share my ideas for developing a proprietary browser engine. We are going to review the existing browsers and their engines. We will also spare a thought to Modest and learn something about its uneasy life.</p><p>This is going to be a set of articles, demonstrating our work on development of our own minimalistic browser engine. For illustrative purposes, each article will contain real-life codes and examples.<br>After approximately ten articles, we will already have a minimal working version of a browser engine — by “minimal” I mean really minimal. If by that time you are still eager to work, and the community is still showing some interest, we’re going to go even further and get to JS at last.</p><p>And, of course, the first thing to do is to understand what a browser and its engine really are.</p><h3>Browser and browser engine</h3><p>The modern world is hard to imagine without browsers. Browsers are used by a great number of devices: PСs, laptops, phones, gamepads. If we think about a browser as a car, the browser engine will be everything that is hidden under the bonnet of your car.<br>Browsers, as well as cars, can vary in their appearance and in what’s under the bonnet. Color, dashboard push-buttons, sound system, etc. Say, one has a V8 engine under the bonnet, while the other — just an oil leak.</p><p>Browser enables connectivity for the periphery and provides functionality to manage the engine and control its behavior along with provision of additional services.<br>Browser engine does all the messy job: loading, processing, visualization of data and all sorts of calculations.</p><p>It’s all quite the same as with cars. There’s a passenger compartment, where an accelerator and brake pedals are located as well as other switches that a user needs and knows well. And there’s also a greater mechanical part hidden under the bonnet.</p><h3>Who develops browsers and engines</h3><p>Many companies are developing their proprietary browsers: Google, Mozilla, Apple, Microsoft, Opera Software, Yandex, Vivaldi Technologies… really a lot of them.</p><p>Everyone is trying to add their own “shticks”, unique services into their browsers. Yandex, for instance (an extremely popular search engine in Russia) is integrating their search services.</p><p>Browser engines are, however, a completely different story. Here’s a list of engines, their developers and owners.</p><ul><li>Blink: Google</li><li>Gecko: Mozilla</li><li>WebKit: Apple</li><li>EdgeHTML: Microsoft</li></ul><p>These are the major owners and developers of browser engines. Certainly, they sometimes may engage third-party developers that work with certain conditions.</p><p>Let’s have a look at Chromium, the most popular Google project. This project runs with a Blink engine. Google is developing this project in cooperation with Intel, Facebook, IBM, LG Electronics, NVIDIA, Yandex. See the complete list <a href="https://chromium.googlesource.com/chromium/src.git/+/master/AUTHORS">here</a>.<br>Conditions presented by the companies that help develop Blink/Chromium are described in <a href="https://www.chromium.org/developers/contributing-code#TOC-Legal-stuff">Legal Stuff</a> section at Chromium project website. To put it simple — whatever you develop is not owned (at least, not exclusively) by Google.</p><p>Opera, Vivaldi, Yandex and other browsers use exactly this browser engine. And actually, truth to be told, any proclamations like “we’ve got our own browser” are not entirely true. Services can be independent and entirely “your own”, and the rest is owned by other companies. And this other company provides you with their browser engine based on certain conditions.</p><h3>Browser engine licenses</h3><p>Any open source code contains a license describing terms and conditions of use for this code, and browser engines are no exception to the rule.</p><p>Let’s make it clear: those licenses are ok, and that’s the extent of it. Nothing outstanding. Except for EdgeHTML that code is not public. Licensing calls for mutual openness.</p><p><a href="https://chromium.googlesource.com/chromium/src.git/+/master/third_party/WebKit"><strong>Blink</strong></a></p><p>Open source code, a fork of WebKit engine. Like WebKit, it has four licenses:</p><ul><li><a href="https://opensource.org/licenses/BSD-3-Clause">The 3-Clause BSD License</a></li><li><a href="https://opensource.org/licenses/bsd-license.php">The 2-Clause BSD License</a></li><li><a href="https://www.gnu.org/licenses/lgpl-2.0.html">GNU Lesser General Public License Version 2, June 1991</a></li><li><a href="https://www.gnu.org/licenses/lgpl-2.1.html">GNU Lesser General Public License Version 2.1, February 1999</a></li></ul><p>The most popular browser engine, It’s a part of Chromium project. This is the basis for Chromium. Based on this project, many create their own browsers.</p><p>As the Chromium’s <a href="https://chromium.googlesource.com/chromium/src.git/+/master/LICENSE">LICENSE</a> file reports, the project uses a 3-Clause BSD basic license. However, the project contains a third-party directory with a large amount of <a href="https://chromium.googlesource.com/chromium/src.git/+/master/third_party/">third-party</a> code upon which the project depends. That is, without this code you won’t be able to assemble your browser. And each third-party component uses its own license, different from what a LICENSE file reports.</p><ul><li><a href="https://opensource.org/licenses/Apache-2.0">Apache 2.0</a></li><li><a href="https://www.mozilla.org/en-US/MPL/2.0/">Mozilla Public License 2.0</a></li><li><a href="https://opensource.org/licenses/mit-license.php">MIT</a></li><li>etc.</li></ul><p><a href="https://github.com/mozilla/gecko-dev"><strong>Gecko</strong></a></p><p>Open source code, a single license:</p><ul><li><a href="https://www.mozilla.org/en-US/MPL/2.0/">Mozilla Public License 2.0</a></li></ul><p>This code is intensely developed by Mozilla and used in Mozilla’s Firefox browser. This code is also used in Tor Browser that ensures your web surfing is anonymous.</p><p>It’s not, however, the preferred choice for browser developers.</p><p><a href="https://webkit.org/getting-the-code/"><strong>WebKit</strong></a></p><p>Open source code, four licenses:</p><ul><li><a href="https://opensource.org/licenses/BSD-3-Clause">The 3-Clause BSD License</a></li><li><a href="https://opensource.org/licenses/bsd-license.php">The 2-Clause BSD License</a></li><li><a href="https://www.gnu.org/licenses/lgpl-2.0.html">GNU Lesser General Public License Version 2, June 1991</a></li><li><a href="https://www.gnu.org/licenses/lgpl-2.1.html">GNU Lesser General Public License Version 2.1, February 1999</a></li></ul><p>This is developed by Apple and used in their Safari browser. Formerly, a lot of companies used to leverage WebKit for their solutions, but leaving the project they turned to Google’s Blink.</p><p><a href="https://developer.microsoft.com/en-us/microsoft-edge/"><strong>EdgeHTML</strong></a></p><p>Closed source code, a proprietary license.</p><p>The engine is leveraged by Microsoft’s Edge browser that replaced Internet Explorer. It’s a brand new engine. The development of previous Trident (MSHTML) engine is suspended.</p><h3>Risks</h3><p>Using a third-party engine induces obvious risks:</p><ol><li>Source code closed</li><li>Key partners leaving the development project</li><li>Code licenses replaced</li></ol><p>No one can really guarantee that the source code of an open-source browser engine is always accessible for the general public. Also, key partners can leave the open-source engine development project, which actually means that the project is suspended.</p><p>The companies developing their proprietary browsers must clearly realize that everything only works fine until their activities pose no threat to or compete with the original browser/engine developers. I believe, it’s an obvious thing. Suppose, a company invests resources into development of their engine, and suddenly somebody else comes up who is using the same engine, and they eventually capture the market that the first company was targeting. I think, the reaction of the company is quite predictable, just see the list of risks above.</p><p>“We’re going to make a current copy of the engine and further develop it,” — that’s how browser developers using third-party engines tend to reply. And this is a great delusion. You can’t just go on with further development of an engine created by somebody else. You can’t hire some programming staff and set them out to code a browser engine. Coding a browser engine is a complicated workflow. And the list of engine owners confirms that.</p><p>For instance, Microsoft develops their proprietary engine, with closed source code though. Google was developing WebKit in collaboration with Apple. However, a Google eventually forked the project and started developing their Blink engine.</p><p>Also, you have to realize that a browser engine is a thing that evolves continuously. Specifications are constantly updated, new features added, current features are improved. This is an ongoing workflow. If you take a current engine and just leverage it for development of your own browser, the resulting browser will become obsolete in a year or two.</p><h3>Own engine</h3><p>First of all, we need to answer the major question: why would we develop our own browser engine? Or, more specifically — why should we not develop our own engine.</p><p><strong>You shouldn’t be started with developing your own engine, if:</strong></p><ul><li>You don’t have any intention to capture the market.</li><li>You just need a browser on a proforma basis. That’s a sort of fashion today, even a schooler would do that.</li><li>The developed engine won’t be any different from any currently existing: speed, reliability, adaptability.</li><li>Budget disbursement is under way.</li></ul><p>Currently, development of a proprietary browser based on a third-party engine is not a problem. There’s already a great number of browsers in the market, and the only way you can get a strong competitive gain is to develop your browser based exclusively on your proprietary components and your engine.</p><p><strong>Is it worth it to develop an engine for the purposes of earning money or creating a startup?</strong></p><p>This question deals mainly with its application. I can see a number of ways:</p><ol><li>Develop your proprietary fully functional browser. Collaborate with search engines and various services. Author special versions for governmental enterprises and agencies.</li><li>IoT (Internet of Things) market along with adaptation for TV sets, gamepads, mobile and portable devices.</li><li>Services on specific browser components. Smart website content risk analysis, for instance: prohibited comments, user posts, etc. Technical analysis of websites.</li><li>Engine sale. The simple way is to develop an engine for a customer company.</li></ol><h3>Conclusion</h3><p>It’s no doubt that authoring a browser engine is a complicated and resource intensive process. You should have a reasonable, clear and accurate development plan for that. Besides, this is not a product you can sell and get profit from at the intermediate development steps. Of course, you can try to adapt some components to suit the specific requirements of your customer companies, but I’m sure that this approach is time consuming and tends to drag out the entire workflow.</p><p>Development of a browser engine depends greatly upon the chosen method. What would you choose? An open or a closed source code?</p><p>I’m quite sure that where a company is developing a browser based on a third-party engine, they should really think about authoring a proprietary one.</p><h3>Set of articles</h3><ol><li>Browser!= Browser engine</li><li>Browser engine. Architecture, working with memory.</li><li>HTML parser. Tokenization, tokens processing, building a tree.<br>Authoring your own parser. Steps in an HTML parsing workflow, complexities, methods to exponentially speed up an HTML parser.</li><li>HTML encodings. Determine and convert the encodings.<br>Authoring the encoder and discussing the current situation.</li><li>CSS parser and CSS modules. Tokenization, tokens processing<br>Authoring our own CSS parser. Reviewing the major aspects of CSS processing. Identifying the issues, drilldown into the resource spend, authoring the fastest CSS/modules parser ever.</li><li>CSS parser. Grammar.<br>Authoring our own Grammar for CSS modules that quickly creates human-readable code.</li><li>CSS Selectors. Their structure and functions, rapid selector-based search for HTML elements.</li><li>Layout. Combine HTML and CSS.<br>Assign CSS properties to HTML elements. Analyze assignment procedure, priorities and action plan in response to ongoing CSS changes.</li><li>Layout. Streams. Support of CSS Display: block property.</li><li>Fonts. Calculate chars and string size.<br>Authoring our own font parser. Learn about the baseline, descender, x-height, storage of chars; drilldown into char size calculation methodology.</li><li>Layout. Support of CSS Display: inline property.</li></ol><h3>Something about Modest</h3><p>Some of you may know that I’m developing a browser engine. In <a href="https://www.reddit.com/user/lastmac/posts/">my Reddit posts</a> you can find a number of articled on the topic.</p><p>Regrettably, I had to suspend <a href="https://github.com/lexborisov/Modest">Modest</a> project. A while ago, the project was intensely developed by the company where I was previously employed. Sad but true, I had to leave the company. We had some disagreements that prevented us from going on with further developing the project. That’s a common thing that can happen.</p><p>However, I own all the rights for Modest, nobody claims this code (documents are properly executed and signed). So I decided to simply “bury” the code for a while in order not to produce false illusions. And I must put it clear: I’m burying the entire array of basic code including the code developed outside the company (mycore, myhtml). However, there’s an advantage for me. I probably got smarter now.</p><p>I spent a lot of time for investigating the specifications, thinking them over, searching for the best algorithms, drafting and prototyping, authoring <a href="https://github.com/lexborisov/myhtml">myhtml</a> (the fastest html parser) out of duty… so I just can’t leave that alone for good. I spent too much of my free time working overtime.</p><p>And now I’m into developing a new browser engine from scratch. It has no official name yet, just a working title — lexbor. The underlying code has already been created: memory options, common algorithms, the underlying structure for a future architecture. And this is all even better than it used to be. The bottom line — I’ve got the most important resource: technology and a clear view and understanding of what and how I’m developing.</p><p>However I simply can’t do it alone. If I fail to find the funding source, I will have to stop development and join some existing open-source engine (Blink or Gecko) as a contributor. Probably, I’ll make a shot at volunteering and try to promote some of my ideas and put them into practice.</p><p>Thank you for your attention!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35d2fb18eb07" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>