Delphi (software)


Delphi is a programming language and an integrated development environment for rapid application development of desktop, mobile, web, and console software, currently developed and maintained by Embarcadero Technologies which uses an event-driven paradigm. The language is also called Object Pascal.
Delphi's compilers generate native code for Microsoft Windows, macOS, iOS, Android and Linux. Since 2016, there have been new releases of Delphi every six months, with new platforms being added approximately every second release.
Delphi includes a code editor, a visual designer, an integrated debugger, a source code control component, and support for third-party plugins. The code editor features Code Insight, Error Insight, and refactoring. The visual forms designer has traditionally used Visual Component Library for native Windows development, but the FireMonkey platform was later added for cross-platform development. Database support in Delphi is very strong. A Delphi project of a million lines of code can compile in a few seconds – one benchmark compiled 170,000 lines per second.
Delphi was originally developed by Borland as a rapid application development tool for Windows as the successor of Turbo Pascal. Delphi added full object-oriented programming to the existing language, and since then the language has grown to support generics and anonymous methods, and native Component Object Model support. In 2006, Borland’s developer tools section was transferred from Borland to a wholly owned subsidiary known as CodeGear, which was sold to Embarcadero Technologies in 2008. In 2015, Embarcadero was purchased by Idera Software, but the Embarcadero mark was retained for the developer tools division.
Delphi and its C++ counterpart, C++Builder, are interoperable. They share many core components, notably the IDE, VCL, and much of the runtime library. In addition, they can be used jointly in a project. For example, C++Builder 6 and later can consume Delphi source code and C++ in one project, while packages compiled with C++Builder can be used from within Delphi. In 2007, the products were released jointly as RAD Studio, a shared host for Delphi and C++Builder, which can be purchased with either or both.

Features

Delphi supports rapid application development. Among the features supporting RAD are the application framework and the visual designer. Delphi uses the Pascal-based programming language called Object Pascal introduced by Borland. It supports native cross-compilation. Its visual designer has traditionally used Visual Component Library for RAD.
To better support development for Microsoft Windows and interoperate with code developed with other software development tools, Delphi supports independent interfaces of Component Object Model with reference counted class implementations, and support for many third-party components. Interface implementations can be delegated to fields or properties of classes. Message handlers are implemented by tagging a method of a class with the integer constant of the message to handle.
Database connectivity is extensively supported through the many VCL database-aware and database access components.
Later versions have included upgraded and enhanced runtime library routines provided by the community group FastCode, established in 2003.

Characteristics

Delphi uses a strongly typed high-level programming language, intended to be easy to use and originally based on the earlier Object Pascal language. Pascal was originally developed as a general-purpose language "suitable for expressing the fundamental constructs known at the time in a concise and logical way", and "its implementation was to be efficient and competitive with existing FORTRAN compilers" but without low-level programming facilities or access to hardware. Turbo Pascal and its descendants, including Delphi, support access to hardware and low-level programming, with the facility to incorporate code written in assembly language and other languages. Delphi's object orientation features only class- and interface-based polymorphism. Metaclasses are first class objects. Objects are actually references to the objects, which Delphi implicitly de-references, so there is usually no need to manually allocate memory for pointers to objects or use similar techniques that some other languages need. There are dedicated reference-counted string types, and also null-terminated strings.
Strings can be concatenated by using the '+' operator, rather than using functions. For dedicated string types Delphi handles memory management without programmer intervention. Since Borland Developer Studio 2006 there are functions to locate memory leaks.
Delphi includes an integrated IDE. The Delphi products all ship with a Visual Component Library, including most of its source code. Third-party components and tools to enhance the IDE or for other Delphi related development tasks are available, some free of charge. The IDE includes a GUI for localization and translation of created programs that may be deployed to a translator; there are also third-party tools with more features for this purpose. The VCL framework maintains a high level of source compatibility between versions, which simplifies updating existing source code to a newer Delphi version. Third-party libraries may need updates from the vendor but, if source code is supplied, recompilation with the newer version may be sufficient. The VCL was an early adopter of dependency injection or inversion of control; it uses a-"re-usable" component model, extensible by the developer. With class helpers new functionality can be introduced to core RTL and VCL classes without changing the original source code of the RTL or VCL.
The compiler is optimizing and single pass. It can optionally compile to a single executable which does not require DLLs. Delphi can also generate standard DLLs, ActiveX DLLs, COM automation servers and Windows services.
The Delphi IDEs since Delphi 2005 increasingly support refactoring features such as method extraction and the possibility to create UML models from the source code or to modify the source through changes made in the model.
Delphi has large communities on Usenet and the web. When Delphi was owned by Codegear, many of its employees actively participated.

Backward compatibility

Each new release of Delphi attempts to be as compatible as possible with earlier versions, so that already-developed software and libraries can be retained. Incompatibility necessarily arises as new functionality is added.

Limitations

Although each new release of Delphi attempts to keep as much backwards compatibility as possible to allow existing code reuse, new features, new libraries, and improvements sometimes make newer releases less than 100% backwards compatible. For example, the design of the standard class libraries had become somewhat dated and restrictive; Embarcadero released in 2011 as part of Delphi XE2 a new compiler and cross-platform VCL replacement called FireMonkey, based on Direct3D and OpenGL, which runs on other platforms in addition to Windows, supporting their features, but is not fully backwards-compatible with VCL applications. FireMonkey applications do however allow easy sharing of non visual code units with VCL applications, enabling a lot of code to be ported easily between the platforms.

Issues

Some releases of Delphi have been reported to be unstable. Delphi XE7, in particular, was often reported to be slow and subject to severe memory leaks.

Code examples

To show a message:

procedure TForm1.ShowAMessage;
begin
ShowMessage;
end;

To give a label a caption using the VCL:

procedure TForm1.ShowSomethingOnCreate;
begin
Label1.Caption := 'Hello World!';
end;

To give a label text using FireMonkey:

procedure TForm1.ShowSomethingOnCreate;
begin
Label1.Text := 'Hello World!';
end;

History

Delphi was originally one of many codenames of a pre-release development tool project at Borland. Borland developer Danny Thorpe suggested the Delphi codename in reference to the Oracle at Delphi. One of the design goals of the product was to provide database connectivity to programmers as a key feature and a popular database package at the time was Oracle database; hence, "If you want to talk to Oracle, go to Delphi".
As development continued towards the first release, the Delphi codename gained popularity among the development team and beta testing group. However, the Borland marketing leadership preferred a functional product name over an iconic name and made preparations to release the product under the name "Borland AppBuilder".
Shortly before the release of the Borland product, Novell AppBuilder was released, leaving Borland in need of a new product name. After much debate and many market research surveys, the Delphi codename became the Delphi product name.
The chief architect behind Delphi was Anders Hejlsberg, who had developed Turbo Pascal. He was persuaded to move to Microsoft in 1996.
On February 8, 2006 Borland announced that it was looking for a buyer for its IDE and database line of products, including Delphi, to concentrate on its ALM line. On November 14, 2006 Borland transferred the development tools group to an independent subsidiary company named CodeGear, instead of selling it. Borland subsequently sold CodeGear to Embarcadero Technologies in 2008. Embarcadero retained the CodeGear division created by Borland to identify its tool and database offerings, but identified its own database tools under the DatabaseGear name. In 2015, Embarcadero was purchased by Idera Software, but the Embarcadero mark was retained for the developer tools division.

Early Borland years (1995–2003)

