Jump to content

Delphi (software)

From Alfawiki
Delphi
Company typeSoftware suite
IndustrySoftware development
PredecessorBorland Turbo Pascal
FounderBorland
Area served
Worldwide
Key people
Marco Cantú (product manager)
ProductsDelphi programming language, Delphi IDE, VCL, FireMonkey, FireDAC
OwnerEmbarcadero Technologies
ParentEmbarcadero Technologies
Websitewww.embarcadero.com/products/delphi

Delphi is a versatile programming language and software suite that utilizes the Delphi variant of Object Pascal. It provides an integrated development environment (IDE) designed for rapid application creation targeting desktop, mobile, web, and console platforms. The product is currently developed and supported by Embarcadero Technologies.

Delphi compilers produce native code compatible with Microsoft Windows, macOS, iOS, Android, and Linux (x64). Its IDE features a code editor equipped with capabilities such as Code Insight (auto-completion), Error Insight (instant error detection), refactoring utilities, and a visual form designer that supports the Visual Component Library (VCL) for Windows applications and the cross-platform FireMonkey (FMX) framework. Database integration is facilitated through FireDAC components. Delphi is well-regarded for its rapid compilation speed, native code output, and enhanced developer efficiency.

Initially created by Borland as a tool for rapid application development following the success of Turbo Pascal, Delphi introduced comprehensive object-oriented programming support. Over time, it has evolved to include features such as generics, anonymous methods, closures, and native integration with the Component Object Model (COM).

Delphi and its C++ counterpart, C++Builder, are interoperable products marketed collectively under RAD Studio. Available editions range from Professional to Enterprise and Architect levels, each offering progressively advanced features and pricing tiers. Additionally, a free Community edition is offered for individual developers and small businesses subject to revenue limits.

Features

Delphi enables rapid application development (RAD) through its visual design environment and supports two main application frameworks: the Windows-focused Visual Component Library (VCL) and the cross-platform capable FireMonkey (FMX).

The language employed is the Pascal-derived Object Pascal, originally developed by Anders Hejlsberg for Borland (now IDERA) as the successor to Turbo Pascal. It supports native cross-compilation targeting Windows, Linux, iOS, and Android platforms.

For Microsoft Windows development and integration, Delphi offers independent support for the Component Object Model (COM) with reference counting mechanisms, alongside compatibility with numerous third-party components. Message handling is implemented through tagged class methods.

Comprehensive database connectivity is provided via VCL database-aware components. Recent releases incorporate improved runtime libraries, some of which have been contributed by the community-driven group FastCode.

Characteristics

Delphi employs a strongly typed, high-level programming language grounded in Object Pascal that emphasizes ease of use. Unlike traditional Pascal, it accommodates low-level programming tasks and interfaces seamlessly with assembly language. Its object-oriented capabilities include polymorphism based on classes and interfaces. Objects are managed through implicit reference dereferencing, minimizing manual memory handling requirements. Specialized reference-counted string types allow concatenation using the '+' operator while automatically managing memory allocation. Since Borland Developer Studio 2006, built-in utilities assist in detecting memory leaks.

The integrated IDE bundles a run-time library (RTL) along with VCL source code. A wide array of third-party components and enhancements for the IDE are available, including many free options. The IDE also provides graphical tools for localization and translation tasks; additional advanced functionality can be accessed via third-party extensions. VCL ensures strong source compatibility across versions to simplify migration efforts. The framework was an early adopter of dependency injection principles and employs an extensible reusable component architecture. Class helpers enable extending RTL and VCL classes without modifying their original source code.

Delphi supports an extensive selection of third-party database access libraries offering native connectivity to Oracle, SQL Server, MySQL/MariaDB, PostgreSQL, SQLite, InterBase/Firebird, among others. Universal data access solutions like DAC provide multi-database support alongside cloud service integration such as Salesforce and FreshBooks. These libraries receive frequent updates to ensure compatibility with the latest IDE versions (for example, RAD Studio 12), operating systems like macOS Sonoma, iOS 17, Android 13, as well as database engines including Oracle 23, SQL Server 2022, and PostgreSQL 16.

The single-pass optimizing compiler can create standalone executable files without dependencies on external DLLs. It also produces standard DLLs, ActiveX DLLs, COM automation servers, and Windows services.

