WEBVTT

1
00:00:00.120 --> 00:00:03.600
<v Speaker 1>Picture this, right, You are at a flea market in

2
00:00:03.600 --> 00:00:06.120
<v Speaker 1>New York City, just sort of wandering through the stalls,

3
00:00:06.160 --> 00:00:10.039
<v Speaker 1>and you spot this incredible piece of art.

4
00:00:10.320 --> 00:00:13.080
<v Speaker 2>Oh, I love a good flea market find.

5
00:00:12.919 --> 00:00:15.880
<v Speaker 1>Right, So it's this eighteen oh two illustration of a

6
00:00:15.919 --> 00:00:19.280
<v Speaker 1>woman from the Ottoman Empire, and you just you have

7
00:00:19.359 --> 00:00:21.399
<v Speaker 1>to have it. But there's a catch.

8
00:00:21.480 --> 00:00:22.399
<v Speaker 2>There's always a catch.

9
00:00:22.480 --> 00:00:25.480
<v Speaker 1>Always. The seller's packing up, they're actually flying back to

10
00:00:25.519 --> 00:00:28.160
<v Speaker 1>anchor of that very night. You don't have enough cash

11
00:00:28.199 --> 00:00:29.839
<v Speaker 1>on you, and of course they can't take a card.

12
00:00:30.679 --> 00:00:31.440
<v Speaker 1>So what do you do?

13
00:00:31.559 --> 00:00:33.439
<v Speaker 2>I mean normally you just walk away.

14
00:00:33.359 --> 00:00:36.039
<v Speaker 1>Right exactly, but not this time. You actually make a

15
00:00:36.119 --> 00:00:38.759
<v Speaker 1>verbal agreement, seal it with a handshake, walk away with

16
00:00:38.799 --> 00:00:41.479
<v Speaker 1>this priceless art under your arm, and you wire the

17
00:00:41.520 --> 00:00:43.280
<v Speaker 1>money internationally the very next day.

18
00:00:43.799 --> 00:00:46.600
<v Speaker 2>Wow. That is I mean, that is a massive leap

19
00:00:46.640 --> 00:00:47.039
<v Speaker 2>of faith.

20
00:00:47.200 --> 00:00:51.159
<v Speaker 1>It's totally wild, right, But that collision of old school

21
00:00:51.359 --> 00:00:55.119
<v Speaker 1>analog trust and modern execution is exactly what we are

22
00:00:55.159 --> 00:00:56.880
<v Speaker 1>unpacking today when it comes to software.

23
00:00:57.280 --> 00:01:00.320
<v Speaker 2>Yeah, and that specific anecdote, funnily enough, is actually how

24
00:01:00.320 --> 00:01:03.240
<v Speaker 2>the publisher acquired the physical cover art for the source

25
00:01:03.280 --> 00:01:05.319
<v Speaker 2>material we're pulling from today, Yes.

26
00:01:06.040 --> 00:01:10.159
<v Speaker 1>Which is this incredibly comprehensive engineering guide called Electron in

27
00:01:10.239 --> 00:01:13.719
<v Speaker 1>Action by Steve Kenney. It was published by Manning.

28
00:01:13.799 --> 00:01:16.599
<v Speaker 2>It's such a great book because we're basically looking at

29
00:01:16.640 --> 00:01:20.959
<v Speaker 2>a technology that takes something incredibly established, you know, traditional

30
00:01:21.400 --> 00:01:23.680
<v Speaker 2>native desktop applications.

31
00:01:23.159 --> 00:01:24.560
<v Speaker 1>Old school stuff, right.

32
00:01:24.439 --> 00:01:28.400
<v Speaker 2>And it completely rewires them using modern web technologies. And

33
00:01:28.640 --> 00:01:30.319
<v Speaker 2>I mean, if you are listening to this deep dive

34
00:01:30.400 --> 00:01:33.519
<v Speaker 2>right now, the odds are almost one hundred percent that

35
00:01:33.599 --> 00:01:35.879
<v Speaker 2>you are already relying on this architect Oh.

36
00:01:35.879 --> 00:01:38.599
<v Speaker 1>Absolutely, it's it's everywhere. Like if you use SLAG for

37
00:01:38.719 --> 00:01:41.959
<v Speaker 1>work messaging, or maybe visual Studio code for programming, or

38
00:01:42.000 --> 00:01:44.920
<v Speaker 1>even just the Brave browser for surfing the web, you

39
00:01:44.959 --> 00:01:45.959
<v Speaker 1>are using Electron.

40
00:01:46.200 --> 00:01:48.959
<v Speaker 2>Yeah. It is entirely hiding in planesight, it really is.

41
00:01:49.040 --> 00:01:52.319
<v Speaker 1>And it represents this this fundamental shift in how we

42
00:01:52.400 --> 00:01:55.480
<v Speaker 1>build for the desktop because for decades, you know, if

43
00:01:55.519 --> 00:01:58.000
<v Speaker 1>you wanted to build a native desktop application, you were

44
00:01:58.040 --> 00:02:02.560
<v Speaker 1>staring down this mass have totally fragmented engineering undertaking.

45
00:02:02.719 --> 00:02:05.280
<v Speaker 2>Oh it was a nightmare. You couldn't just write one app.

46
00:02:05.359 --> 00:02:09.759
<v Speaker 2>You had to learn entirely different programming languages and frameworks

47
00:02:09.840 --> 00:02:11.879
<v Speaker 2>for every single operating system.

48
00:02:12.120 --> 00:02:14.680
<v Speaker 1>Right, You'd need like C plus plus or maybe C

49
00:02:14.840 --> 00:02:18.400
<v Speaker 1>sharp to target Windows machines, and then you'd have to

50
00:02:18.520 --> 00:02:21.439
<v Speaker 1>completely pivot to objective C or Swift if you wanted

51
00:02:21.479 --> 00:02:22.800
<v Speaker 1>to be on macOS, and.

52
00:02:22.800 --> 00:02:25.800
<v Speaker 2>Then you might need a completely different toolkit like QT

53
00:02:26.039 --> 00:02:26.599
<v Speaker 2>for Linux.

54
00:02:26.759 --> 00:02:30.360
<v Speaker 1>Exactly, you're essentially funding and building the exact same application

55
00:02:30.479 --> 00:02:33.280
<v Speaker 1>three separate times, which is I mean, it's an absolute

56
00:02:33.360 --> 00:02:36.280
<v Speaker 1>nightmare for a solo developer or a startup.

57
00:02:35.919 --> 00:02:41.120
<v Speaker 2>It's cost prohibitive. But Electron it bypasses that fragmentation entirely.

58
00:02:41.199 --> 00:02:43.439
<v Speaker 2>It takes the holy trinity of web development. Right, So,

59
00:02:43.599 --> 00:02:45.960
<v Speaker 2>HTMLCSS and JavaScript.

60
00:02:45.360 --> 00:02:47.680
<v Speaker 1>This stuff everyone already knows exactly.

61
00:02:47.400 --> 00:02:50.240
<v Speaker 2>And it allows engineers to use those exact same tools

62
00:02:50.280 --> 00:02:54.919
<v Speaker 2>to build cross platform desktop applications from a single unified codebase.

63
00:02:55.280 --> 00:02:57.800
<v Speaker 2>You write it once and it compiles to a native

64
00:02:57.800 --> 00:03:00.360
<v Speaker 2>application for Mac Windows and Linux.