; Borland Delphi
Delphi was released in 1995 for the 16-bit Windows 3.1, and was an early example of what became known as Rapid Application Development tools. Delphi evolved from Borland's "Turbo Pascal for Windows", itself an evolution with Windows support from Borland's Turbo Pascal and Borland Pascal with Objects, very fast 16-bit native-code MS-DOS compilers with their own sophisticated integrated development environment and textual user interface toolkit for DOS. Early Turbo Pascal was written in a dialect of the Pascal programming language; in later versions support for objects was added, and it was named Object Pascal. Delphi has always used Object Pascal, which continued to be developed, as its underlying object-oriented language.
; Borland Delphi 2
Delphi 2, released in 1996, supported 32-bit Windows environments. Delphi 1 was bundled with it for creation of 16-bit Windows 3.1 applications. New Quickreport components replacing Borland ReportSmith.
; Borland Delphi 3
Delphi 3, released in 1997, added new VCL components encapsulating the 4.71 version of Windows Common Controls, TDataset architecture separated from BDE, DLL debugging, the code insight technology, component packages, component templates, DecisionCube and Teechart components for statistical graphing, WebBroker, ActiveForms, MIDAS three tier architecture, component packages and integration with COM through interfaces.
;Inprise Delphi 4
Inprise Delphi 4 was released in 1998. IDE came with a completely overhauled editor and became dockable. VCL added support for ActionLists anchors and constraints. Additional improvements were method overloading, dynamic arrays, Windows 98 support, Java interoperability, high performance database drivers, CORBA development, and Microsoft BackOffice support. It was the last version shipped with Delphi 1 for 16 bit programming.
; Borland Delphi 5
Borland Delphi 5 was released in 1999. Added concept of frames, parallel development, translation capabilities, enhanced integrated debugger, XML support, ADO database support and reference counting interfaces
; Borland Delphi 6
Attempts to support both Linux and Windows for cross-platform development were made, and a cross-platform alternative to the VCL known as CLX shipped in 2001 with the release of Delphi 6. This was the second product in Borland's series of Linux-compatible native developer tools, establishing code-compatible IDEs for both Linux and Windows using the shared CLX component framework for both. Later efforts would include CLX in C++Builder 6 and add C++ code-compatibility to the RAD tools line. Delphi 6 included the same CLX version as the first version of Kylix. CLX 1 had been created before Delphi 6; its feature set was based on VCL 5 and lacked some features added to the VCL 6 shipped with Delphi 6.
; Borland Delphi 7
Delphi 7, released in August 2002, became the standard version used by more Delphi developers than any other single version. It is one of the most successful IDEs created by Borland because of its stability, speed and low hardware requirements, and remains in active use as of 2020. Delphi 7 added support for Windows XP Themes, and added more support for building Web applications. It was the last version of Delphi that did not require mandatory software activation.

Later Borland years (2003–2008)

; Borland Delphi 8
Delphi 8, released December 2003, was a.NET-only release that compiled Delphi Object Pascal code into.NET CIL; the IDE was rewritten for this purpose. The IDE changed to a docked interface similar to Microsoft's Visual Studio.NET. Delphi 8 was highly criticized for its low quality and its inability to create native applications. The inability to generate native applications is only applicable to this release; the capability would be restored in the next release.
; Borland Delphi 2005
The next version, Delphi 2005, included the Win32 and.NET development in a single IDE, reiterating Borland's commitment to Win32 developers. Delphi 2005 includes design-time manipulation of live data from a database. It also includes an improved IDE and added a for... in statement to the language. However, it was widely criticized for its bugs; both Delphi 8 and Delphi 2005 had stability problems when shipped, which were only partially resolved in service packs. The ability to compile native windows applications was added back into Delphi 2005 after being removed in Delphi 8. CLX support was dropped for new applications from this release onwards.
; Borland Delphi 2006
In late 2005 Delphi 2006 was released combining development of C# and Delphi.NET, Delphi Win32 and C++ into a single IDE. It was much more stable than Delphi 8 or Delphi 2005 when shipped, and improved further with the release of two updates and several hotfixes.
;Turbo Delphi and Turbo Delphi for.NET
On September 6, 2006 The Developer Tools Group of Borland Software Corporation released single-language editions of Borland Developer Studio 2006, bringing back the Turbo name. The Turbo product set included Turbo Delphi for Win32, Turbo Delphi for.NET, Turbo C++, and Turbo C#. There were two variants of each edition: Explorer, a free downloadable flavor, and a Professional flavor, priced at US$899 for new users and US$399 for upgrades, which opened access to thousands of third-party components. Unlike earlier Personal editions of Delphi, Explorer editions could be used for commercial development.
;Codegear Delphi 2007
Delphi 2007, the first version by CodeGear, was released on March 16, 2007. The Win32 personality was released first, before the.NET personality of Delphi 2007 based on.NET Framework 2.0 was released as part of the CodeGear RAD Studio 2007 product. New features included support for MSBuild and enhancements to the VCL for Windows Vista, but the C#Builder feature was dropped in this release as sales were not as high as expected due to Visual Studio also offering C#. The Windows Form designer for Delphi.NET was also dropped in 2007 because it is based on part of the.NET framework API, which Microsoft had changed so drastically in.NET 2.0 that updating the IDE would have been a major undertaking. Delphi 2007 also introduced DBX4 as the next version of dbExpress. For the first time Delphi could be downloaded from the Internet and activated with a license key. Internationalized versions of Delphi 2007 shipped simultaneously in English, French, German and Japanese. RAD Studio 2007, which includes.NET and C++Builder development, was released on September 5, 2007.
;Delphi for PHP
In CodeGear era emerged an IDE targeting PHP development despite the word "Delphi" in its name. That one is Delphi for PHP whose highlight is a VCL-like PHP framework which enables for PHP the same Rapid Application Development methodology as in ASP.NET Web Form. Version 1.0 and 2.0 were released in March 2007 and April 2008 respectively. The IDE would later evolve into RadPHP after CodeGear's acquisition by Embarcadero.

