@@ -5,12 +5,70 @@ slug: /browser-engine
5
5
6
6
# Overview
7
7
8
- Cross-platform technologies that use a browser engine (also called rendering engine) to render
9
- their UI have been around for many years, more precisely since 2009. Chrome was released the year
10
- before and it was already the
11
- fastest browser thanks to its new [ V8] JavaScript engine. The web platform is becoming faster and
12
- sites more interactive. At the same time, iPhone (2007) and Android (2008) devices are becoming more
13
- and more popular, but it is complicated to find experienced developers, let alone for both.
8
+ Developers of this category use mainly HTML, CSS, and JavaScript to create their applications,
9
+ which are executed on a "browser engine". There are currently 3 actively maintained browser engines:
10
+
11
+ * [ Gecko]
12
+ * [ WebKit]
13
+ * [ Chromium]
14
+
15
+ These browser engines power not only "web browsers", but also any technology that uses these
16
+ language to create a User Interface ("Embedded browser engine"). While the foundation might be the
17
+ same, there are some key differences between these two sub-categories.
18
+
19
+ <!-- Venn diagram of browser engines, web browsers, embedded browser engine -->
20
+
21
+ ## Web browsers
22
+
23
+ With more than 4 billion internet users and 1.7 billion websites, the web is one (if not the most)
24
+ popular platform.
25
+
26
+ While websites started as a way to render documents back in 1990, they have come a long way. They
27
+ provide rich experiences with real time communication, video, and 3D graphics. They also adapt
28
+ dynamically to any form factor, work offline, send notifications, and more.
29
+ With all these new features and capabilities, browsers have had to evolve and become more like mini
30
+ OSes, protecting users from malicious attacks and poorly written code.
31
+
32
+ Tthe [ most used ones] [ statcounter ] are [ Chrome] ([ Chromium] ), [ Safari] ([ WebKit] ), and [ Firefox]
33
+ ([ Gecko] ). But even though they all are considered modern engines, they are not the same. Even for
34
+ the same browser there can be significant differences accross platforms (more notably on iOS where
35
+ they are force to be a wrapper around the WebKit's WebView).
36
+
37
+ As with all other technologies, there are pros and cons that developers need to evaluate. The main
38
+ questions to ask are around:
39
+
40
+ * Feature requirements and platform support
41
+ * Distribution and infrastructure
42
+
43
+ ### Feature requirements and platform support
44
+
45
+ As mentioned earlier, the Web API has become richer over the last few years. Yet there are features
46
+ that are still not available (nor they will be, like platform specific features).
47
+
48
+ It is important for developers to know what are the required features and if there is an API to
49
+ enable that. The [ capabilities status] [ Project Fugu ] website is a good place to learn about what is
50
+ already available or in development. Not all these APIs are supported by all browsers at the same
51
+ time, so developers need to additionally take into account what does their user base look like, if
52
+ there are alternatives that could be use, or if the experience they are planning could be
53
+ [ progressively enhanced] [ Progressive enhancement ] instead of rely entirely on it.
54
+
55
+ ### Distribution and infrastructure
56
+
57
+ ::: caution
58
+
59
+ This sections needs to be written. Some talking points are:
60
+
61
+ * _ Talk about server vs install file_
62
+ * _ Requiring a web server to deliver the app_
63
+
64
+ :::
65
+
66
+ ## Embedded browser engine
67
+
68
+ This sub-category has been around since 2009. Chrome was released the year before and it was already
69
+ the fastest browser thanks to its new [ V8] JavaScript engine. The web platform is becoming faster
70
+ and sites more interactive. At the same time, iPhone (2007) and Android (2008) devices are becoming
71
+ more and more popular, but it is complicated to find experienced developers, let alone for both.
14
72
15
73
To fill this opportunity [ Apache Cordova] is created (formerly PhoneGap): a mobile development
16
74
platform that uses the platforms’ WebView control (a control that allows you to render web content
@@ -44,7 +102,7 @@ main technical questions can be grouped in the following categories:
44
102
* Hosting language, features and hotpaths
45
103
* Inter-Process Communication layer
46
104
47
- ## Platform support and Rendering engine
105
+ ### Platform support and Rendering engine
48
106
49
107
At first it can be a bit surprising to group "Platform support" and "Rendering engine". The reason
50
108
is that they are intertwined and one impacts the other (and vice-versa). Technologies that bundle
@@ -54,7 +112,7 @@ Because iOS devices do not allow that, their teams usually limit themselves to d
54
112
to reach more platforms (i.e.: mobile as well), at the expense, in some cases, of quirks between the
55
113
different platforms or if the device is running an older version of the control.
56
114
57
- ## Hosting language, features and hotpaths
115
+ ### Hosting language, features and hotpaths
58
116
59
117
One common thing to this category is that most of the UI, if not all, is created using web
60
118
technologies (HTML, CSS and JavaScript). But the host could use a completely different language
@@ -76,10 +134,10 @@ A few questions that can help us make a decission are:
76
134
fastest possible version of an algorithm on the host and still have poor results if that
77
135
communication is done in an efficient way.
78
136
79
- ## Inter-Process Communication layer
137
+ ### Inter-Process Communication layer
80
138
81
139
While there are many browsers and cross-platform technologies, the reality is that there are not
82
- that many browser enginges (more about this in [ Web and PWA ] ) . In fact, most of the technologies
140
+ that many browser enginges as we have seen before . In fact, most of the technologies that render web
83
141
rely on Chromium or WebKit. Unsurprisingly, when using the same engine and the same web content all
84
142
these technologies show similar performance characteristics (memory, processes, threads...). It
85
143
makes sense, the cost of running a browser engine is considerably larger than any “overhead” that
@@ -130,10 +188,20 @@ There are many strategies in here, each one with its pros and cons:
130
188
[ Blazor Desktop ] : https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-1/#blazor-desktop-apps
131
189
[ Capacitor ] : https://capacitorjs.com/
132
190
[ CEF ] : https://bitbucket.org/chromiumembedded/cef/wiki/Home
191
+ [ Chromium ] : http://www.chromium.org/Home
192
+ [ Chrome ] : https://www.google.com/chrome/index.html
193
+ [ Edge ] : https://www.microsoft.com/en-us/edge
133
194
[ Electron ] : https://www.electronjs.org
134
195
[ Fetch API ] : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
196
+ [ Gecko ] : https://developer.mozilla.org/en-US/docs/Mozilla/Gecko
197
+ [ Firefox ] : https://www.mozilla.org/en-US/firefox/new/
135
198
[ NW.js ] : https://nwjs.io/
199
+ [ Progressive enhancement ] : https://developer.mozilla.org/en-US/docs/Glossary/Progressive_Enhancement
200
+ [ Project Fugu ] : https://web.dev/fugu-status/
201
+ [ Safari ] : https://www.apple.com/safari/
202
+ [ statcounter ] : https://gs.statcounter.com/browser-market-share
136
203
[ Tauri ] : https://tauri.studio/
204
+ [ Types of technologies ] : ../types.md
137
205
[ V8 ] : https://en.wikipedia.org/wiki/V8_(JavaScript_engine)
138
- [ Web and PWA ] : ../web/web.md
206
+ [ WebKit ] : https://webkit.org/
139
207
[ WebSockets ] : https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API
0 commit comments