65
00:03:00.400 --> 00:03:04.159
<v Speaker 1>Which is basically magic. And the sources outline this really

66
00:03:04.240 --> 00:03:08.280
<v Speaker 1>helpful way to conceptualize this architectural shift. I kind of

67
00:03:08.280 --> 00:03:09.759
<v Speaker 1>want to try tweaking an analogy here.

68
00:03:09.840 --> 00:03:11.039
<v Speaker 2>If that's cool, Yeah, go for it.

69
00:03:11.360 --> 00:03:14.520
<v Speaker 1>So, if you think about traditional web development, it relies

70
00:03:14.719 --> 00:03:18.759
<v Speaker 1>entirely on a client server model, right. The user's browser

71
00:03:18.879 --> 00:03:21.599
<v Speaker 1>is really just a lightweight storefront all the heavy lifting,

72
00:03:21.960 --> 00:03:25.199
<v Speaker 1>the database, the file processing, all that business logic. It

73
00:03:25.240 --> 00:03:26.840
<v Speaker 1>happens on a distant server, right.

74
00:03:26.719 --> 00:03:29.280
<v Speaker 2>So the server is basically the kitchen, and the browser

75
00:03:29.360 --> 00:03:30.560
<v Speaker 2>is just the dining room exactly.

76
00:03:30.599 --> 00:03:33.520
<v Speaker 1>The browser is just where you eat. But if you

77
00:03:33.639 --> 00:03:36.360
<v Speaker 1>lose your Internet connection, the road from the dining room

78
00:03:36.360 --> 00:03:39.280
<v Speaker 1>to the kitchen is severed and the whole application just

79
00:03:39.479 --> 00:03:42.879
<v Speaker 1>it breaks. You get the dinosaur game, right, But an

80
00:03:42.919 --> 00:03:48.039
<v Speaker 1>Electron app fundamentally changes that architecture. Yeah, it is. It's

81
00:03:48.120 --> 00:03:50.439
<v Speaker 1>more like a high end food truck pulling right up

82
00:03:50.479 --> 00:03:51.520
<v Speaker 1>in your computer's driveway.

83
00:03:51.560 --> 00:03:52.199
<v Speaker 2>Oh I like that.

84
00:03:52.400 --> 00:03:55.120
<v Speaker 1>Yeah. It bundles the entire kitchen, like the whole back

85
00:03:55.199 --> 00:03:58.400
<v Speaker 1>end processing run time, and installs it directly on your

86
00:03:58.439 --> 00:04:01.879
<v Speaker 1>local hard drive right alongside the user interface. Everything required

87
00:04:01.879 --> 00:04:04.560
<v Speaker 1>to run the application is just totally self contained.

88
00:04:04.840 --> 00:04:08.360
<v Speaker 2>And you know, bundling that back end infrastructure locally that

89
00:04:08.520 --> 00:04:12.960
<v Speaker 2>alters the entire security paradigm, which is honestly why Electron

90
00:04:13.039 --> 00:04:16.000
<v Speaker 2>is so powerful. So well, think about when you visit

91
00:04:16.040 --> 00:04:21.160
<v Speaker 2>a website in a traditional browser. That browser actively sandboxes

92
00:04:21.199 --> 00:04:25.680
<v Speaker 2>the web application. It acts as this strict security perimeter.

93
00:04:25.399 --> 00:04:26.959
<v Speaker 1>Right because it doesn't trust the code.

94
00:04:26.920 --> 00:04:29.480
<v Speaker 2>Exactly, It assumes the code it just downloaded from a

95
00:04:29.560 --> 00:04:33.959
<v Speaker 2>random server is potentially hostile, so that browser explicitly blocks

96
00:04:34.000 --> 00:04:37.199
<v Speaker 2>the web app from reading your local file system, or

97
00:04:37.240 --> 00:04:40.519
<v Speaker 2>modifying your operating system menus, or running background processes.

98
00:04:40.560 --> 00:04:43.839
<v Speaker 1>But because an electron app is downloaded and explicitly installed

99
00:04:43.839 --> 00:04:48.040
<v Speaker 1>by the user, it completely bypasses that web sandbo That is.

100
00:04:47.959 --> 00:04:50.839
<v Speaker 2>The key mechanism. Yeah, by running an installer, the user

101
00:04:50.879 --> 00:04:55.199
<v Speaker 2>actively grants the application elevated native privileges. Yeah, the operating

102
00:04:55.240 --> 00:04:57.639
<v Speaker 2>system basically treats the exact same way it treats a

103
00:04:57.720 --> 00:05:01.839
<v Speaker 2>native C plus plus application. So the web code inside

104
00:05:01.839 --> 00:05:04.439
<v Speaker 2>the electron shell is suddenly allowed to read and write

105
00:05:04.439 --> 00:05:09.480
<v Speaker 2>local files, interact with USB devices, and function perfectly without

106
00:05:09.480 --> 00:05:10.360
<v Speaker 2>a network connection.

107
00:05:10.600 --> 00:05:14.120
<v Speaker 1>That is wild, and the text highlights some really crazy

108
00:05:14.680 --> 00:05:19.240
<v Speaker 1>real world examples of teams leveraging this, like Facebook built

109
00:05:19.240 --> 00:05:22.879
<v Speaker 1>an entire development environment called new clide with it, and

110
00:05:22.959 --> 00:05:26.560
<v Speaker 1>a company called Nihilis built this really heavy duty email client.

111
00:05:26.959 --> 00:05:29.879
<v Speaker 1>But the most striking example of that offline capability comes

112
00:05:29.920 --> 00:05:31.480
<v Speaker 1>from an agency called Wiredcraft.

113
00:05:31.639 --> 00:05:33.279
<v Speaker 2>Oh, the Me and Mar project.

114
00:05:33.560 --> 00:05:36.040
<v Speaker 1>Yeah, they needed to build an application to collect voter

115
00:05:36.120 --> 00:05:38.319
<v Speaker 1>registration data all across me and Mar.

116
00:05:38.199 --> 00:05:42.279
<v Speaker 2>Which is a region where relying on continuous Internet connectivity,

117
00:05:42.319 --> 00:05:43.800
<v Speaker 2>which is entirely unfeasible.

118
00:05:43.959 --> 00:05:47.079
<v Speaker 1>Yes, a traditional web app would be completely useless the

119
00:05:47.079 --> 00:05:50.920
<v Speaker 1>moment the connection dropped. But by using Electron, Wiredcraft was

120
00:05:50.959 --> 00:05:53.279
<v Speaker 1>able to use standard web developers to build a robust

121
00:05:53.319 --> 00:05:54.759
<v Speaker 1>Windows application.

122
00:05:54.560 --> 00:05:57.160
<v Speaker 2>And it stored all that data locally right exactly.

123
00:05:57.319 --> 00:05:59.759
<v Speaker 1>Its stored all the voter data locally on the machine's

124
00:05:59.759 --> 00:06:02.680
<v Speaker 1>hard and then it would automatically sync with the central

125
00:06:02.720 --> 00:06:05.639
<v Speaker 1>server whenever a network connection finally became available.

126
00:06:05.720 --> 00:06:06.519
<v Speaker 2>That's brilliant.

127
00:06:06.639 --> 00:06:10.000
<v Speaker 1>They achieved native offline stability and they didn't even need

128
00:06:10.040 --> 00:06:13.639
<v Speaker 1>to hire a specialized team of plus Windows engineers to

129
00:06:13.680 --> 00:06:13.959
<v Speaker 1>do it.

