Cross-Platform Software
Level 3 · Chips and platforms
What a software platform is, and why one program ships as many builds. Then how tools like Electron let one set of code serve them all.
Course contentsLesson 7 of 10
Level 1 · What an operating system does
Level 2 · The systems you will meet
Level 3 · Chips and platforms
Level 4 · Files, folders and apps
After this lesson you can
- Name the two parts of a software platform
- Explain why each platform needs its own build
- Weigh what Electron saves against what it costs
11 mincovers 3 glossary entries
Worth reading first: CPU Architectures, x86 and ARM
Why one program comes in many downloads
A software platform is the base a program runs on. Most often it is a system plus a chip family. Windows on x86-64 is one platform. macOS on ARM is another. A popular desktop app may ship six builds or more: Windows, macOS and Linux, each one for x86-64 and for ARM.
Each build is needed because both halves differ. The chip decides the machine code. The system decides how a program opens a window, saves a file or uses the network, because each one has its own system calls and libraries. Change either half, and the program has to be built again.
Cross-platform software is written once and runs on several platforms. There are two ways to get there. Some tools take the same code and build a separate copy for each platform. Others run the code inside a layer that hides the system, such as a web browser or the Java runtime.
Electron is the best-known layer for desktop apps. You write the app in HTML, CSS and JavaScript, the same as a web page. Electron packs it with the browser engine from Chrome and with Node.js. The result runs on Windows, macOS and Linux. Visual Studio Code and Slack are both built this way.
The cost is size. Every Electron app carries its own copy of the browser engine, so even a small one is a download of tens of megabytes. Run three of them, and you run three browsers. An app built straight for each system is smaller and quicker, but the team writes and tests more code.
Cross-platform never means test once. Small gaps still show up between systems. A file name that works on Linux may be banned on Windows. A shortcut uses Ctrl on Windows and Cmd on a Mac. A team ships one codebase, but it still needs a test run on every platform it promises.
People often think a web app and a desktop app built this way are the same thing. A web app runs inside the browser you already have. It needs no install. An Electron app brings its own browser and installs like any program. So it can read your files and work offline.
Worked example
A notes app meets Windows
Emma and Jack write a notes app in Electron. One set of code gives them builds for Windows, macOS and Linux in one afternoon.
The first Windows user reports a crash on a note called To do: Friday. A colon is not allowed in a Windows file name, so they add a check and ship a fix the same day.
The words for this lesson3
Check yourself
What is packed inside every Electron app?
Finished this lesson?
Marking it complete also marks its 3 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.