Delphi

栏目: IT技术 · 发布时间: 4年前

内容简介:Delphi's compilers generatenative code forMicrosoft Windows,Delphi includes a code editor, a visual designer, an integrated debugger, asource code control component, and support for third-partyplugins. The code editor featuresCode Insight (code completion)

Delphi is an event-driven programming language based onObject Pascal and an associated integrated development environment (IDE) for rapid application development of desktop,mobile,web, andconsole software,currently developed and maintained by Embarcadero Technologies .

Delphi's compilers generatenative code forMicrosoft Windows, macOS , iOS ,Android andLinux (x64 only).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, asource code control component, and support for third-partyplugins. The code editor featuresCode Insight (code completion), Error Insight (real-time error-checking), andrefactoring. The visual forms designer has traditionally used Visual Component Library (VCL) for native Windows development, but theFireMonkey (FMX) 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 [ which? ] compiled 170,000 lines per second.

Delphi was originally developed byBorland as a rapid application development tool for Windows as the successor ofTurbo Pascal. Delphi added full object-oriented programming to the existing language, and since then the language has grown to support generics andanonymous methods, and native Component Object Model (COM) support. In 2006, Borland’s developer tools section was transferred from Borland to a wholly owned subsidiary known asCodeGear, which was sold to Embarcadero Technologies in 2008. In 2015, Embarcadero was purchased byIdera Software, but the Embarcadero mark was retained for the developer tools division.

Delphi and itsC++ counterpart,C++Builder, are interoperable. They share many core components, notably the IDE, VCL, and much of theruntime 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, a shared host for Delphi and C++Builder, which can be purchased with either or both.

Contents

Features [ edit ]

Delphi supports rapid application development (RAD). Among the features supporting RAD are the application framework and the visual designer.

[ citation needed ]

Delphi uses thePascal-based programming language calledObject Pascal introduced by Borland. It supports nativecross-compilation. Its visual designer has traditionally used Visual Component Library (VCL) 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 (COM) withreference 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 groupFastCode, established in 2003.

Characteristics [ edit ]

Delphi is astrongly 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 inassembly language and other languages. Delphi'sobject orientation features only class- and interface-basedpolymorphism.Metaclasses are first class objects. Objects are actually references to the objects (as inJava), 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 locatememory leaks.