130
00:06:14.600 --> 00:06:17.959
<v Speaker 2>Now, it is definitely worth mentioning that Electron wasn't actually

131
00:06:18.000 --> 00:06:20.759
<v Speaker 2>the first framework to attempt this hybrid approach.

132
00:06:20.879 --> 00:06:22.319
<v Speaker 1>Oh right, there was an older one.

133
00:06:22.439 --> 00:06:26.399
<v Speaker 2>Yeah, it had a predecessor called NWJS, which some older

134
00:06:26.439 --> 00:06:30.839
<v Speaker 2>developers might remember as Node WebKit, but Electron eventually overtook

135
00:06:30.839 --> 00:06:34.000
<v Speaker 2>it as the absolute industry standard, mostly due to a

136
00:06:34.000 --> 00:06:36.040
<v Speaker 2>few critical architectural choices.

137
00:06:36.680 --> 00:06:40.920
<v Speaker 1>So what specifically made the industry pivot to Electron over

138
00:06:41.040 --> 00:06:44.399
<v Speaker 1>NWJS Again? Why did NWJS lose out?

139
00:06:44.600 --> 00:06:47.319
<v Speaker 2>The primary difference really lies in how they handled the

140
00:06:47.399 --> 00:06:51.920
<v Speaker 2>underlying browser engine. NWJS used a heavily customized, forked version

141
00:06:51.959 --> 00:06:52.920
<v Speaker 2>of the Chromium engine.

142
00:06:53.000 --> 00:06:55.600
<v Speaker 1>Okay, and four king is generally a headache, Yeah.

143
00:06:55.360 --> 00:06:59.399
<v Speaker 2>A massive headache. It meant every single time Google released

144
00:06:59.399 --> 00:07:02.720
<v Speaker 2>a new version of Chromium, the NWGS team had to

145
00:07:02.800 --> 00:07:05.839
<v Speaker 2>manually port all of their custom modifications over to the

146
00:07:05.879 --> 00:07:08.560
<v Speaker 2>new version. It just caused massive.

147
00:07:08.160 --> 00:07:10.240
<v Speaker 1>Delays, so they were always lagging behind.

148
00:07:10.319 --> 00:07:16.600
<v Speaker 2>Always. Electron conversely, relies on an completely unmodified standard release

149
00:07:16.639 --> 00:07:20.199
<v Speaker 2>of Chromium. Because they don't fork the engine, Electron can

150
00:07:20.360 --> 00:07:24.279
<v Speaker 2>rapidly update to the latest browser standards, sometimes within days

151
00:07:24.279 --> 00:07:25.399
<v Speaker 2>of a new release.

152
00:07:25.240 --> 00:07:28.399
<v Speaker 1>So developers always have access to the absolute bleeding edge

153
00:07:28.480 --> 00:07:29.399
<v Speaker 1>JavaScript futures.

154
00:07:29.439 --> 00:07:33.000
<v Speaker 2>Precisely, and beyond that, NWGS shared a single back end

155
00:07:33.040 --> 00:07:35.959
<v Speaker 2>process across every single window of the application, so if

156
00:07:36.000 --> 00:07:38.439
<v Speaker 2>one window crash, the whole thing goes down, the entire

157
00:07:38.480 --> 00:07:42.480
<v Speaker 2>application came down. But Electron enforces a strict separation of processes,

158
00:07:42.519 --> 00:07:46.240
<v Speaker 2>which creates a much more stable, resilient architecture. You add

159
00:07:46.240 --> 00:07:49.279
<v Speaker 2>in built in crash reporting and automated background updating, and

160
00:07:49.519 --> 00:07:53.360
<v Speaker 2>well it becomes pretty obvious why enterprise teams adopted it

161
00:07:53.399 --> 00:07:53.920
<v Speaker 2>so quickly.

162
00:07:54.079 --> 00:07:56.560
<v Speaker 1>Okay, so you just mentioned Chromium, which perfectly sets up

163
00:07:56.560 --> 00:07:59.680
<v Speaker 1>our next step here. To really understand how this local

164
00:07:59.720 --> 00:08:02.040
<v Speaker 1>food truck operates, we need to lift the hood.

165
00:08:02.199 --> 00:08:02.720
<v Speaker 2>Let's do it.

166
00:08:02.879 --> 00:08:07.720
<v Speaker 1>Electron achieves this by taking two massive, fundamentally different engineering

167
00:08:07.720 --> 00:08:11.759
<v Speaker 1>engines and just sort of bridging them together, the Chromium

168
00:08:11.839 --> 00:08:14.680
<v Speaker 1>content module and no JS.

169
00:08:15.199 --> 00:08:18.920
<v Speaker 2>It is an incredibly ambitious fusion. The Chromium content module

170
00:08:19.000 --> 00:08:22.680
<v Speaker 2>is responsible for parsing your HTML and CSS and actually

171
00:08:22.720 --> 00:08:24.519
<v Speaker 2>rendering it into a visual interface.

172
00:08:24.720 --> 00:08:26.600
<v Speaker 1>Right, and my understanding for the text is that the

173
00:08:26.680 --> 00:08:30.439
<v Speaker 1>content modules essentially the core rendering engine of Google Chrome, right,

174
00:08:30.839 --> 00:08:34.120
<v Speaker 1>like the blank rendering pipeline and the v eight JavaScript engine,

175
00:08:34.519 --> 00:08:37.159
<v Speaker 1>but without any of the actual Chrome browser wrapped around it.

176
00:08:37.279 --> 00:08:39.799
<v Speaker 2>That is a crucial distinction. It's basically the engine of

177
00:08:39.840 --> 00:08:42.879
<v Speaker 2>the car minus the leather seats in the stereo. You

178
00:08:42.919 --> 00:08:46.799
<v Speaker 2>get the world class rendering capabilities. But Electron completely strips

179
00:08:46.840 --> 00:08:49.240
<v Speaker 2>out all the consumer blow So no extensions, right. There

180
00:08:49.240 --> 00:08:53.440
<v Speaker 2>are no chromostensions, no bookmark syncting, no built in password managers,

181
00:08:53.919 --> 00:08:57.279
<v Speaker 2>and no PDF fewers. It is just the raw engine

182
00:08:57.320 --> 00:08:59.440
<v Speaker 2>required to turn code into pixels.

183
00:08:59.759 --> 00:09:02.559
<v Speaker 1>But I do have a question about that, because even

184
00:09:02.559 --> 00:09:06.600
<v Speaker 1>stripped down bundling an entire Chromium rendering engine inside every

185
00:09:06.600 --> 00:09:10.240
<v Speaker 1>single desktop app. That seems like a massive resource overhead.

186
00:09:10.320 --> 00:09:11.120
<v Speaker 2>It's definitely heavy.

187
00:09:11.200 --> 00:09:15.320
<v Speaker 1>Yeah, So why wouldn't Electron just use whatever default browser

188
00:09:15.519 --> 00:09:18.399
<v Speaker 1>the user already has installed on their machine to render

189
00:09:18.399 --> 00:09:21.879
<v Speaker 1>the interface? Like, why not just use their local Safari

190
00:09:21.919 --> 00:09:22.600
<v Speaker 1>your edge.

191
00:09:22.879 --> 00:09:24.879
<v Speaker 2>That's a great question, and it really comes down to

192
00:09:24.919 --> 00:09:26.360
<v Speaker 2>the concept of determinism.