Since Delphi 2005, the IDE’s refactoring capabilities have been enhanced to include features such as method extraction. It also supports generating or editing UML diagrams directly from source code.

Delphi benefits from active online user communities with direct involvement from its developers and maintains close collaboration with FireDAC component contributors.

Backward compatibility

Delphi offers nearly complete backward compatibility, allowing developers to extensively reuse previously written code. Although each new version aims to maintain this compatibility, the introduction of additional features and libraries can occasionally cause minor reductions.

Beginning in 2016, Delphi adopted a twice-yearly release schedule, typically unveiling support for new platforms every other release.

Frameworks

For creating visual applications, Delphi supports two main frameworks:

  • The Visual Component Library (VCL) is a well-established framework designed exclusively for Windows applications. It has been part of Delphi since its inception and continues to evolve.
  • FireMonkey (FMX), introduced in 2011 with Delphi XE2, is a cross-platform framework that supports Windows, macOS, iOS, Android, and Linux (x64). FMX uses Direct3D and OpenGL for rendering its graphical user interface and is not compatible with VCL. Nevertheless, FMX and VCL share non-visual code units, which enables code reuse across different platforms.

Interoperability

Delphi integrates closely with its C++ counterpart, C++Builder. They share fundamental elements such as the integrated development environment (IDE), VCL and FMX frameworks, and runtime libraries. Since C++Builder 6, it has been possible to combine Delphi and C++ source files within the same project, and packages compiled in C++Builder can be utilized in Delphi. In 2007, both tools were packaged together as RAD Studio but remain available separately or combined. With the release of Delphi Rio, interoperability with Python was also introduced.

Sample "Hello World" program

<syntaxhighlight lang="delphi"> program ObjectPascalExample;

type

 THelloWorld = class
   procedure Put;
 end;

procedure THelloWorld.Put; begin

 Writeln('Hello, World!');

end;

var

 HelloWorld: THelloWorld;

begin

 HelloWorld := THelloWorld.Create;
 HelloWorld.Put;
 HelloWorld.Free;

end. </syntaxhighlight>

Uses in schools

In 2016, Delphi was chosen as the preferred programming language for information technology education in schools across South Africa. Additionally, it forms part of the IT curriculum in Namibian educational institutions.

Roadmaps

Embarcadero released official "roadmaps" detailing future development plans up until November 2020 when version 10.5 was rebranded as 11.0. Since Delphi 11, formal roadmaps have been replaced by feature previews disseminated through blogs and webinars, with product manager Marco Cantú playing a prominent role via his blog.

Related software

  • Borland Enterprise Studio served as a predecessor to RAD Studio and included support for Delphi among several programming languages.
  • Borland Kylix, launched in 2001, was Delphi’s first Linux solution utilizing the CLX framework based on Qt; it was discontinued after version 3. Currently, Linux support is integrated into Delphi through the FireMonkey cross-platform framework.
  • InterBase is an embeddable SQL database closely integrated with both Delphi and C++Builder. It provides commercial-level security features, disaster recovery options, and multi-platform connectivity via ODBC, ADO.NET, and JDBC.
  • JBuilder functioned as a Java IDE built on Eclipse starting from JBuilder 2007.
  • RadPHP (later renamed HTML5 Builder) offered rapid application development tools for PHP including a form designer and debugger; it supported Web 2.0 technologies such as Ajax. Originally launched as Delphi for PHP in 2007 and renamed RadPHP in 2010, it was based on Qadram Q studio acquired by Embarcadero in 2011.
  • Delphi Prism (also known as Embarcadero Prism), derived from RemObjects’ Oxygene language, operated within Microsoft Visual Studio and replaced the discontinued Delphi.NET.
  • Free Pascal is an open-source compiler compatible with most Object Pascal code written for Delphi. The Lazarus IDE complements it by providing a cross-platform RAD environment powered by Free Pascal.

Prominent third-party libraries

  • FastCode – Offers improved runtime libraries along with optimized memory handling.
  • OpenWire (library) – A component set designed for managing data flow, event handling, and state synchronization.
  • Teechart – A sophisticated library specialized in charting and graphing capabilities.

Further reading

External links