Join / Forgotten your password?
 
HomeFeaturesStoreForumsWikiWorkshopsJobsPortfolioGalleryEvents Members
 
> CGWiki Home       > Community Portal       > Current Events      > Recent Changes     > Random Page       > Join       > Support Forum       > Help     
 

Delphi

Delphi is an object-oriented programming language which bases on the programming language Pascal (invented by Prof. Niklaus Wirth at the ETH Zurich) and is developed by the company Borland. Today, the word Delphi means the IDE Delphi and the programming language "Delphi Language".

Contents

History

The early beginning

In 1971, Prof. Niklaus Wirth invented the programming language Pascal at the ETH Zurich and named it Pascal - in honor of Blaise Pascal, a mathematician and philosopher of the 17th century. Pascal was and is an easy to learn programming language which emphasized especially the developer's independence by concurrently having secure data types. The programming language gained that much popularity, that Prof. Ken Bowles ported the language to the Apple II at the University of California in San Diego (UCSD) and simultanously developed the "UCSD Pascal Standard".

Pascal as a Standard

In the early 80s of the 20th century, comparatively many universities used Pascal als their prefered programming language, but there were two different events that made Pascal even more popular:

  1. The "Educational Testing Service", the institution responsible for the entrance examinations in the USA, established a new examination using Pascal as the programming language. Only in 1999, Pacal was replaced by C++
  2. A small company named "Borland International" released the Turbo Pascal compiler for IBM Computers. The advantage of this compiler (adjacent to small changes to the language Pascal that improved the efficiency) was the incredible speed at which the compiler worked at that time: several thousand lines of code per minute. Borland extended the Pascal language continuous from Version 1-7 of Turbo pascal. Version 7 was the last Turbo Pascal version to be released.

Object Pascal & Delphi Language

In 1995, Borland released Version 1 of Borland Delphi, a new IDE for the Windows-Platform. For this purpose, Pascal was changed to an object-oriented programming language now called Object Pascal. With Delphi, new features arived at Pascal, namely: events, properties and exceptions. Unfortunately, Borland slept away the day they had to jump on the bandwagon of Win32 development and Pascal/Delphi lost its importance in the developers' world. The result was that more and more developers switched to C++. In 2003 (due to changes for the .NET Framework), Borland renamed Object Pascal to Delphi language because - as they said - the language has so many changes now, that it is not the original Pascal anymore.

.NET Framework and Delphi

Using Version 8 of Borland Delphi, Delphi developers were able to write their software for the .NET framework the first time. Sadly, this version of the Delphi-IDE turned out to be the buggiest and worst written Delphi-IDE ever. The result was, that the developers didn't adobt this version. Borland tried to antagonize and fixed a lot of bugs, but instead of releasing it as a huge patch for version 8, they released it as the next IDE: Delphi 9 or now called Borland Developer Studio 2005 (BDS 2005). Even the update prizes being so high, developers avoided to buy this version and as it turned out, that the BDS 2005 was very slow and not as performant as one might hope, even less did. This changed with the arrival of BDS 2006, when Borland decided to use an alternative memory manager that sped up the IDE to up to 80%. BDS 2006 is an Integrated Development Environment containing Delphi for Win32, Delphi for .NET, C++ Builder and C# Builder as well. You may develop your software for the .NET 1.1 framework and - with a few tricks - for the .NET Compact Framework. At the end of 2006, BDS 2007 (Codename Highlander) should arive, finally making it possible to compile to the .NET 2.0 Framework. In 2007, BDS 2008 (Codename Longhorn) will arrive allowing developers to write the software in usage of Avalon and Indigo, or now called Windows Communication Foundation and Windows Presentation Foundation.

The Developers Group & Turbo Delphi

In 2006, Borland decided to concentrate on the Application Lifecylce Management (AFM) and to sell the development of Borland Delphi. As it seems there were no well offers, the Delphi developers formed the group DevCo (The Developers Company) and worked on Delphi as long as there was no purchaser. This group was finally renamed to "The Developers Group". In the same year, Borland released (close to the turbo-tradition) Turbo-editions of their Developer Studio. There are available:

  1. Turbo Delphi for Win32
  2. Turbo Delphi for .NET
  3. Turbo C++
  4. Turbo C#

There is a free (as in free beer) version of each of the IDEs available, as well as a commercial one - but it is only possible to install one version! (on installation, the Turbo products search for other already installed Turbo products and if one is found, the installation process is aborded).


VLC

Delphi put his name on the map because of its component library used, the so called Visual Component Library (VLC). It was one of the first component libraries that made it possible to write software for windows in short time (so called Rapid Application Development: RAD). The VLC was in permanently extended and improved and is the only component library ever that is still available after 10 years. It is still used today and was transfered to the .NET Framework as well, so it is possible to port software written in Delphi/Win32 easily to Delphi/.NET.


Delphi Language

Delphi Language is an object-oriented programming language that is available in two different types: the one for Win32 and the one for .NET. They differ slightly because Borland had to make some changes to be possible to compile to the .NET Framework and to be CLR compatible. The base of all Delphi classes is TObject, similarly to Object in Java. Delphi does not support multiple inheritance like in C++, though it is possible to fake multiple inheritance with the integrated IInterface, that was originally induced to support Microsoft COM programming. It is also possible to write some sort of garbage collector with those Interfaces.

Example of a Class Declaration for Win32

unit Person;

interface

type
  // interface declaration for usage with e.g. COM
  IPerson = interface
    ['{CE6DD8B0-0A7D-4CD2-AD1F-ADF0AF44B3B7}']
    procedure setName(Value: string);
    procedure setFamilyName(Value: string);
    procedure setAge(Value: Integer);

    function getName: string;
    function getFamilyName: string;
    function getAge: Integer;
  end;


  // class declaration that implements IPerson
  TPerson = class(TInterfacedObject, IPerson)
  private
    FName: string;
    FFamilyName: string;
    FAge: Integer;

  protected
    procedure SomeProtectedMethod;

  public
    function getName: string;
    function getFamilyName: string;
    function getAge: Integer;

    procedure setName(Value: string);
    procedure setFamilyName(Value: string);
    procedure setAge(Value: Integer);
  public
    property Name: string read getName write setName;
    property FamilyName: string read getFamilyName write setFamilyName
    property Age: Integer read getAge write setAge;
  end;

implementation

procedure TPerson.setName(Value: string);
begin
  FName := Value;
end;

procedure TPerson.setFamilyName(Value: string);
begin
  FFamilyName := Value;
end;

procedure TPerson.setAge(Value: Integer);
begin
  FAge := Value;
end;

function TPerson.getName: string;
begin
  result := FName;
end;

function TPerson.getFamilyName: string;
begin
  result := FFamilyName;
end.

function TPerson.getAge: Integer;
begin
  result := FAge;
end;

procedure TPerson.SomeProtectedMethod;
begin
  { ... this is a 
    multiline comment ... }

  // this is a line comment

  (* another multiline
     comment *)
end;

end.


External Links

  1. Borland
  2. Turbo Explorer



External Links