193
00:09:26.519 --> 00:09:28.120
<v Speaker 1>Okay, determinist Right in.

194
00:09:28.080 --> 00:09:30.399
<v Speaker 2>Traditional web development, you build a site and you kind

195
00:09:30.399 --> 00:09:32.879
<v Speaker 2>of just cross your fingers hoping it looks the same

196
00:09:33.120 --> 00:09:36.320
<v Speaker 2>on a user's totally outdated version of Safari as it

197
00:09:36.480 --> 00:09:39.480
<v Speaker 2>does on like a brand new version of Firefox.

198
00:09:39.519 --> 00:09:41.879
<v Speaker 1>Oh, the cross browser compatibility nightmare.

199
00:09:41.679 --> 00:09:45.360
<v Speaker 2>Exactly, it's awful. But by bundling a specific, hard coded

200
00:09:45.440 --> 00:09:49.639
<v Speaker 2>version of Chromium directly inside the application, the developer guarantees

201
00:09:49.679 --> 00:09:54.279
<v Speaker 2>a perfectly deterministic environment. They know exactly which CSS features

202
00:09:54.320 --> 00:09:57.639
<v Speaker 2>are supported, they know exactly how the rendering pipeline behaves.

203
00:09:58.039 --> 00:10:02.120
<v Speaker 2>It completely eliminates the nightmare of cross browser compatibility testing.

204
00:10:02.399 --> 00:10:04.000
<v Speaker 1>Oh, that makes a lot of sense. You just bypass

205
00:10:04.039 --> 00:10:07.759
<v Speaker 1>the guesswork entirely. So you pair that highly predictable visual

206
00:10:07.759 --> 00:10:10.600
<v Speaker 1>engine with no JS, which is traditionally a server side

207
00:10:10.639 --> 00:10:13.399
<v Speaker 1>JavaScript run time. Yes, and Node is the piece that

208
00:10:13.440 --> 00:10:16.759
<v Speaker 1>provides the low level system access. So you have the

209
00:10:16.759 --> 00:10:20.720
<v Speaker 1>beautiful UI of Chromium essentially holding hands with the raw

210
00:10:20.720 --> 00:10:22.080
<v Speaker 1>filesystem power of Node.

211
00:10:22.159 --> 00:10:24.279
<v Speaker 2>And to keep those two engines from just stepping all

212
00:10:24.320 --> 00:10:28.879
<v Speaker 2>over each other's toes, Electron mandates a very strict process architecture.

213
00:10:29.799 --> 00:10:33.559
<v Speaker 2>In every Electron application, there is exactly one main process,

214
00:10:33.720 --> 00:10:37.279
<v Speaker 2>just one, just one, and this process runs purely in

215
00:10:37.320 --> 00:10:40.799
<v Speaker 2>no JS. It remains entirely invisible to the user. Its

216
00:10:40.879 --> 00:10:43.720
<v Speaker 2>sole job is to manage the application life cycle, handle

217
00:10:43.759 --> 00:10:46.840
<v Speaker 2>operating system integration, and sort of orchestrate things like native

218
00:10:46.840 --> 00:10:48.879
<v Speaker 2>application menus and system tree icons.

219
00:10:49.039 --> 00:10:51.360
<v Speaker 1>So the main process is basically the puppet.

220
00:10:50.960 --> 00:10:54.200
<v Speaker 2>Master, yes, exactly, and that single main process can then

221
00:10:54.240 --> 00:10:57.919
<v Speaker 2>spawn zero or more render processes. These are created using

222
00:10:57.919 --> 00:11:01.360
<v Speaker 2>an Electron module called browser window. Okay, and each renderer

223
00:11:01.399 --> 00:11:04.440
<v Speaker 2>process is an isolated instance of Chromium that displays an

224
00:11:04.440 --> 00:11:06.200
<v Speaker 2>actual window on the user's screen.

225
00:11:06.440 --> 00:11:08.360
<v Speaker 1>Okay, let's unpack this for a second, because I want

226
00:11:08.360 --> 00:11:10.799
<v Speaker 1>to push back on something that sources detail about these

227
00:11:10.879 --> 00:11:12.000
<v Speaker 1>renderer processes.

228
00:11:12.080 --> 00:11:12.399
<v Speaker 2>Sure.

229
00:11:12.600 --> 00:11:17.000
<v Speaker 1>The text notes that inside these UI windows, developers can

230
00:11:17.080 --> 00:11:21.600
<v Speaker 1>use the modern fetch API to ping third party servers directly, right,

231
00:11:22.200 --> 00:11:25.240
<v Speaker 1>they can scrape data from remote websites without routing the

232
00:11:25.279 --> 00:11:27.200
<v Speaker 1>requests through their own proxy server.

233
00:11:27.279 --> 00:11:28.279
<v Speaker 2>They absolutely can.

234
00:11:28.399 --> 00:11:32.720
<v Speaker 1>Well wait, doesn't that fundamentally bypass cross origin resource sharing

235
00:11:32.840 --> 00:11:37.679
<v Speaker 1>or cores, I mean, preventing a webscript from silently pinging

236
00:11:37.840 --> 00:11:42.399
<v Speaker 1>unverified external servers is like the foundational security policy of

237
00:11:42.399 --> 00:11:45.360
<v Speaker 1>the modern web. If Electron just turns off cores and

238
00:11:45.440 --> 00:11:48.000
<v Speaker 1>lets client side JavaScript do whatever it wants, isn't that

239
00:11:48.039 --> 00:11:49.600
<v Speaker 1>a massive vulnerability?

240
00:11:49.679 --> 00:11:52.159
<v Speaker 2>What's fascinating here is that it sounds alarming if you

241
00:11:52.240 --> 00:11:53.919
<v Speaker 2>view it through the lens of a web browser, but

242
00:11:53.960 --> 00:11:56.399
<v Speaker 2>you really have to shift your context to the desktop.

243
00:11:56.759 --> 00:11:58.440
<v Speaker 2>This goes entirely back to user.

244
00:11:58.200 --> 00:11:59.600
<v Speaker 1>Agency user agency. Right.

245
00:12:00.039 --> 00:12:02.200
<v Speaker 2>Visiting a URL is a passive action. You click a

246
00:12:02.279 --> 00:12:04.679
<v Speaker 2>link on a random forum and code starts executing on

247
00:12:04.720 --> 00:12:07.480
<v Speaker 2>your machine instantly. The web browser has to assume that

248
00:12:07.519 --> 00:12:10.759
<v Speaker 2>code is hostile, so it enforces cores to prevent data.

249
00:12:10.559 --> 00:12:12.879
<v Speaker 1>Theft because you didn't ask it to do anything other

250
00:12:12.919 --> 00:12:13.519
<v Speaker 1>than load.

251
00:12:13.360 --> 00:12:17.679
<v Speaker 2>A page exactly. But installing a desktop application is an active,

252
00:12:18.080 --> 00:12:19.200
<v Speaker 2>deliberate choice.

253
00:12:19.440 --> 00:12:22.720
<v Speaker 1>Ah, So by installing it, you are basically signing a

254
00:12:22.759 --> 00:12:23.679
<v Speaker 1>contract of trust.

255
00:12:23.840 --> 00:12:28.120
<v Speaker 2>Precisely, you are granting that software native authority. If a

256
00:12:28.159 --> 00:12:33.159
<v Speaker 2>developer writes a malicious native C plus plus application designed

257
00:12:33.159 --> 00:12:36.960
<v Speaker 2>to secretly ping a remote server, the operating system allows it.

