Fireship · @fireship
Build a Desktop App with Electron... But Should You?
Uploaded March 4, 2020 · Length 11:12
Summary
Build a desktop app with Electron, weighing its pros and cons, and creating a simple screen recorder.
- electron desktop app
- electron pros and cons
- electron screen recorder
- electron tutorial
- desktop app development
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
today's video is a practical beginners
- 0:02
guide to building desktop apps with
- 0:03
electron by the end of this video you
- 0:05
will built a desktop app that's
- 0:06
installable on Mac OS Windows and Linux
- 0:08
using nothing but HTML CSS and
- 0:10
JavaScript you'll learn how to combine
- 0:12
api's from the web no js' and electron
- 0:15
to build a desktop screen capture it
- 0:17
created some native menus captures a
- 0:19
video stream from your system and can
- 0:21
write the raw video file to your
- 0:23
filesystem now if you have no idea how
- 0:24
electron works make sure to check out my
- 0:26
100 seconds of code video on that topic
- 0:28
if you're new you're like and subscribe
- 0:29
and grab the full source code for this
- 0:31
project on fire ship IO now Before we
- 0:33
jump into the code and turn you into an
- 0:35
electron developer there is one thing
- 0:36
you should know a lot of people like to
- 0:38
talk [ __ ] about electron and to be
- 0:40
honest a lot of the criticism is valid
- 0:42
electron apps bundle chromium and nodejs
- 0:44
out of the gate and that tends to lead
- 0:46
to a very large app size even for a
- 0:48
simple app on top of that running
- 0:49
chromium can be a resource intensive so
- 0:51
your app will probably use more CPU and
- 0:53
RAM than a comparable app and
- 0:54
objective-c or a c-sharp but here's the
- 0:57
thing these drawbacks don't matter very
- 0:58
much for most developers when it comes
- 1:00
to the big picture
- 1:01
is fun fun I do bad things if you're a
- 1:04
web or nodejs developer electron offers
- 1:06
an amazing developer experience and it
- 1:08
makes desktop apps a practical business
- 1:09
decision for companies that would
- 1:11
otherwise not consider them even big
- 1:13
companies with tons of talent and cash
- 1:14
still choose electron because it makes
- 1:16
more business sense at the end of the
- 1:18
day the only thing that matters is that
- 1:19
you build an awesome user experience
- 1:21
which you can absolutely do with
- 1:22
electron and your users don't know or
- 1:24
care what technology you use to build
- 1:26
the app I think Winston Churchill said
- 1:27
it best electron is the worst desktop
- 1:29
architecture except for all the others
- 1:31
we've tried now that we have that out of
- 1:33
the way
- 1:33
let's take a closer look at the desktop
- 1:35
app we're building today it's a simple
- 1:37
screen recorder it takes one of the
- 1:38
windows that you have opened on your
- 1:40
desktop and turns it into a video stream
- 1:42
and then we preview that video stream in
- 1:43
our electron app when we click the
- 1:45
record button it will turn the stream
- 1:47
into an actual raw video file when you
- 1:49
click stop it will open another native
- 1:51
menu this time asking where you want to
- 1:52
save the file output and lastly it
- 1:54
writes the raw file to your system so
- 1:56
this will be a really fun project
- 1:57
because you'll need to use node.js for
- 1:59
certain things web technologies for


