Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Delphi (software)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Features== Delphi supports [[rapid application development]] (RAD). Prominent features are a visual designer and two [[application framework]]s, [[Visual Component Library]] (VCL) for Windows and [[FireMonkey]] (FMX) for cross-platform development. Delphi uses the [[Pascal (programming language)|Pascal]]-based programming language [[Object Pascal]] created by [[Anders Hejlsberg]] for Borland (now IDERA) as the successor to Turbo Pascal. It supports native [[cross-compilation]] to many platforms including Windows, Linux, iOS, and Android. 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]] (COM) with [[reference counting]] class implementations, and support for many third-party components. [[Interface (computer science)|Interface]] implementations can be delegated to fields or properties of classes. Message handlers are implemented by tagging a [[Method (computer programming)|method]] of a [[Class (computer programming)|class]] with the integer constant of the message to handle.{{Citation needed|date=November 2021}} [[Database]] connectivity is extensively supported through VCL database-aware and database access components. Later versions have included upgraded and enhanced runtime library routines, some provided by the community group [[FastCode]]. ===Characteristics=== Delphi uses a [[Strongly-typed programming language|strongly typed]] [[high-level programming language]], intended to be easy to use and originally based on the earlier Object Pascal language. [[Pascal (programming 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"<ref>{{cite web|url=http://www.math.bas.bg/bantchev/place/pascal/recollections.pdf|title=Recollections About the Development of Pascal|access-date=2016-01-12|archive-date=2016-05-12|archive-url=https://web.archive.org/web/20160512232508/http://www.math.bas.bg/bantchev/place/pascal/recollections.pdf|url-status=live}}</ref> 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-oriented programming|object-orientation]] features only class- and interface-based [[Polymorphism (computer science)|polymorphism]].<ref name="WangTan2006">{{cite book|author1=Lingfeng Wang|author2=Kay CHen Tan|title=Modern Industrial Automation Software Design|url=https://books.google.com/books?id=H93R1EE7rL8C&pg=PA113|date=20 January 2006|publisher=John Wiley & Sons|isbn=978-0-471-77627-7|pages=113β}}</ref> Metaclasses are first class objects. Objects are references to the objects (as in [[Java (programming language)|Java]]), 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 leak]]s. Delphi includes an integrated IDE. The Delphi products all ship with a run-time library (RTL) and a [[Visual Component Library]] (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, 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 typically 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 reusable 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 compiler|optimizing]] and is a [[One-pass compiler|single-pass compiler]]. It can optionally compile to a single [[executable]] which does not require [[Dynamic-link library|DLL]]s. Delphi can also generate standard DLLs, [[ActiveX]] DLLs, [[Component Object Model|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 [[Unified Modeling Language|UML]] models from the source code or to modify the source through changes made in the model. Delphi has communities on the [[World Wide Web|web]], where also its employees actively participate. And Delphi is using in collaboration with FireDAC components. ===Backward compatibility=== Delphi is one of the languages where backward compatibility is close to 100%. Although each new release of Delphi attempts to keep as much [[backward compatibility]] as possible to allow existing code reuse, new features, new libraries, and improvements sometimes make newer releases less than 100% backward compatible. Since 2016, there have been new releases of Delphi every six months, with new platforms being added approximately every second release.<ref>{{cite web|title=List of Delphi language features and version in which they were introduced/deprecated|url=https://stackoverflow.com/questions/8460037/list-of-delphi-language-features-and-version-in-which-they-were-introduced-depre|publisher=Stack Overflow|access-date=9 March 2016|archive-date=28 February 2016|archive-url=https://web.archive.org/web/20160228200427/http://stackoverflow.com/questions/8460037/list-of-delphi-language-features-and-version-in-which-they-were-introduced-depre|url-status=live}}</ref> ===Frameworks=== Delphi offers two frameworks for visual application development, VCL and FireMonkey (FMX): * [[Visual Component Library]] (VCL) is the framework for developing pure Windows applications. VCL is a long-standing framework, included in the first release of Delphi and actively developed ever since then. * [[FireMonkey]] (later abbreviated FMX), was released in 2011, as part of Delphi XE2, together with an additional set of built-in compilers for non-Windows platforms. FireMonkey is a cross-platform framework for Windows, macOS, iOS, Android and Linux (x64). The GUI parts of FireMonkey are largely based on Direct3D and OpenGL. FireMonkey is not compatible with VCL; they are two separate frameworks. FireMonkey applications do, however, allow easy sharing of non-visual code [[Unit (Software Development)|units]] with VCL applications, enabling a lot of code to be ported or shared easily between the platforms. ===Interoperability=== Delphi and its [[C++]] counterpart, [[C++Builder]], are interoperable. They share many core components, notably the IDE, the VCL and FMX frameworks, and much of the [[runtime library]]. In addition, they can be used jointly in a project. For example, C++Builder 6 and later can combine source code from Delphi 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. Starting with Rio, there is also interoperability with Python. === Sample "Hello World" program === {{See also|Object Pascal#Delphi_and_Free_Pascal_version}}<syntaxhighlight lang="delphi"> program ObjectPascalExample; type THelloWorld = class procedure Put; end; procedure THelloWorld.Put; begin Writeln('Hello, World!'); end; var HelloWorld: THelloWorld; { this is an implicit pointer } begin HelloWorld := THelloWorld.Create; { constructor returns a pointer to an object of type THelloWorld } HelloWorld.Put; HelloWorld.Free; { this line deallocates the THelloWorld object pointed to by HelloWorld } end. </syntaxhighlight>Note that the object construct is still available in Delphi.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)