258
00:12:37.519 --> 00:12:41.559
<v Speaker 2>Electron simply gives web developers that identical native capability.

259
00:12:41.639 --> 00:12:43.320
<v Speaker 1>So it's not a bug, it's a feature.

260
00:12:43.519 --> 00:12:46.159
<v Speaker 2>Right. The application is no longer operating in the public

261
00:12:46.200 --> 00:12:49.480
<v Speaker 2>sandbox of the Internet. It is an installed piece of software.

262
00:12:49.840 --> 00:12:52.600
<v Speaker 2>It basically removes the training wheels and hands the developer

263
00:12:52.679 --> 00:12:53.919
<v Speaker 2>the keys to the engine.

264
00:12:54.080 --> 00:12:57.399
<v Speaker 1>Okay, we are officially out of the sandbox, so let's

265
00:12:57.399 --> 00:13:01.320
<v Speaker 1>look at how this architectural shift radically simplifies building an

266
00:13:01.320 --> 00:13:05.639
<v Speaker 1>actual application. The text walks through constructing this starter project

267
00:13:05.639 --> 00:13:06.559
<v Speaker 1>called Bookmarker.

268
00:13:06.639 --> 00:13:08.759
<v Speaker 2>Oh, the bookmarker app. Yeah, that's a great example.

269
00:13:08.879 --> 00:13:11.600
<v Speaker 1>Yeah. The premise is pretty straightforward. The user pastes a

270
00:13:11.840 --> 00:13:14.759
<v Speaker 1>URL into a text field, the application fetches the title

271
00:13:14.759 --> 00:13:17.039
<v Speaker 1>of that remote web page, and it just says it

272
00:13:17.039 --> 00:13:17.559
<v Speaker 1>to a list.

273
00:13:17.840 --> 00:13:21.279
<v Speaker 2>And this project perfectly highlights the advantage of that deterministic

274
00:13:21.320 --> 00:13:24.960
<v Speaker 2>Chromium engine we discussed earlier. Because the developer knows exactly

275
00:13:25.120 --> 00:13:27.519
<v Speaker 2>which version of V eight is running, they don't need

276
00:13:27.559 --> 00:13:31.600
<v Speaker 2>to write any legacy fallback code for Internet.

277
00:13:31.159 --> 00:13:33.720
<v Speaker 1>Explorer eleven Oh, thank goodness.

278
00:13:33.799 --> 00:13:36.679
<v Speaker 2>Right, they can rely heavily on modern JavaScript standards.

279
00:13:36.799 --> 00:13:39.960
<v Speaker 1>Right. So the application takes the URL, uses the fetch

280
00:13:40.000 --> 00:13:43.279
<v Speaker 1>API to ping the target server directly from the client side,

281
00:13:43.600 --> 00:13:48.240
<v Speaker 1>and downloads the raw HTML string of the remote site. Now, normally,

282
00:13:48.279 --> 00:13:51.440
<v Speaker 1>if you have a massive string of raw eachtmail, you

283
00:13:51.519 --> 00:13:53.799
<v Speaker 1>need a pretty hefty third party library to parse through

284
00:13:53.840 --> 00:13:55.440
<v Speaker 1>it and find the specific data you want. Right.

285
00:13:55.519 --> 00:13:57.840
<v Speaker 2>You definitely would if you were operating purely in a

286
00:13:57.919 --> 00:14:00.960
<v Speaker 2>node back end. But because this code is actually running

287
00:14:01.000 --> 00:14:04.559
<v Speaker 2>inside a Chromium renderer process, the developer has access to

288
00:14:04.679 --> 00:14:08.120
<v Speaker 2>native browser APIs, so they can simply hand that raw

289
00:14:08.279 --> 00:14:11.399
<v Speaker 2>HTML string directly to the built in DOM parser object.

290
00:14:11.799 --> 00:14:15.240
<v Speaker 2>It instantly converts the text into a fully traversible object tree,

291
00:14:15.600 --> 00:14:18.320
<v Speaker 2>allowing them to extract the title tag with a single line,

292
00:14:18.360 --> 00:14:20.559
<v Speaker 2>a standard DOM manipulation.

293
00:14:20.279 --> 00:14:23.960
<v Speaker 1>That is incredibly elegant. And then to make sure the

294
00:14:24.039 --> 00:14:27.440
<v Speaker 1>data actually survives when the user quits the application or

295
00:14:27.480 --> 00:14:31.480
<v Speaker 1>reboots their computer, Bookmarker simply saves the list of links

296
00:14:32.159 --> 00:14:36.120
<v Speaker 1>using the browser's standard local storage API. No complex SQL

297
00:14:36.159 --> 00:14:39.480
<v Speaker 1>database required at all, None at all. But I love

298
00:14:39.519 --> 00:14:41.919
<v Speaker 1>this part of the text points out a really funny

299
00:14:42.039 --> 00:14:45.000
<v Speaker 1>practical trap that developers always fall into when they are

300
00:14:45.000 --> 00:14:46.519
<v Speaker 1>building their first Electron app.

301
00:14:46.600 --> 00:14:50.399
<v Speaker 2>Yes, the unintended navigation trap. It gets everyone, it's so funny.

302
00:14:50.519 --> 00:14:53.120
<v Speaker 1>So what does this all mean? When the user actually

303
00:14:53.440 --> 00:14:56.720
<v Speaker 1>clicks the saved link inside our app? Like the app

304
00:14:56.799 --> 00:14:59.159
<v Speaker 1>is working perfectly, the user has a beautiful list of

305
00:14:59.200 --> 00:15:01.200
<v Speaker 1>save links. What happens when they click one?

306
00:15:01.320 --> 00:15:04.840
<v Speaker 2>Well, because the renderer process is fundamentally just a Chromium browser,

307
00:15:05.200 --> 00:15:08.200
<v Speaker 2>it reacts exactly how a browser is programmed to react.

308
00:15:08.440 --> 00:15:11.720
<v Speaker 2>When a hyperlink is clicked, it immediately navigates the current

309
00:15:11.759 --> 00:15:13.360
<v Speaker 2>window to that new URL.

310
00:15:13.159 --> 00:15:16.279
<v Speaker 1>Which sounds totally fine until you realize, Yeah, our custom

311
00:15:16.320 --> 00:15:18.879
<v Speaker 1>Electron app doesn't have a back button, it doesn't have

312
00:15:18.919 --> 00:15:22.120
<v Speaker 1>an address bar. So the user clicks their saved article,

313
00:15:22.399 --> 00:15:26.120
<v Speaker 1>the UI just disappears, the web page loads, and they

314
00:15:26.120 --> 00:15:30.000
<v Speaker 1>are completely trapped inside that site. The only way out

315
00:15:30.039 --> 00:15:33.919
<v Speaker 1>is to actually force quit the entire application and relaunch it.

316
00:15:33.919 --> 00:15:37.039
<v Speaker 2>It is a perfect example of the mindset shift required

317
00:15:37.080 --> 00:15:40.799
<v Speaker 2>for Electron. You have to constantly remember you aren't building

318
00:15:40.799 --> 00:15:44.360
<v Speaker 2>a website, You're building native software that just happens to

319
00:15:44.480 --> 00:15:46.799
<v Speaker 2>use web rendering, So how do you fix it? To

320
00:15:46.879 --> 00:15:51.039
<v Speaker 2>fix this, developers utilize an Electron module called shell, and.

