Delphi 2009 Review

Delphi 2009 is available in three editions. The Professional edition is designed for building desktop and workstation applications. The Enterprise edition includes everything in the Professional edition, and adds support for building client/server and multi-tier database and web applications. The Architect edition includes everything in the Enterprise edition, plus logical and physical database modeling and optimizations from the Embarcadero ER/Studio Developer Edition.

Delphi 2009 can be installed on Windows Vista, XP, 2000, Server 2003, or Server 2008. The created applications can be deployed on any of these operating systems. Delphi 2009 creates pure native Win32 applications. Applications created by Delphi 2009 do not require any .NET runtime support. The Delphi IDE does require the Microsoft .NET 2.0 runtimes.

Applications developed with Delphi 2009 will not run on Windows 98, 95, and ME, as these operating systems do not support Unicode. Microsoft has previously dropped support for these operating systems. Delphi 2009 can coexist on the same computer with earlier versions of Delphi.

Delphi 2009 can be purchased as a stand-alone product or bundled with C++Builder. With the bundled Delphi C++ Builder 2009 product, you can choose to install both languages, or just the Delphi portion of the bundle. I decided to install the Delphi portion of the bundled Delphi C++ Builder 2009.

I've been using Delphi since version 1. I'll provide an overview of the new Delphi 2009 features, and include my assessment of the latest version of Delphi.

Installation of Delphi 2009 is faster than previous Delphi versions. Two surprises I encountered during the installation were that a desktop icon was not created and the IDE help files were not installed during the program installation. Quick navigation with Windows Explorer corrected these omissions.

Language Enhancements

The most requested enhancement Delphi developers requested is support for Unicode. The default string Type is now UnicodeString. All VCL components have been Unicode-enabled. Unicode support has been added throughout the IDE. Since there is no compiler switch for Unicode or non-Unicode, the developer can not use the same source code files to create two different compiled versions. Integrated translation tools have been added to help the developer extract resources and translate their applications into other languages.

Generics are lists (collections) which are Type safe. Developers can create a generic TList, and declare what Type it will contain (integer, string, arrays, records, objects, and interfaces). This is an easy way to create and manipulate a TList of any item type. Adding generics to Delphi2009.Win32 maintains compatibility with the Delphi.Net platform, first introduced in Delphi2007.Net.

Anonymous methods are procedures or functions that do not have declared names. These procedures and functions can be assigned as a variable or used as a parameter to a method. Anonymous methods can be used to extend the lifetime of a value, even if the value goes out of scope. These methods capture the heap address of the value, not the actual value. They are similar to 'closures' defined in other languages.

The explanations I found in the help file and on-line were not able to convince me to start using anonymous methods. Existing Delphi language statements can be used to obtain the same results as anonymous methods. At this time I believe anonymous methods will make Delphi code harder to follow, and I can't think of any situation where I would need to use them in my current projects.

Class Explorer

The Class Explorer (browser) allows the programmer to browse, navigate, and inspect the structure of their code. Classes (inheritance) and members (fields, methods, and properties) are viewed in a hierarchical tree of objects. The Class Explorer can also be used to add fields, classes, methods, and procedures to an existing class library.

Resource Manager

Resource files are used to insert resource types (fonts, text, graphics, cursors, etc.) inside an executable file. This process protects the resources and reduces the total number of files to be distributed with an application.

Prior to Delphi 2009, developers created resource files independently of their projects. Developers created their rc text files, compiled each rc file to create the resource file, and added the resource filenames to their unit code files. If any file included in the original rc file was changed, the developer needed to recreate the corresponding resource file.

The Delphi 2009 IDE includes a new resource manager to add and update the resources inserted into Windows applications without creating separate rc files. A new common resource file can now be added to the main project file. This avoids resource duplication in form files and reduces the size of the executable. Common and form resource files are automatically updated during compilation if any of the included resources were changed.

Build Configuration Management

A new base (parent) configuration has been implemented. The base configuration includes all common project settings for a project or project group. Common project settings typically include source code locations, search paths, etc.

Common project settings are inherited from parent configurations, and can be revised as needed for debug, release, and additional developer created configurations. Subsets of project options, called option sets, can be quickly copied to new projects and project groups.

VCL Enhancements

