![p1targetplatforms | Embarcadero RAD Studio Delphi C++Builder Blogs p1 target platforms](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2021/01/p1_target_platforms-8880465-6028187.jpg?resize=1140%2C628&ssl=1)
How do Delphi, WPF .NET Framework, and Electron perform compared to each other, and what’s the best way to make an objective comparison? Embarcadero commissioned a whitepaper to investigate the differences between Delphi, WPF .NET Framework, and Electron for building Windows desktop applications. The benchmark application – a Windows 10 Calculator clone – was recreated in each framework by three Delphi Most Valuable Professionals (MVPs) volunteers, one expert freelance WPF developer, and one expert Electron freelance developer. In this blog post, we are going to explore the Target Platforms metric which is part of the flexibility comparison used in the whitepaper. The calculator project focuses on Windows but both Delphi and Electron support more than just Windows. This article will explore the additional platform support of the frameworks.
![calc | Embarcadero RAD Studio Delphi C++Builder Blogs calc](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2021/01/calc-8541990.png?resize=509%2C462&ssl=1)
Table of Contents
Target Platforms
How many user platforms can the framework deploy an application to? Great frameworks will support most platforms on the market, whether mobile, desktop, 32-bit, or 64-bit. Businesses benefit from multi-platform support because they can develop and maintain one codebase to reach many customers. One codebase rather than separate code for each target application reduces development time, bug potential, maintenance requirements, and time-to-market for new features.
Delphi’s major advantage over WPF and Electron is that its FMX framework can deploy one body of source code as a binary to any major desktop or mobile platform, maximizing a business’s reach to customers and minimizing code duplication and maintenance/upgrade headaches. It can support projects of every size from logic controllers for industrial automation to world-wide inventory management, and be developed for every tier from a database-heavy back end to the GUI client-side of an application.
WPF with .NET Framework targets Windows computers directly and but the source code is only usage on other platforms with additional work. Additionally, .NET Framework is a legacy framework now according to Microsoft. The framework is primarily geared toward client-side desktop applications but can incorporate business logic in C# for middle-tier or back-end functions and access the ADO .NET Entity Framework for databases.
Electron is an open-source framework managed by GitHub (owned by Microsoft) targeting desktop operating systems such as Windows, macOS, and Linux through its Chromium browser base. Coding can be done using Javascript inside the browser webview or at the nodejs level. It focuses on client-side applications, typically web-centric, but uses node.js for middle-tier and back-end services. Delphi itself can also be used to build Electron application using third party solutions like TMS Web Core.
The numbers are pretty clear.
- 38.51% – Android
- 36.27% – Windows
- 14.12% – iOS
- 08.25% – macOS
- 00.83% – Linux
Find out more about device numbers in this blog post.
Let’s take a look at each framework.
Delphi
Delphi can compile to native 32-bit or 64-bit code for Windows using the VCL framework and compile to 32-bit or 64-bit code for Windows, macOS, Android, iOS, and Linux using the FMX framework. Delphi is the ultimate rapid application development environment for quickly developing high-performance native cross-platform applications in modern Object Pascal. Utilize powerful award winning visual design tools and an integrated toolchain for rapidly designing and developing visually stunning apps to reach billions of users on Windows, macOS, iOS, Android and Linux devices with a single codebase and responsive UI. Leverage powerful database access components, cloud libraries, and data binding technologies to confidently deliver projects on time and under budget. Independent developers and enterprise development teams love Delphi because it delivers 5x the development productivity across desktop and mobile platforms. A third party library called ScriptGate also allows a smaller and tighter WebView integration similar to Electron from within Delphi.
Platforms | Applications |
---|---|
32-bit Windows | 32-bit FireMonkey applications |
64-bit Windows | 64-bit FireMonkey applications |
macOS, either 32-bit (Delphi and C++) or 64-bit kernel (Delphi only) | 32-bit FireMonkey applications |
iOS Device – 32-bit (C++ and Delphi) or simulator (Delphi) | 32-bit FireMonkey applications |
iOS Device – 64-bit | 64-bit FireMonkey applications |
Android 32-bit, targeting Android devices | 32-bit FireMonkey applications |
Android 64-bit, targeting Android devices (Delphi) | 64-bit FireMonkey applications |
Linux – 64-bit (Delphi) | 64-bit FireMonkey applications |
![104bondidevices | Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/08/104bondi_devices.png?resize=750%2C601&ssl=1)
WPF .NET Framework
WPF .NET Framework can compile to managed code for Windows. As was found in the IP Security section of the whitepaper managed code like is used within WPF .NET Framework apps by default is easily decompiled and readable by end users. In 2021 Windows is only one of the major platforms out there. Building an app in WPF .NET Framework leaves a developer building all of the other platforms in a different tool or codebase. With the numbers above Windows is only 36.27% of the device market. By using WPF .NET Framework a developer is not able to target 63.73% of the devices on the market. Is .NET dead? is a common question people ask. According to Microsoft:
“To put it very simply, managed code is just that: code whose execution is managed by a runtime. In this case, the runtime in question is called the Common Language Runtime or CLR, regardless of the implementation (for example, Mono, .NET Framework, or .NET Core/.NET 5+). CLR is in charge of taking the managed code, compiling it into machine code and then executing it.”
![visualstudio9157906 | Embarcadero RAD Studio Delphi C++Builder Blogs visualstudio 9157906](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2021/02/visualstudio-9157906.png?resize=750%2C510&ssl=1)
Rolled out in November 2020, learn about the amazing transformations as well as some minute drawbacks in the .Net 5.0 framework.
Electron
Electron officially packages for cross-platform use within the Chromium browser rather than compiling to native code. The back end of an Electron app is NodeJS while the front end is JavaScript within Chromium. A developer must also choose a front end framework (or no framework) like Angular, Vue.js, React, and others. Based on the above platform numbers Electron can only target 45.35% of the devices out there leaving developers to target the other 54.65% of the devices with other solutions. It is possible there are third party solutions to have Electron run on Android and iOS but they can have an unstable life as Apple banned iOS apps built in Electron in an incident in 2019. Electron itself can be targeted as a platform from Delphi using the third party TMS Web Core framework.
- macOS – Only 64bit binaries are provided for macOS, and the minimum macOS version supported is macOS 10.10 (Yosemite). Native support for Apple Silicon (arm64) devices was added in Electron 11.0.0.
- Windows – Windows 7 and later are supported, older operating systems are not supported (and do not work). Both ia32 (x86) and x64 (amd64) binaries are provided for Windows. Native support for Windows on Arm (arm64) devices was added in Electron 6.0.8.. Running apps packaged with previous versions is possible using the ia32 binary.
- Linux – The prebuilt binaries of Electron are built on Ubuntu 18.04. Whether the prebuilt binary can run on a distribution depends on whether the distribution includes the libraries that Electron is linked to on the building platform, so only Ubuntu 18.04 is guaranteed to work, but following platforms are also verified to be able to run the prebuilt binaries of Electron: Ubuntu 14.04 and newer, Fedora 24 and newer, Debian 8 and newer
Let’s recap. Delphi supports Android, iOS, macOS, Windows, and Linux with native code in a single codebase and single UI. WPF .NET Framework is managed code on Windows only but some of the code may be portable. Electron officially supports macOS, Linux, and Windows through Javascript in a webview and nodejs. Delphi can also be used to target Electron via third party libraries. Overall Delphi providers broader and tighter deployment options than the other two frameworks.
Find out whats new in .NET 6 by checking out this article on the .NET Framework.
Explore all the metrics in the “Discovering The Best Developer Framework Through Benchmarking” whitepaper:
Download the Free Delphi vs. WPF vs. Electron for Windows Desktops Whitepaper
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition