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 Database Access metric which is part of the flexibility comparison used in the whitepaper. The calculator build itself does not use a database so the evaluations here are generally about the frameworks themselves.
Does the framework contain native libraries supporting database access? Data persistence is critical for many applications and must be user-friendly and integrated with any good development framework.
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. 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 the three major 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 ships with multiple database libraries that connect to nearly every database type on the market. Database access, queries, and data display are smoothly integrated through components accessible in the free Community Edition and at the first commercial license tier. While Delphi and WPF scored similarly in the whitepaper Delphi ships with a more integrated toolchain and more supported databases.
FireDAC is a Universal Data Access library for developing applications for multiple devices, connected to enterprise databases. With its powerful universal architecture, FireDAC enables native high-speed direct access from Delphi and C++Builder to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, DB2, SQL Anywhere, Advantage DB, Firebird, Access, Informix, DataSnap and more, including the NoSQL Database MongoDB.
FireDAC is a powerful, yet easy-to-use access layer that supports, abstracts, and simplifies data access, providing all the features needed to build real-world high-load applications. FireDAC provides a common API for accessing different database back-ends, without giving up access to unique database-specific features and without compromising on performance. Use FireDAC in Android, iOS, Windows, and Mac OS X applications you are developing for PCs, tablets and smartphones.
Below you can find the list of all FireDAC databases supported by RAD Studio. The list includes the minimum and maximum version supported on each release of RAD Studio.
|Database||FireDAC driver ID||Seattle (10.0)||Berlin (10.1)||Tokyo (10.2)||Rio (10.3)||Sydney (10.4)|
|SAP Advantage Database||ADS||v 8.0 – 10.1||v 8.0- 12.0||v 8.0 – 12.0||v 8.0 – 12.0||v 8.0 – 12.0|
|SAP SQL Anywhere||ASA||v 5.0 – 12.0||v 5.0 – 16.0||v 5.0 – 16.0||v 5.0 – 16.0||v 5.0 – 16.0|
|IBM DB2 Server||DB2||v 8.2 – 9.7||v 8.2 – 9.7||v 8.2 – 9.7||v 8.2 – 9.7||v 8.2 – 9.7|
|Firebird||FB||v 1.5 – 2.5||v 1.5 – 2.5||v 1.5 – 2.5||v 1.5 – 3.0||v 1.5 – 3.0|
|InterBase||IB||v 6.0 – XE7||v 6.0 – XE7||v 6.0 – 2017||v 6.0 – 2017||v 6.0 – 2020|
|IBM Informix||Infx||v 8.0 – 11.7||v 8.0 – 11.7||v 8.0 – 12.1||v 8.0 – 12.1||v 8.0 – 12.1|
|MongoDB||Mongo||v 3.0||v 3.0||v 3.0||v 3.0||v 3.0|
|Microsoft Access||MSAcc||95 – 2010||95 – 2010||95 – 2015||95 – 2015||95 – 2015|
|Microsoft SQL Server||MSSQL||2000 – 2008||2000 – 2008||2000 – 2016||2000 – 2017||2000 – 2017|
|MySQL Server||MySQL||v 3.21 – 5.5||v 3.21 – 5.6||v 3.21 – 5.7||v 3.21 – 6.x||v 3.21 – 8.0|
|MariaDB||MySQL||n/a||n/a||v 5.5 – 10.1||v 5.5 – 10.3||v 5.5 – 10.3|
|Oracle Server||Ora||v 8.0 – 11.2||v 8.0 – 12.1||v 8.0 – 12.1||v 8.0 – 12.1||v 8.0 – 12.1|
|PostgreSQL||PG||v 7.4 – 9.1||v 7.4 – 9.5||v 7.4 – 9.5||v 7.4 – 10.0||v 7.4 – 12.0|
|PostgreSQL Enterprise Server||PG||v 9.2||v 9.2||v 9.2||v 9.2||v 9.2|
|SQLite||SQLite||v 3.0 – 3.8.7||v 3.0 – 3.9.2||v 3.0 – 3.9.2||v 3.0 – 3.23.1||v 3.0 – 3.31.1|
|Teradata||TData||v 13.0 – 15.0||v 13.0 – 15.0||v 13.0 – 15.0||v 13.0 – 15.0||v 13.0 – 15.0|
|Generic ODBC sources||ODBC||v 2.0 – 3.0||v 2.0 – 3.8||v 2.0 – 3.8||v 2.0 – 3.8||v 2.0 – 3.8|
Additional database connections, tested using FireDAC ODBC Bridge driver:
|SAP Adaptive Server Enterprise||v 15.0|
|IBM DB2 AS/400||n/a|
|Pervasive SQL||v 10.0|
In addition to FireDAC, Delphi and RAD Studio have a rich third party ecosystem which provides many different commercial and open source database access solutions. You can even get to .NET libraries from Delphi and C++ through third party solutions like ATOZED Software’s CrossTalk.
WPF .NET Framework
WPF ships with access to database libraries, including ADO .NET Entity Framework, that enable database connections, queries, and entries through C# code. According to Microsoft .NET Framework only ships with the following data providers (source):
- .NET Framework Data Provider for SQL Server
- .NET Framework Data Provider for OLE DB
- .NET Framework Data Provider for ODBC
- .NET Framework Data Provider for Oracle
- .NET Framework Data Provider for SQL Server Compact 4.0
WPF .NET Framework received a high score in the whitepaper for database access because of the ODBC support. Other data providers are available from third parties. However, time is required to track down each different database library needed, install it, and keep it up to date.
Here is an example of the effort required to connect to an Oracle database from NodeJS for use in Electron:
Database connectivity packages are also available via a package manager as seen here:
All three frameworks have at least some way to access most databases. However, Delphi and RAD Studio ships with the most supported databases of all three frameworks. Additionally, because these database access components come with Delphi there is no extra time needed to track down and maintain third party libraries. Delphi does have a rich ecosystem of third party database access components which are optional to use. WPF .NET Framework is a legacy framework according to Microsoft and only ships with around 5 data providers (though to be fair you can get to a lot of databases through ODBC). Electron does not ship with any database access components but they are readily available through the NodeJS ecosystem and require extra effort to find and maintain which makes the solution brittle. Overall, Delphi provides a more flexible and integrated toolchain with more databases supported out of the box than the other two frameworks.