All VCL components have been Unicode-enabled. Many components have been enhanced to allow developers to take advantage of the new Vista features, like the Aero 'glass frame' property. Custom hinting has been added to all TControls. Hints can now include a title and image. Hints can be designed to have a more modern look instead of being restricted to the familiar yellow box. IntelliMouse scrolling support has also been added. TImage now supports PNG, BMP, JPG and GIF formats. This allows greater flexibility for user interfaces. Four new components have been added.

New Components

The Microsoft Office 2007 style ribbon controls include the ribbon interfaces, including ribbon, ribbon application, menu bar, combobox, toolbar and tips. You may not distribute applications using the Delphi ribbon controls without obtaining a license from Microsoft. A license can be requested from Microsoft at http://msdn.microsoft.com/officeui.

The TCategoryPanelGroup contains a collection of collapsible panels, similar to the 'outlook bar' control in Microsoft Outlook. Each collapsible panel can contain other VCL controls.

The TButtonEdit component can include glyphs on the left and right side. When the image is clicked, the attached code will be executed.

TLinkLabel is a label that enables links with embedded HTML tags. The OnClickLink event can be used to open a web page in a browser.

Existing Component Enhancements

Images can be placed anywhere on the TButton through alignment and padding properties. Vista 'Style' support has been added to TButton. This allows TButton to support the command link and split button features of Vista.

A text tip, for example 'Enter password here', can be displayed in a TEdit when it does not have focus. When the control receives the focus, the text tip disappears. A new NumbersOnly property has been added to limit keyboard input to number associated characters. A user-defined password character property has also been added.

Marquee scrolling has been added to TProgressBar. Different Vista styles (Normal, Paused, and Error) are also supported. TListView now supports placing items in groups. An image can also be displayed with the group heading. Different glyphs for nodes (depending if they are expanded or collapsed) are supported by TTreeView.

VCL for the Web

Developers can use a large collection of over 70 components to build full-featured AJAX-enabled web applications. VCL for the Web is the fully integrated IntraWeb version 10 from www.atozed.com. Web applications developed with the Professional edition have a limit of 5 connections. There is no connection limit for applications developed with the Enterprise and Architect editions.

VCL for the Web documentation consists of a five page tutorial to create the typical 'Hello World' web application as a proof of concept. At that point, I'm puzzled as to what to next. Delphi help indicates http://www.atozed.com/intraweb/docs/ has more documentation. Their web documentation duplicates the tutorial, and most of the other pages haven't been updated since 2005. Their web site states 'We are currently working on improving our online documentation. This first revision may be ugly!' The poor documentation in the Delphi help file and the Atozed web site is not helpful to someone who wants to learn VCL for the Web.

DataSnap

DataSnap is a complete set of tools for building scalable, multi-tier applications. DataSnap is only available with the Delphi Architect and Enterprise editions. This COM-free solution enables the Delphi developer to write Server Methods (i.e. Stored Procedures on the middle-tier server). Middle tier application servers can be created and connected with thin clients.

Summary Suggestions

Codegear has done a great job changing Delphi to support Unicode. The translation tools will be appreciated by developers wanting to expand their software to global markets.

I believe a number of 'features' (Generics, Anonymous Methods, TStringBuilder) were added to Delphi 2009 for .Net compatibility. These are positive features for the developer trying to have a single source for Delphi Win32 and Net projects. Popular string manipulation libraries (HyperString and FastStrings) are no longer being updated by their developers. Converting these applications to the new Unicode base will require extra effort.

I felt it was odd that the IDE help files were not installed during the program installation. I consider help files to be an integral part of any program for all users. And considering I was offered the option to install Rave Reports and Interbase 2009, it would make sense to me to at least provide the option to install the IDE help files with the installation of the main product.

The help file information for both Delphi and C++ Builder are merged together. Since I installed the Delphi portion of the Delphi C++ Builder 2009 bundle, I did not expect to find C++ information mixed with Delphi information. The additional nonrelevant information causes confusion similar to the mixture of Delphi and Kylix help in previous Delphi versions.

Poor documentation of COM, ActiveX, VCL for the Web, and DataSnap will prevent developers was using the full potential of Delphi 2009. If developers can not understand new and advanced features, they will not be using the development platform, and not upgrading to newer versions.

A lot of my Delphi knowledge has come from reading supporting third party Delphi books. Since that market has virtually dried up, Codegear needs to take the lead and document their development software. CodeGear needs to put a lot more resources into fixing the help system, which has been a continuous complaint since Delphi 7.