Delphi (programming language)
Delphi XE2 IDE with cross-platform Firemonkey framework project loaded running on Microsoft Windows XP
|Original author(s)||Borland (1995–2008)|
|Developer(s)||Embarcadero Technologies (2009–present)|
|Stable release||Delphi XE7 / September 2, 2014|
|Operating system||Microsoft Windows|
|Available in||English, French, German and Japanese|
|Type||Integrated Development Environment|
Delphi's compilers use their own Object Pascal dialect of Pascal and generate native code for 32- and 64-bit Windows operating systems, as well as 32-bit Mac OS X, iOS and Android. As of late 2011[update] support for the Linux operating system was planned by Embarcadero.
Delphi was originally developed by Borland as a rapid application development tool for Windows, and as the successor of Borland Pascal. Delphi and its C++ counterpart, C++Builder, shared many core components, notably the IDE and VCL, but remained separate until the release of RAD Studio 2007. RAD Studio is a shared host for Delphi, C++Builder, and others.
- 1 History
- 2 Versions
- 3 Distinguishing features
- 4 Related software
- 5 Code examples
- 6 See also
- 7 References
- 8 Further reading
- 9 External links
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 [the] 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.
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 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.
Early Borland years (1995-2004)
- Borland Delphi
Delphi (later known as Delphi 1) was released in 1995 for the 16-bit Windows 3.1, and was an early example of what came to be known as Rapid Application Development (RAD) tools. Delphi evolved from Borland's "Turbo Pascal for Windows", itself an evolution with Windows support from Borland's Turbo Pascal and Borland Pascal, very fast 16-bit native-code MS-DOS compilers with their own sophisticated integrated development environment (IDE) and textual user interface toolkit for DOS (Turbo Vision). Early Turbo Pascal (for MS-DOS) 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 procedural 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. It was then later turned into Java.
- Borland Delphi 3
Delphi 3, released in 1997, added new VCL components encapsulating the 4.71 version of Windows Common Controls (such as Rebar and Toolbar), 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
In 2001 Borland released a Linux version of Delphi, named Kylix. The IDE was dependent on the Wine libraries rather than Linux's native system libraries (glibc) in order to get a product out quickly and relatively cheaply. The expense of developing a native glibc version of Kylix, combined with the lack of Linux adoption among programmers at the time, caused sales to go soft, and Kylix was abandoned after version 3. This was the first attempt to add Linux support in the Delphi product family.
Kylix used the new CLX cross-platform framework, instead of Delphi's VCL.
- 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 attempt to add Linux support[clarification needed] to the Delphi product family (see Kylix above).
Delphi 6 included the same CLX version (CLX 1) 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 remained in active use as of 2011. Delphi 7 added support for Windows XP Themes, and added more support for building Web applications. It was the last version of Delphi which could be used without mandatory software activation.
- 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 (called Galileo) similar to Microsoft's Visual Studio.NET. Delphi 8 was highly criticized[by whom?] for its low quality and its inability to create native applications (Win32 API/x86 code). The inability to generate native applications is only applicable to this release; the capability was restored in the next release (Delphi 2005).
Later Borland years (2004-2008)
- Borland Delphi 2005
The next version, Delphi 2005 (Delphi 9, also Borland Developer Studio 3.0), 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 (like C#'s foreach) 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 (*.exe) 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 (Delphi 10, Borland Developer Studio 4.0) was released and combined development of C# and Delphi.NET, Delphi Win32 and C++ (Preview when it was shipped but got stable in Service Pack 1) into a single IDE. It was much more stable than Delphi 8 or Delphi 2005 when shipped, and improved even more with the release of service packs and several hotfixes.
- Turbo Delphi and C++
On September 6, 2006 The Developer Tools Group (the working name of the not yet spun off company) of Borland Software Corporation released single-language versions of Borland Developer Studio components, 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 version, and the Professional version, priced at US$899 for new users and US$399 for updates, less than the full Borland Delphi, 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 (Delphi 11), the first version by CodeGear, was released on March 16, 2007. The Win32 personality was released first, before the .NET personality of Delphi 2007 which is based on .NET Framework 2.0 was released as part of the CodeGear RAD Studio 2007 product. New features included support for MS Build and enhancements to the Visual Component Library for Windows Vista, but the C#Builder feature was dropped in this release as sales where not as high as expected due to Visual Studio also offering C#. The Windows Form designer for Delphi .NET was also dropped in D2007 because it is based upon part of the .NET framework API which had been changed so drastically by Microsoft 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, a capability powered by the new InstallAware installation technology (itself authored in Delphi, and now shipping in a free, limited edition inside the box with Delphi). Internationalized versions of Delphi 2007 shipped simultaneously in English, French, German and Japanese. RAD Studio 2007 (code named Highlander), which includes .NET and C++Builder development, was released on September 5, 2007.
- Delphi Prism
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 (without RTL or VCL), 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. Prism is a separate product line with new releases; Embarcadero Delphi Prism XE2 was released at about the same time as Delphi XE2.
Embarcadero years (2008-)
- Embarcadero Delphi 2009
Delphi 2009 (Delphi 12, code named Tiburón), 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.
- Embarcadero Delphi 2010
Delphi 2010 (code-named Weaver, aka Delphi 14; there was no version 13), was released on August 25, 2009 and is the second Unicode release of Delphi. It includes a new compiler run-time type information (RTTI) system, support for Windows 7 direct 2D, 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.
- Embarcadero Delphi XE
- Delphi Starter Edition
On January 27, 2011 Embarcadero announced the availability of a new Starter Edition which 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.
- Embarcadero Delphi XE2
Delphi XE2 natively supports 64-bit Windows (except the starter edition), 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".
Unfortunately, iOS platforms development works only with XCode 4.2.1 and lower, OSX version 10.7 and lower, and iOS SDK 4.3 and earlier. This limitation will be removed in 2013 release of Delphi (and RAD Studio), which will support iOS development natively.
- Embarcadero Delphi XE3
On September 4, 2012 Embarcadero released RAD Studio XE3 which included Delphi XE3, and C++Builder.
Delphi XE3 natively supports both 32-bit and 64-bit editions of Windows (including Windows 8), and provides support for Mac OS X with the Firemonkey 2/FM² framework. iOS support was dropped with XE3 release initially (with intent to add support back in with a separate product - Mobile Studio), 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.
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/from external APIs and libraries.
Delphi XE4 Run-Time Library (RTL) is optimized for 0-based, read-only (immutable) 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 (specifically: ARM v7 devices running Gingerbread (2.3.3-2.3.7), Ice Cream Sandwich (4.0.3-4.0.4) and Jelly Bean (4.1.x, 4.2.x, 4.3.x)) 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 both desktop and mobile, and even wearable devices like Google Glass, with a single C++ or Object Pascal (Delphi) 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 new, modern 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 Wi-Fi and Bluetooth App Tethering, and create shared user interface code across multiple device form factors etc. 
Embarcadero plans for development of Windows Phone mobile application and Linux servers on or before March 2015.
Editions and prices
Each version has been released in different editions which add functionality and price to the most basic one. As an indication of editions and prices, Delphi XE2 was sold directly by Embarcadero in 2011 in editions called Starter (US$199), Professional ($899), Enterprise ($1,999), Ultimate ($2,999), and Architect ($3,499). Prices vary from different suppliers, with different incentives, and in different regions, and Delphi is also included in the RAD Studio bundles. Embarcadero publishes feature matrices summarising the differences in functionality.
Delphi supports rapid application development (RAD) by introducing features such as application framework and visual window layout designer that reduced application prototyping times.
Delphi supports rapid native cross-compilation.
Delphi uses the Pascal-based programming language called Object Pascal, and compiles Delphi source code into native x86 code. They include the VCL (Visual Component Library), support for COM independent interfaces with reference counted class implementations, and support for a large number of 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 supported, and Delphi supplies several database components. The Visual Component Library (VCL) includes many 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.
Delphi is 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 teaching language, without low-level programming facilities or access to hardware and with no emphasis on efficiency; Turbo Pascal and its descendants, including Delphi, are designed for efficiency and 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 (as in Java) which Delphi implicitly dereferences, so there is usually no need to manually allocate memory for pointers to objects or use similar techniques needed in some other languages. 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 the programmer does not have to handle memory management as Delphi's memory manager handles this. The improved memory manager introduced with Borland Developer Studio 2006 provides functions to locate memory leaks.
The language is suitable for Rapid Application Development (RAD) and Delphi includes an integrated IDE. The Delphi products all ship with a large framework called the Visual Component Library, usually referred to by its initials VCL, including most of its source code. Third-party components (sometimes with full source code) and tools to enhance the IDE or for other Delphi related development tasks are available free of charge or for purchase. The IDE includes a GUI for localization and translation of created programs which may be deployed to a translator at no additional cost; some developers prefer to use third-party products with more functionality for this purpose. The VCL framework maintains a high level of source compatibility between versions which simplifies adapting 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 sophisticated "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 quick optimizing single pass compiler can compile to a single executable, simplifying distribution and eliminating DLL version issues. 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.
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, e.g., with support by Firemonkey of other platforms than Windows.
- Backward compatibility
Each new release of Delphi attempts to keep as much backwards compatibility as possible to allow developers to continue to use existing code without incompatibility of interfaces or functionality. The design of the standard class libraries (VCL/RTL) 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.
Embarcadero sells RAD Studio, a suite of development tools which consists of Delphi, C++Builder, Embarcadero Prism and HTML5 Builder. Like Delphi, there are different editions of RAD Studio: Professional edition, Enterprise edition, Ultimate edition and Architect edition.
InterBase integrates natively to Delphi and C++Builder for client/server or embedded development and can be accessed by all major languages and platforms in the market with database connection protocols like ODBC, ADO, ADO.NET and even with Java by JDBC/ODBC Bridge or Java type 4 connectors.
Tool for Java development based on Eclipse since version JBuilder 2007.
RadPHP (formerly Delphi for PHP)
RadPHP (now superseded by HTML5 Builder) was an IDE for PHP that provides true RAD functionality. It has a form designer similar to that of Delphi or Visual Basic, and an integrated debugger based on the Apache web server. It also includes a VCL library ported to PHP. Unlike other IDEs it supports Web 2.0 features such as AJAX.
Delphi for PHP was announced on March 20, 2007, renamed on October 2010 to RadPHP, and is based on Qadram Q studio. Embarcadero acquired Qadram in January 2011.
Delphi Prism (latterly known as Embarcadero Prism) was a derivative of the Oxygene programming language product (previously known as Chrome) from RemObjects which ran in the Microsoft Visual Studio IDE rather than RAD Studio. It was licensed and re-branded by Embarcadero to replace Delphi.NET when that product was discontinued.
Although RemObjects Oxygene was further developed and incorporated support for native Java, Android, iOS and OS X development, the version licensed by Embarcadero was limited to only supporting .NET. It was eventually itself discontinued by Embarcadero with the release of Delphi XE4, leaving the Delphi product line with no support for .NET development.
The Oxygene product on which it was based continues to be developed by RemObjects as part of their Elements product line.
- Free Pascal - an open-source Pascal compiler which partially supports Delphi code and works on many operating systems.
- Lazarus - a RAD IDE developed for and supported by the Free Pascal compiler that runs on Windows, Linux and Mac OS X. A free alternative which works very much like Delphi, and is cross platform.
- Project Jedi (Joint Endeavor of Delphi Innovators) - A collaborative open-source effort by the Delphi developer community to provide translations of Windows API interfaces, additional components and controls, and algorithms and data structures.
- FastCode - Enhanced runtime libraries and memory manager.
- Teechart - Charting library.
- OpenWire (library) - Data flow, events, and state synchronization component library.
- Quadruple D, a DirectX library for Delphi
Hello World! (ShowMessage)
procedure TForm1.ShowSomethingOnCreate; begin ShowMessage('Hello World!'); end;
Hello World! (Label.Caption)
procedure TForm1.ShowSomethingOnCreate; begin Label1.Caption := 'Hello World!'; end;
- "Delphi XE2 Feature Matrix" (PDF). Retrieved 2012-03-05.
- By: Tim DelChiaro. "Embarcadero: Firemonkey Q & A, undated but copyright 1994-2010". Edn.embarcadero.com. Retrieved 2012-03-05.
- Intersimone, David. "Borland History: Why the name "Delphi?"". Retrieved 2013-01-07.
- David Intersimone. "Press Release: Borland forming CodeGear to focus exclusively on developer productivity". Retrieved 2013-01-07.
- Brian Long. "VCL versus CLX".
- Nick Hodges. "Top ten reason to upgrade from Delphi 7".
- Tim Anderson. "Borland's quality problems and Delphi 2005". Retrieved 2010-06-16.
- "Embarcadero Prism XE2 downloads". Downloads.embarcadero.com. Retrieved 2012-03-05.
- "News Briefs: December 15, 2008". SDTimes (BZ Media LLC). December 15, 2008. Retrieved 2011-08-24.
- "Delphi 2010 What’s New". Retrieved 2006-11-28.
- Elling, Dee (September 25, 2009). "Release Notes for Embarcadero Delphi 2010 and C++Builder 2010". Embarcadero Technologies. Retrieved 2011-08-24.
- "Delphi Insider: Sneak Preview: Delphi 2011 is Delphi XE". Retrieved 2010-09-02.
- "Delphi XE is Here! What is "XE" in "Delphi XE"?". Delphi.about.com. Retrieved 2012-03-05.
- "Embarcadero Introduces Starter Editions of C++Builder and Delphi Rapid Application Development Environments". SD Times (BZ Media LLC). January 31, 2011. Retrieved 2011-08-24.
- Prices for Delphi XE2 versions
- "Delphi roadmap".
- "RAD Studio XE2 Overview". Embarcadero Technologies, Inc. 2011. Retrieved 2011-09-06.
- "Delphi XE2 Overview". Embarcadero Technologies, Inc. 2011. Retrieved 2011-09-06.
- Stuart, Simon (2011-10-19). "World, Meet MonkeyMixer – Use FireMonkey forms directly in VCL Projects". Simonjstuart.com. Retrieved 2012-03-05.
- "Delphi Compiler Changes for XE4". Embarcadero. 2013-05-15.
- "Run-Time Library (RTL) Changes for XE4". Embarcadero. 2013-05-15.
- Sip from the Firehose : Delphi XE5 for Android - which versions of Android are supported. Blogs.embarcadero.com. Retrieved on 2014-02-11.
- What’s New in Delphi and C++Builder XE6. docwiki.embarcadero.com. Retrieved on 2014-04-08.
- What’s New in Delphi and C++Builder XE7. docwiki.embarcadero.com. Retrieved on 2014-04-09.
- "RAD Studio, Delphi and C++Builder Roadmap - March 2014". Edn.embarcadero.com. Retrieved 2012-04-24.
- Delphi XE2 price list[dead link]
- "A First Look at (Borland Developer Studio) Delphi 2006 - Refactoring in Delphi 2006". About.com. Retrieved 2007-12-19.
- Rozlog, Michael. "RAD Studio, Delphi and C++Builder Roadmap". Edn.embarcadero.com. Retrieved 2012-03-05.
- "Embarcadero RAD Studio 2010". Embarcadero Technologies. Retrieved 9 December 2009. "Embarcadero RAD Studio 2010 is the industry’s most powerful rapid application development suite for visually building GUI-intensive, data-driven end-user applications for both native Windows and .NET. RAD Studio XE3 includes Delphi, C++Builder, Embarcadero Prism (formerly Delphi Prism) and HTML5 Builder, enabling you to deliver applications up to 5x faster across multiple Windows and database platforms."
- "Embarcadero RAD Studio - Product Editions". Embarcadero Technologies. Retrieved 9 December 2009.
- "Java Development Software | JBuilder". Embarcadero.com. Retrieved 2013-06-24.
- Official website
- Delphi Basics Help and reference for the fundamentals of the Delphi
- Useful Sites - Delphi Programming