Embarcadero years (2008–2015)

;Codegear Delphi 2009
Delphi 2009, added many new features such as completely reworking the VCL and RTL for full Unicode support, and added generics and anonymous methods for Win32 native development. Support for.NET development was dropped from the mainstream Delphi IDE starting with this version, and was catered for by the new Delphi Prism 2009.
Delphi Prism was developed by RemObjects Software and distributed by Embarcadero from 2008 to replace Delphi.NET. It is a combination of RemObjects's mostly Delphi-compatible.NET compiler, a version of the Microsoft Visual Studio Shell without C# or VB support, and some Embarcadero technologies such as dbExpress. Prism is cross-platform capable insofar as it supports the Mono.NET libraries.
;Codegear Delphi 2010
Delphi 2010, was released on August 25, 2009 and is the second Unicode release of Delphi. It includes a new compiler run-time type information system, support for Windows 7 Direct2D, touch screen and gestures, a source code formatter, debugger visualizers and the option to also have the old style component palette in the IDE. The new RTTI system makes larger executables than previous versions. Delphi Prism 2010 which is the last Visual Studio 2008 only based one was also released in August 2009.
;Embarcadero Delphi XE
Delphi XE, was released on August 30, 2010 with Delphi support for Amazon EC2, Microsoft Azure were bundled. Delphi Prism XE which is the first Visual Studio 2010 based one was also released in August 2010. It is essentially a rebranded Delphi Prism 2011 which was released three months earlier. RadPHP had been incorporated in to RAD Studio since RadPHP XE that was evolved from the formal Delphi for PHP product developed by CodeGear in its Borland days.
;Delphi Starter Edition
On January 27, 2011 Embarcadero announced the availability of a new Starter Edition that gives independent developers, students and micro businesses a slightly reduced feature set for a price less than a quarter of that of the next-cheapest version. This Starter edition is based upon Delphi XE with update 1.
;Embarcadero Delphi XE2
On September 1, 2011 Embarcadero released RAD Studio XE2 which included Delphi XE2, C++Builder, Embarcadero Prism XE2 which was rebranded from Delphi Prism and RadPHP XE2. Delphi XE2 natively supports 64-bit Windows, in addition to the long-supported 32-bit versions, with some backwards compatibility. Applications for 64-bit platforms can be compiled, but not tested or run, on the 32-bit platform. The XE2 IDE cannot debug 64-bit programs on Windows 8 and above. Delphi XE2 is supplied with both the VCL, and an alternative library called FireMonkey that supports Windows, Mac OS X and the Apple iPhone, iPod Touch and iPad portable devices. FireMonkey and VCL are not compatible; one or the other must be used, and older VCL applications cannot use Firemonkey unless user interfaces are recreated with FireMonkey forms and controls. Third parties have published information on how to use Firemonkey forms in VCL software, to facilitate gradual migration, but even then VCL and Firemonkey controls cannot be used on the same form. Embarcadero says that Linux operating system support "is being considered for the roadmap", as is Android, and that they are "committed to... FireMonkey.... expect regular and frequent updates to FireMonkey". Pre-2013 versions only supported iOS platform development with Xcode 4.2.1 and lower, OS X version 10.7 and lower, and iOS SDK 4.3 and earlier.
;Embarcadero Delphi XE3
On September 4, 2012 Embarcadero released RAD Studio XE3, which included Delphi XE3, C++Builder, Embarcadero Prism XE3 and HTML5 Builder XE3 which was upgraded and rebranded from RadPHP. Delphi XE3 natively supports both 32-bit and 64-bit editions of Windows, and provides support for Mac OS X with the Firemonkey 2/FM² framework. iOS support was dropped with XE3 release initially, but applications can continue to be targeted to that platform by developing with Delphi XE2.
;Embarcadero Delphi XE4
On April 22, 2013 Embarcadero released RAD Studio XE4, which included Delphi XE4, and C++Builder. There has been no major upgrade for either Embarcadero Prism or HTML5 Builder thence. Delphi XE4 is the first release of the FireMonkey mobile platform, featuring cross-platform mobile application development for the iOS Simulator and iOS Devices. In this version Embarcadero introduces two new compilers for Delphi mobile applications, the Delphi Cross Compiler for the iOS Simulator and the Delphi Cross Compiler for the iOS Devices. These compilers significantly differ from the Win64 desktop compiler as they do not support COM, inline assembly of CPU instructions, and six older string types such as PChar. The new mobile compilers advance the notion of eliminating pointers. The new compilers require an explicit style of marshalling data to and from external APIs and libraries. Delphi XE4 Run-Time Library is optimized for 0-based, read-only Unicode strings, that cannot be indexed for the purpose of changing their individual characters. The RTL also adds status-bit based exception routines for ARM CPUs that do not generate exception interrupts.
;Embarcadero Delphi XE5
On September 12, 2013 Embarcadero released RAD Studio XE5, which includes Delphi XE5 and C++Builder. It adds support for Android, Ice Cream Sandwich and Jelly Bean ) and iOS 7.
;Embarcadero Delphi XE6
On April 15, 2014 Embarcadero released RAD Studio XE6, which included Delphi XE6 and C++Builder. It allows to create natively-compiled apps for all platforms for, desktop, mobile, and wearable devices like Google Glass, with a single C++ or Object Pascal codebase. RAD Studio XE6 adds support for Android 4.4 KitKat. It also became possible to create FireMonkey mobile apps for Android.
;Embarcadero Delphi XE7
On September 2, 2014 Embarcadero released RAD Studio XE7, which included Delphi XE7 and C++Builder. It enables Delphi/Object Pascal and C++ developers to extend existing Windows applications and build apps that connect desktop and mobile devices with gadgets, cloud services, and enterprise data and APIs. Also, it enables developers to extend Windows applications using WiFi and Bluetooth App Tethering, and create shared user interface code across multiple device form factors, etc.
;Embarcadero Delphi XE8
On April 7, 2015 Embarcadero released RAD Studio XE8, which included Delphi XE8 and C++Builder.
;Embarcadero Delphi 10 Seattle
On August 31, 2015 Embarcadero released RAD Studio 10 Seattle, which included Delphi and C++Builder.