Delphi includes an integrated IDE. The Delphi products all ship with a Visual Component Library (VCL), including most of its source code. Third-party components (sometimes with fullsource 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 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 ofdependency injection orinversion 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 singleexecutable which does not requireDLLs. Delphi can also generate standard DLLs,ActiveX DLLs,COM automation servers and Windows services.

The Delphi IDEs since Delphi 2005 increasingly supportrefactoring features such as method extraction and the possibility to createUML models from the source code or to modify the source through changes made in the model.

Delphi has large communities onUsenet and theweb. When Delphi was owned by Codegear, many of its employees actively participated.

Backward compatibility [ edit ]

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 [ edit ]

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 (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 codeunits with VCL applications, enabling a lot of code to be ported easily between the platforms.

Issues [ edit ]

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

[ citation needed ]

Code examples [ edit ]

To show a message:

procedure TForm1.ShowAMessage;
begin
  ShowMessage('Hello World!');
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 [ edit ]

Delphi was originally one of many codenames of a pre-release development tool project atBorland. Borland developerDanny Thorpe suggested the Delphi codename in reference to theOracle 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 wasOracle 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.

The chief architect behind Delphi wasAnders Hejlsberg, who had developedTurbo Pascal. He was persuaded to move toMicrosoft 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 itsALM line. On November 14, 2006 Borland transferred the development tools group to an independent subsidiary company namedCodeGear, 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 byIdera Software, but the Embarcadero mark was retained for the developer tools division.

Delphi

Inprise Delphi 4.0.

Early Borland years (1995–2003) [ edit ]

Borland Delphi

Delphi (later known as Delphi 1) was released in 1995 for the 16-bitWindows 3.1, and was an early example of what became 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 with Objects, very fast 16-bit native-code MS-DOS compilers with their own sophisticated integrated development environment (IDE) and textual user interface toolkit forDOS (Turbo Vision). Early Turbo Pascal (for MS-DOS) was written in a dialect of the Pascal programming language ; in later versions support forobjects was added, and it was namedObject 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. NewQuickreport 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 (such as Rebar and Toolbar), TDataset architecture separated from BDE, DLL debugging, the code insight technology, component packages, component templates, DecisionCube andTeechart components for statistical graphing,WebBroker, ActiveForms, MIDAS three tier architecture , component packages and integration withCOM 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 MicrosoftBackOffice 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 andreference counting interfaces

Borland Delphi 6

Attempts to support both Linux and Windows for cross-platform development were made, and a cross-platform alternative to theVCL 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 (see Kylix above) and Windows (Delphi 6) 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 (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 remains in active use as of 2017. 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 mandatorysoftware activation.

Later Borland years (2003–2008) [ edit ]

Borland Delphi 8

Delphi 8 (Borland Developer Studio 2.0), released December 2003, was a.NET-only release that compiled Delphi Object Pascal code into .NETCIL; 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 would be restored in the next release.

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#'sforeach) to the language. However, it was widely criticizedfor 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, also Borland Developer Studio 4.0) was released combining development of C# and Delphi.NET, Delphi Win32 and C++ (Preview when it was shipped but stabilized in Update 1) 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

Main article:Turbo Delphi

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 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 (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 based on .NET Framework 2.0 was released as part of the CodeGear RAD Studio 2007 product. New features included support forMSBuild 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 (code named Highlander), which includes .NET and C++Builder development, was released on September 5, 2007.

Delphi for PHP

In CodeGear era emerged an IDE targetingPHP 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 intoRadPHP after CodeGear's acquisition by Embarcadero.

Embarcadero years (2008–) [ edit ]

Codegear Delphi 2009

Delphi 2009 (Delphi 12, code named Tiburón), added many new features such as completely reworking theVCL and RTL for full Unicode support, and added generics andanonymous 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 (Version 1.0).

Delphi Prism was developed byRemObjects 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 orVCL), 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 (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 7Direct2D, 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 (Version 3.0) which is the last Visual Studio 2008 only based one was also released in August 2009.

Embarcadero Delphi XE

Delphi XE (aka Delphi 2011,code named Fulcrum), was released on August 30, 2010 with Delphi support for Amazon EC2, Microsoft Azure were bundled. Delphi Prism XE (Version 4.0) which is the first Visual Studio 2010 based one (However, it can also integrated into Visual Studio 2008) was also released in August 2010. It is essentially a rebranded Delphi Prism 2011 (also Version 4.0) which was released three months earlier. RadPHP had been incorporated in to RAD Studio since RadPHP XE (Version 3.0) 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 setfor 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
Delphi

RAD Studio XE2 World Tour

On September 1, 2011 Embarcadero released RAD Studio XE2 (code-named Pulsar,) which included Delphi XE2,C++Builder, Embarcadero Prism XE2 (Version 5.0 later upgraded to XE2.5 Version 5.1) which was rebranded from Delphi Prism and RadPHP XE2 (Version 4.0). Delphi XE2 natively supports64-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 calledFireMonkey that supports Windows,Mac OS X and the AppleiPhone,iPod Touch andiPad 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 FireMonkeyforms andcontrols. 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 thatLinux operating system support "is being considered for the roadmap", as isAndroid, 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 (Version 5.2) and HTML5 Builder XE3 (Version 5.0) which was upgraded and rebranded from RadPHP. Delphi XE3 natively supports both 32-bit and64-bit editions of Windows (including Windows 8), and provides support forMac 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. There has been no major upgrade for either Embarcadero Prism or HTML5 Builder thence. Delphi XE4 is the first release of theFireMonkey mobile platform, featuring cross-platform mobile application development for theiOS Simulator andiOS 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 supportCOM, 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 (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, desktop, mobile, and 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 apps that connect desktop and mobile devices with gadgets, cloud services, and enterprise data and APIs. Also, it enables developers to extend Windows applications usingWiFi andBluetooth 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.

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 (ARM, MIPS and X86 processors). 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 (Community Edition)

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 andtype inference. Versions 10.3.1, 10.3.2, and 10.3.3 (November 21, 2019) were also released.

Roadmaps [ edit ]

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 [ edit ]


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

用户中心设计

用户中心设计

(美国)弗登伯格等编 / 高等教育出版社 / 2003-8 / 20.00元

本书以用户对最终产品或系统的所见及所感为出发点考虑设计方法,所涉及的产品从数据库软件到语音识别软件,在众多项目(医疗保健、金融证券、航空事业、保险业、汽车制造业及零售业等)中得到验证。内容包括:能带来突破性增益的针对UCD的完整的周期化方法;现有产品评测、机构评定以使其适用UCD方法;提高用户感知舒适度;在外延型/内适型应用环境下的软件设计、硬件设计、网站建设和服务中应用UCD;当前UCD优化及未......一起来看看 《用户中心设计》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具