321
00:15:51.039 --> 00:15:54.039
<v Speaker 1>The logic here is brilliant. Instead of letting the click

322
00:15:54.159 --> 00:15:58.120
<v Speaker 1>execute normally, the developer writes an event listener to intercept

323
00:15:58.120 --> 00:16:01.679
<v Speaker 1>the click. They grab the URL, prevent the default navigation,

324
00:16:02.000 --> 00:16:04.480
<v Speaker 1>and then pass the URL to a command called shell

325
00:16:04.559 --> 00:16:05.960
<v Speaker 1>dot open external Yeah.

326
00:16:06.039 --> 00:16:08.919
<v Speaker 2>That command takes the request and basically bridges the gap

327
00:16:08.919 --> 00:16:11.679
<v Speaker 2>between the web app and the operating system. It asks

328
00:16:11.720 --> 00:16:15.480
<v Speaker 2>thes hey, what is the user's globally preferred application for

329
00:16:15.519 --> 00:16:16.559
<v Speaker 2>handling weblinks?

330
00:16:16.600 --> 00:16:19.480
<v Speaker 1>So it's asking the computer, not the app exactly.

331
00:16:20.039 --> 00:16:22.840
<v Speaker 2>The operating system then intercepts the intent and launches the

332
00:16:22.879 --> 00:16:26.200
<v Speaker 2>link in the user's actual external browser, whether that is Safari,

333
00:16:26.399 --> 00:16:27.440
<v Speaker 2>Edge or Firefox.

334
00:16:27.799 --> 00:16:32.519
<v Speaker 1>It hands the URL back to the native ecosystem. That's

335
00:16:32.519 --> 00:16:36.600
<v Speaker 1>so smart now. Bookmarker proves you can bypass network restrictions

336
00:16:36.639 --> 00:16:41.159
<v Speaker 1>and handle data natively. But a floating box of text

337
00:16:41.679 --> 00:16:44.320
<v Speaker 1>doesn't really feel like true desktop software.

338
00:16:44.440 --> 00:16:46.039
<v Speaker 2>No, it still feels a bit like a widget.

339
00:16:46.279 --> 00:16:49.720
<v Speaker 1>Right. To truly replace traditional applications, the UI needs to

340
00:16:49.759 --> 00:16:53.480
<v Speaker 1>seamlessly mimic the host operating system, and that leads us

341
00:16:53.519 --> 00:16:56.840
<v Speaker 1>to the next, much more sophisticated project in the source text,

342
00:16:56.879 --> 00:17:00.399
<v Speaker 1>which is a markdown text editor called firesaleire Cell.

343
00:17:00.320 --> 00:17:02.879
<v Speaker 2>Is an excellent case study in UI integration. It features

344
00:17:02.879 --> 00:17:06.319
<v Speaker 2>this dual pain interface. The user type's raw markdown formatting

345
00:17:06.359 --> 00:17:09.400
<v Speaker 2>on the left PAIN, and the application instantly renders it

346
00:17:09.440 --> 00:17:12.680
<v Speaker 2>as formatted HTML on the right PAIN using a library

347
00:17:12.720 --> 00:17:13.359
<v Speaker 2>called marked.

348
00:17:13.640 --> 00:17:16.720
<v Speaker 1>Structurally balancing those two columns is pretty trivial because the

349
00:17:16.759 --> 00:17:20.559
<v Speaker 1>developer can just use modern CSS flexbox without I'm constantly

350
00:17:20.599 --> 00:17:21.720
<v Speaker 1>worrying about browser support.

351
00:17:21.839 --> 00:17:23.839
<v Speaker 2>Yeah, the determinism strikes again exactly.

352
00:17:24.160 --> 00:17:26.720
<v Speaker 1>But where the source material gets truly fascinating is the

353
00:17:26.759 --> 00:17:30.119
<v Speaker 1>specific CSS techniques used to actively disguise the fact that

354
00:17:30.160 --> 00:17:31.640
<v Speaker 1>the interface is built with HTML.

355
00:17:31.680 --> 00:17:34.880
<v Speaker 2>Well, the typography integration is a total standout technique.

356
00:17:34.480 --> 00:17:36.799
<v Speaker 1>It really is. Yeah, because if you just define a

357
00:17:36.839 --> 00:17:41.839
<v Speaker 1>standard web font stack like Aerial or Helvetica, the application

358
00:17:41.920 --> 00:17:45.680
<v Speaker 1>will always look slightly foreign on a modern operating system,

359
00:17:45.920 --> 00:17:49.039
<v Speaker 1>it won't match the surrounding system menus. So instead the

360
00:17:49.079 --> 00:17:53.640
<v Speaker 1>developer applies a specific CSS declaration dot font menu.

361
00:17:53.920 --> 00:17:56.559
<v Speaker 2>And what makes that so powerful is that it isn't

362
00:17:56.640 --> 00:17:59.920
<v Speaker 2>just a static fun assignment. It's actually a dynamic queer.

363
00:18:00.359 --> 00:18:00.640
<v Speaker 1>Really.

364
00:18:00.799 --> 00:18:04.240
<v Speaker 2>Yeah. When Chromium reads font dot menu, it reaches out

365
00:18:04.279 --> 00:18:07.240
<v Speaker 2>to the underlying operating system's UI layer and asks what

366
00:18:07.440 --> 00:18:11.079
<v Speaker 2>is the currently active system font? So on macOS, it

367
00:18:11.119 --> 00:18:15.440
<v Speaker 2>instantly inherits Apple's San Francisco font. On Windows, it pulls

368
00:18:15.559 --> 00:18:16.400
<v Speaker 2>Cego UI.

369
00:18:16.640 --> 00:18:17.680
<v Speaker 1>That's amazing, it is.

370
00:18:17.759 --> 00:18:20.640
<v Speaker 2>The text rendering completely bridges the gap between web CSS

371
00:18:20.680 --> 00:18:23.119
<v Speaker 2>and the native C plus plus rendering of the OS.

372
00:18:23.400 --> 00:18:26.480
<v Speaker 1>The developer also tackles focus outlines in this project, which

373
00:18:26.480 --> 00:18:29.039
<v Speaker 1>is another huge tell. In a normal web browser, when

374
00:18:29.079 --> 00:18:31.640
<v Speaker 1>you click into an input field, usually get this glowing

375
00:18:31.680 --> 00:18:34.000
<v Speaker 1>blue ring around the box to show that it's active.

376
00:18:33.839 --> 00:18:37.839
<v Speaker 2>Right, which is vital for web accessibility. But native desktop

377
00:18:37.880 --> 00:18:39.359
<v Speaker 2>text editors don't really do that.

378
00:18:39.720 --> 00:18:43.359
<v Speaker 1>No, they don't. So by explicitly overriding that default web

379
00:18:43.359 --> 00:18:46.920
<v Speaker 1>behavior in the CSS, the application stops looking like a

380
00:18:46.920 --> 00:18:49.480
<v Speaker 1>web form and really starts feeling like a standalone tool.

381
00:18:49.599 --> 00:18:52.920
<v Speaker 2>But the most crucial polished technique discussed in the text

382
00:18:52.960 --> 00:18:57.720
<v Speaker 2>addresses a deeply ingrained psychological cueue, which is the white flash.

383
00:18:57.880 --> 00:19:01.319
<v Speaker 1>Oh yes, this solves something that has annoyed me for years.

384
00:19:01.920 --> 00:19:06.160
<v Speaker 1>Whenever you launch a heavy web wrapped desktop application, you