Idera years (2015–present), under the Embarcadero mark

;Embarcadero Delphi 10.1 Berlin
On April 20, 2016 Embarcadero released RAD Studio 10.1 Berlin, which included Delphi and C++Builder, both generating native code for the 32- and 64-bit Windows platforms, OSX, iOS and Android. Delphi 10.1 Berlin Update 2 introduced the ability to create Windows 10 Store applications from the Delphi IDE using Desktop Bridge.
;Embarcadero Delphi 10.2 Tokyo
On March 22, 2017 Embarcadero released RAD Studio 10.2 Tokyo, adding 64-bit Linux support, limited to console and non-visual applications. In addition this release features RTL and IDE improvements, multi-tenancy support in RAD server and improved database capabilities.
;Embarcadero Delphi 10.2 Tokyo
On July 18, 2018 Embarcadero released Community Edition for free download. You are not allowed to earn more than $5,000. Library source code and VCL/FMX components are more limited compared to Professional.
;Embarcadero Delphi 10.3 Rio
On November 21, 2018 Embarcadero released RAD Studio 10.3 Rio. This release had a lot of improvements, new components for High DPI / 4K screens on the VCL and an entirely new look for the IDE. Two new features were added to the language: inline block-local variable declarations and type inference. Versions 10.3.1, 10.3.2, and 10.3.3 were also released.
;Embarcadero Delphi 10.4 Sydney
On May 26, 2020 Embarcadero released RAD Studio 10.4 Sydney.
Embarcadero publishes "roadmaps" describing their future development plans. The most recent one was published in May 2019., which was amended in August 2019

Related software