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 Project Variety metric which is part of the flexibility comparison used in the whitepaper.
One thing that needs to be clear about this comparison is that Delphi is a single integrated IDE with multiple platform targets and frameworks for a number of different uses across the entire stack. WPF is a “UI framework that creates desktop client applications” (in Microsoft’s own words) and Electron is one solution for building cross-platform desktop client apps. The frameworks included with Delphi are VCL and FMX plus the RTL (run-time library) and project types like Windows services, TCP/IP server solutions, console apps, DLLs, web solutions which target IIS and Apache, and more. Delphi allows you to create Windows desktop client applications like WPF and Electron but you can also build so much more in Delphi than just desktop client apps. Everything from web applications to mobile applications to desktop applications. This is not a comparison with NodeJS and C# which offer many solutions that address other types of apps as well.
Table of Contents
How does Project Diversity affect choosing an application framework?
Does the framework support development of different types of applications from stand-alone desktop apps to Windows services? Flexible frameworks allow developers to create mobile applications, desktop services, and everything in between.
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. Finally, Delphi’s standard libraries provide easy access to nearly every database type available and allow developers to access operating system functionality on every platform as well as interact with I/O devices and hardware sensors.
WPF with .NET Framework targets Windows computers directly and provides cross-platform support through a browser deployment from a similar codebase. 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. WPF can access Windows operating system functionality and I/O devices through .NET libraries but with managed code after compilation rather than native code.
Electron is an open-source framework targeting all desktop operating systems through its Chromium browser base. It focuses on client-side applications, typically web-centric, but uses node.js for middle-tier and back-end services. Electron provides hardware access from its node.js process and can access some but not all operating system functions via node.js libraries.
Let’s take a look at each framework.
Delphi can be used to create applications on all levels from Windows services to Programmable Systems-on-Chip (PSOC) to enterprise applications with database, UI, and network components. Third-party tools extend Delphi applications to the web.
Sample Of Showcase Applications Built In Delphi
WPF .NET Framework
WPF with the .NET Framework focuses on developing “visually stunning desktop applications”. It has access to all Windows .NET functionality, including database access and multimedia tools.
Electron applications mimic desktop applications by running in the Chromium browser and are typically web-centric (i.e. collaboration, messaging, etc.). Electron uses node.js for native services, utilities, and back-end applications.
Delphi Provides The Most Framework Flexibility
After reviewing all three frameworks, Delphi holds the lead in the flexibility category due to its flexible and automated deployment to all major platforms, scalability to every level of development, and visual design system. WPF with .NET Framework is competitive on the Windows platform but lacks the ability to compete on macOS or mobile devices. Finally, Electron has the fewest barriers to entry and the most development tool options but relies heavily on manual deployments, cannot target mobile devices directly by default, is the least scalable, and lacks the same hardware and operating system access of its competitors.