385
00:19:06.279 --> 00:19:12.279
<v Speaker 1>often get this jarring, blinding white screen for a fraction

386
00:19:12.359 --> 00:19:14.920
<v Speaker 1>of a second before the dom actually loads and paints

387
00:19:14.960 --> 00:19:15.440
<v Speaker 1>the interface.

388
00:19:15.559 --> 00:19:17.759
<v Speaker 2>It completely shatters the illusion, right it really does.

389
00:19:17.799 --> 00:19:20.720
<v Speaker 1>It screams, hey, I am a slow website trying to load.

390
00:19:20.839 --> 00:19:23.640
<v Speaker 2>It is an absolute dead giveaway of the underlying technology,

391
00:19:23.720 --> 00:19:26.680
<v Speaker 2>but the solution provided by electrons life cycle events is

392
00:19:26.680 --> 00:19:30.160
<v Speaker 2>incredibly elegant. When the main process executes the node code

393
00:19:30.160 --> 00:19:33.240
<v Speaker 2>to construct the browser window, the developer simply passes a

394
00:19:33.279 --> 00:19:36.000
<v Speaker 2>configuration property dot show false, so.

395
00:19:35.960 --> 00:19:38.799
<v Speaker 1>The chromium window is actually spawned in the system memory,

396
00:19:39.039 --> 00:19:41.079
<v Speaker 1>but it remains completely invisible to the user.

397
00:19:41.400 --> 00:19:43.920
<v Speaker 2>Correct the application is given the time it needs to

398
00:19:44.000 --> 00:19:48.079
<v Speaker 2>parse the HTML, execute the CSS, and fully render the

399
00:19:48.160 --> 00:19:51.640
<v Speaker 2>dawn tree entirely in the background. Meanwhile, the developer sets

400
00:19:51.720 --> 00:19:54.400
<v Speaker 2>up a listener for a specific life cycle event called

401
00:19:54.480 --> 00:19:57.319
<v Speaker 2>or ready to show, and then the instant the rendering

402
00:19:57.359 --> 00:20:00.279
<v Speaker 2>pipeline is complete and the pixels are ready, that event

403
00:20:00.319 --> 00:20:03.319
<v Speaker 2>fires and only then does the code called the show

404
00:20:03.359 --> 00:20:04.160
<v Speaker 2>method wow.

405
00:20:04.640 --> 00:20:07.200
<v Speaker 1>So the user double clicks the app icon in their dock,

406
00:20:07.680 --> 00:20:10.559
<v Speaker 1>and just a fraction of a second later, the fully formed,

407
00:20:10.599 --> 00:20:15.200
<v Speaker 1>perfectly rendered application simply materializes on the screen exactly. There's

408
00:20:15.200 --> 00:20:18.079
<v Speaker 1>no loading state, there's no white flash. It's a tiny

409
00:20:18.200 --> 00:20:22.960
<v Speaker 1>architectural detail, but psychologically it makes the software feel incredibly premium.

410
00:20:22.960 --> 00:20:27.319
<v Speaker 2>And responsive, and Firesale pushes that native integration even further

411
00:20:27.680 --> 00:20:31.279
<v Speaker 2>by bridging the gap to the operating system's native dialogue.

412
00:20:30.960 --> 00:20:32.000
<v Speaker 1>Like the filepicker window.

413
00:20:32.160 --> 00:20:34.240
<v Speaker 2>Yes, when you try to upload a file on a

414
00:20:34.240 --> 00:20:38.160
<v Speaker 2>standard website, the browser provides a very generic, restricted filepicker

415
00:20:38.200 --> 00:20:41.319
<v Speaker 2>it feels disjointed. But in Electron, the node based main

416
00:20:41.440 --> 00:20:45.400
<v Speaker 2>process can actually access the dialogue module, specifically the show

417
00:20:45.440 --> 00:20:46.640
<v Speaker 2>open dialogue.

418
00:20:46.240 --> 00:20:50.240
<v Speaker 1>Method, And because the main process has native OS privileges,

419
00:20:51.039 --> 00:20:56.880
<v Speaker 1>this method actually triggers the literal native C plus plus

420
00:20:56.880 --> 00:21:00.000
<v Speaker 1>file explorer window built into Windows or the mac os

421
00:21:00.279 --> 00:21:04.079
<v Speaker 1>exactly the exact same window that like Microsoft Word or

422
00:21:04.160 --> 00:21:07.440
<v Speaker 1>Adobe Photoshop uses. You can program it to only accept

423
00:21:07.440 --> 00:21:10.880
<v Speaker 1>text files or allow multi selection, and the user has

424
00:21:10.920 --> 00:21:13.720
<v Speaker 1>absolutely no idea they are interacting with the web application.

425
00:21:13.920 --> 00:21:14.880
<v Speaker 2>It is seamless.

426
00:21:15.279 --> 00:21:18.720
<v Speaker 1>Of course, all of this seamless integration sounds fantastic until

427
00:21:18.720 --> 00:21:21.440
<v Speaker 1>something breaks. So let's talk about the friction of actually

428
00:21:21.480 --> 00:21:24.279
<v Speaker 1>building this architecture. Yeah, because when you are smashing a

429
00:21:24.319 --> 00:21:27.240
<v Speaker 1>no JS server and a Chromium browser together into a

430
00:21:27.279 --> 00:21:31.559
<v Speaker 1>single concurrent application, how do you even begin to debug

431
00:21:31.599 --> 00:21:32.759
<v Speaker 1>it when the logic fails?

432
00:21:32.880 --> 00:21:35.480
<v Speaker 2>Oh? It has historically been one of the biggest headaches

433
00:21:35.480 --> 00:21:37.880
<v Speaker 2>of electron development. I can imagine because you have two

434
00:21:38.160 --> 00:21:42.079
<v Speaker 2>fundamentally different run times operating simultaneously and they are separated

435
00:21:42.119 --> 00:21:45.200
<v Speaker 2>by an interprocess communication bridge, so you have to adopt

436
00:21:45.240 --> 00:21:46.640
<v Speaker 2>a dual debugging strategy.

437
00:21:46.759 --> 00:21:48.519
<v Speaker 1>Let's break that down. Start with the front end, like

438
00:21:48.599 --> 00:21:50.480
<v Speaker 1>the UI running in the renderer process.

439
00:21:50.839 --> 00:21:54.680
<v Speaker 2>Well, the renderer process is straightforward because it's literally just

440
00:21:54.759 --> 00:21:59.119
<v Speaker 2>an unforked instance of Chromium debugging. It is identical to

441
00:21:59.160 --> 00:22:02.599
<v Speaker 2>debugging a website. You don't need specialized tools. You just

442
00:22:02.720 --> 00:22:05.319
<v Speaker 2>use what you know, right, You simply press the exact

443
00:22:05.440 --> 00:22:09.440
<v Speaker 2>same keyboard shortcut like command option ionomac and the familiar

444
00:22:09.519 --> 00:22:13.759
<v Speaker 2>Chrome developer tools slide open right inside your application. You

445
00:22:13.839 --> 00:22:16.720
<v Speaker 2>have full access to your console, the network tab, the

446
00:22:16.799 --> 00:22:18.799
<v Speaker 2>element inspector, it's all there.

447
00:22:19.119 --> 00:22:22.720
<v Speaker 1>That's familiar territory for any web developer. But what about

448
00:22:22.720 --> 00:22:26.240
<v Speaker 1>the main process, the node logic that handles the filesystem

449
00:22:26.279 --> 00:22:30.000
<v Speaker 1>and the native OS integration. Because you can't exactly inspect

450
00:22:30.240 --> 00:22:34.039
<v Speaker 1>system level node execution with browser dev tools, and that.

451
00:22:34.079 --> 00:22:38.079
<v Speaker 2>Is exactly where the architecture used to cause immense frustration historically,

452
00:22:38.160 --> 00:22:41.000
<v Speaker 2>using tools like node Inspector to trace execution across that

453
00:22:41.039 --> 00:22:45.599
<v Speaker 2>IPC bridge was frankly incredibly unreliable. The connection would just

454
00:22:45.680 --> 00:22:47.200
<v Speaker 2>drop or break points would drift.

455
00:22:47.240 --> 00:22:50.079
<v Speaker 1>That sounds infuriating, it was, so what is the modern

456
00:22:50.119 --> 00:22:51.759
<v Speaker 1>solution the text actually recommends.

457
00:22:52.000 --> 00:22:55.839
<v Speaker 2>The real breakthrough is leveraging an ID like visual Studio code,

458
00:22:56.160 --> 00:23:01.119
<v Speaker 2>which ironically is itself an Electron application. Creating a specific

459
00:23:01.119 --> 00:23:04.839
<v Speaker 2>configuration file called launch dot Jason within your project, you

460
00:23:04.880 --> 00:23:08.279
<v Speaker 2>can instruct vs code to attach its built in debugger

461
00:23:08.440 --> 00:23:11.599
<v Speaker 2>directly to the dedicated no debugging port of the Electron

462
00:23:11.680 --> 00:23:12.920
<v Speaker 2>main process.

463
00:23:12.559 --> 00:23:15.720
<v Speaker 1>Meaning you aren't flying blind anymore. You can actually set

464
00:23:15.720 --> 00:23:18.079
<v Speaker 1>brake points directly in your code editor.

465
00:23:18.240 --> 00:23:21.720
<v Speaker 2>Yes, you literally click the margin in your JavaScript or

466
00:23:21.720 --> 00:23:24.720
<v Speaker 2>tech script file to set a breakpoint. Start the application,

467
00:23:25.119 --> 00:23:28.160
<v Speaker 2>and the execution of the underlying VIGHT engine will physically

468
00:23:28.200 --> 00:23:30.119
<v Speaker 2>halt the moment it hits that line.

469
00:23:30.160 --> 00:23:31.079
<v Speaker 1>It is so cool.

470
00:23:31.160 --> 00:23:33.359
<v Speaker 2>You can step line by line through the native OS

471
00:23:33.480 --> 00:23:36.920
<v Speaker 2>level code, inspect variables in memory, and watch exactly how

472
00:23:37.039 --> 00:23:41.200
<v Speaker 2>your main process is interacting with the filesystem. It transforms

473
00:23:41.240 --> 00:23:44.039
<v Speaker 2>what used to be a chaotic dual environment nightmare into

474
00:23:44.079 --> 00:23:46.359
<v Speaker 2>a highly controlled, manageable workflow.

475
00:23:46.880 --> 00:23:50.160
<v Speaker 1>It is genuinely amazing how the tooling ecosystem has evolved

476
00:23:50.160 --> 00:23:53.680
<v Speaker 1>to support this hybrid architecture, So zooming out, let's kind

477
00:23:53.720 --> 00:23:55.039
<v Speaker 1>of synthesize what this all means.

478
00:23:55.160 --> 00:23:55.559
<v Speaker 2>Let's do it.

479
00:23:55.680 --> 00:23:59.440
<v Speaker 1>Electron represents a massive paradigm shift in how software is

480
00:23:59.480 --> 00:24:03.960
<v Speaker 1>created by creatively recycling the web technologies that millions of

481
00:24:04.000 --> 00:24:10.920
<v Speaker 1>developers already know, HTML, CSS, JavaScript, It completely democratizes native development.

482
00:24:11.119 --> 00:24:11.839
<v Speaker 2>It really does.

483
00:24:12.319 --> 00:24:16.240
<v Speaker 1>Individuals and small teams can now build these powerful cross

484
00:24:16.279 --> 00:24:22.279
<v Speaker 1>platform tools with direct filesystem access and offline capabilities, software

485
00:24:22.319 --> 00:24:26.119
<v Speaker 1>that historically required massive specialized engineering departments to pull off.

486
00:24:26.200 --> 00:24:28.759
<v Speaker 2>It takes the ubiquity of web skills and applies them

487
00:24:28.759 --> 00:24:30.240
<v Speaker 2>directly to the power of the desktop.

488
00:24:30.319 --> 00:24:33.720
<v Speaker 1>It absolutely does. But unpacking all of this raises a

489
00:24:33.799 --> 00:24:37.799
<v Speaker 1>genuinely profound question, based on the implications of Steve Kinney's text,

490
00:24:38.079 --> 00:24:41.240
<v Speaker 1>Think about the logical conclusion of this architecture. If tools

491
00:24:41.240 --> 00:24:45.319
<v Speaker 1>like Electron allow developers to recreate incredibly complex, high performance

492
00:24:45.359 --> 00:24:50.440
<v Speaker 1>desktop amosystems using nothing but pure web technologies, what happens

493
00:24:50.440 --> 00:24:52.799
<v Speaker 1>to the whole concept of the operating system in the future.

494
00:24:52.839 --> 00:24:54.880
<v Speaker 2>Oh, that is a fascinating thought experiment.

495
00:24:55.279 --> 00:25:00.200
<v Speaker 1>Right If every major application we rely on daily our

496
00:25:00.200 --> 00:25:03.480
<v Speaker 1>communication tools like Slack, our code, editors like bs code,

497
00:25:03.920 --> 00:25:07.359
<v Speaker 1>our music players like Spotify. If they're all ultimately just

498
00:25:07.759 --> 00:25:12.160
<v Speaker 1>highly privileged web browsers wearing clever disguises, does the underlying

499
00:25:12.160 --> 00:25:16.240
<v Speaker 1>operating system eventually become totally irrelevant? It makes you wonder,

500
00:25:16.279 --> 00:25:19.960
<v Speaker 1>because Windows or macOS eventually just become a glorified, invisible

501
00:25:19.960 --> 00:25:23.599
<v Speaker 1>bootloader whose only real purpose is to launch web applications.

502
00:25:23.680 --> 00:25:26.160
<v Speaker 2>If the canvas doesn't matter anymore, only the paint does.

503
00:25:26.359 --> 00:25:29.160
<v Speaker 1>Yes, yes, exactly, just like that handshake deal at the

504
00:25:29.160 --> 00:25:31.720
<v Speaker 1>New York flea market. The old world structure of the

505
00:25:31.799 --> 00:25:35.640
<v Speaker 1>native desktop operating system is simply providing a sturdy, antique

506
00:25:35.680 --> 00:25:38.599
<v Speaker 1>frame to display the vibrant modern art of the web.

507
00:25:38.519 --> 00:25:40.079
<v Speaker 2>A perfect way to frame the evolution.

508
00:25:40.480 --> 00:25:42.599
<v Speaker 1>Thank you for taking this deep dive with us. Keep

509
00:25:42.680 --> 00:25:45.240
<v Speaker 1>questioning the architecture the tools you use every day, and

510
00:25:45.319 --> 00:25:46.920
<v Speaker 1>keep exploring until next time.
