Monday, July 30, 2007

What's new in Delphi 2006

What's new in Delphi 2006
By: Jason Vokes
Abstract: Read this article for an overview of new features in Delphi 2006, part of Borland Developer Studio
by Jason Vokes and Malcolm Groves

Table of Contents


Borland Developer Studio 2006 is the latest Integrated Development Environment product release from Borland Software Corporation. Borland Developer Studio includes Delphi 2006, C++Builder 2006, and C#Builder 2006.
What has always set Borland apart from other vendors has been its pragmatic approach to providing developer tools that are right for the challenges that commercial developers face today, while leading them into the emerging technologies of tomorrow with the confidence that their development investments remain relevant, adaptable and extendable in the future.
This paper provides an introductory look at what makes this release compelling from a Delphi perspective. While this document covers features that span Delphi, C++, and C#, it focuses on the Delphi capabilities and is not intended to cover specifically whats new for the C/C++ language specific capabilities.
Delphi 2006 is the tenth version of Delphi, Borlands flag ship Rapid Application Development (RAD) environment and continues the Delphi's RAD traditions and has extended capabilities in significant areas with considerable implications for software developers at every level.

    What's New

Delphi 2006 is now considered to be part of the Borland Developer Studio (BDS) product set; the range of boxed products includes Delphi 2006, C++Builder 2006 and C#Builder 2006 (which are sold separately) even though each one offers the same support for all languages with capabilities varying only according to the edition (Professional, Enterprise and Architect). Here we are going to focus on the capabilities of Delphi 2006 Architect Edition. There are four distinct language "personalities", as can be seen in Figure 1.
Figure 1: The "Personalities" of Delphi 2006


As organisations will already be running a range of software applications and software services it can very often make perfect business sense to reuse existing, well-written and proven systems rather than immediately making the move to "rip and replace" merely for the sake of adopting the latest technology. This is rarely a luxury that organisations can risk or afford. This is where the benefit of Delphi 2006 comes into its own, as a mix of the project types shown in Figure 2 would not be uncommon for a multi-faceted business system.
Figure 2: Delphi 2006 Project Group Flexibility
As you can see in Figure 2, we have a Win32 C++ DLL that could be providing communication interfacing to some form of device (such as manufacturing, banking equipment or data feed), we have a Delphi Win32 application – in this case a multi-tier DataSnap application – that could interface with the C++ DLL and persist information to a database - and then, to provide Web access, a C# ASP.NET project completes the suite. All of these projects can be developed and managed as a suite of software projects within a single Delphi 2006 Project Group.
This affords the Delphi 2006 developer a great deal of power and flexibility to make the most of all types of development opportunities and with the architecture diagram shown in Figure 3, you can see the broad scope that this provides.
Figure 3: Delphi 2006 Architecture
There are many new levels of features in Delphi 2006. These range from high level Application Lifecycle Management (ALM) features, down to low level coding empowerment. Borland have also been keen to express the focus that there has been on performance and responsiveness in this new release and this can be evidenced by the likes of an updated memory manager for the IDE to help support and power some of the new features that are detailed below. Also, IDE start up time has in general been improved, but this can be enhanced further by choosing to only install the language personalities that you want to use at any point in time. In fact it is a simple "–p" command line argument to load just a single personality should you choose. For example, "-p DelphiDotNet" would load only the Delphi .NET personality and such shortcuts are added to the Start Menu as part of the BDS installation for each of the personalities.

    Personal Developer Productivity

Some of the new features that are the most fun and also provide the best minute-by-minute advantage to the developer are the coding level improvements. This is a department where Delphi 2006 will not disappoint. With new features such as:

    Block Completion

When you just know the IDE could complete the "end" for your "begin". This makes for a great addition for speed coding. The IDE will also recognise if you continue a string constant over several lines and provide continuation quote and '+' entries to support this.

    Change Bars

Shown in Figure 5, these provide an instant indication of exactly which code lines have been saved and which lines you have inserted or changed since you last saved the file.
Figure 5: Change Bars down the left-hand side, clearly
Indicate what's been changed since your last save


Refactoring provides the means by which we can automatically change source code with the intent of improving its design rather than changing its behaviour. New refactorings have been added that use the refactoring engine that was introduced in Delphi 2005. Some of the key new refactorings included are Introduce Variable, Introduce Field, Inline Variable, Safe Delete and one of my favourites, Change Parameters, can be seen in action in Figure 6. To add to the new refactorings that are available there are also Together refactorings that can be applied from the Model View.
Figure 6: New "Change Parameters" Refactoring in Delphi 2006

    Live Templates

A significant new addition to Delphi 2006 is the new context sensitive and dynamic Live Template system. This is a worthy replacement for the Code Snippets and Code Templates that Delphi had for some time. (By the way ctrl-J can still be used in-situ to instigate Live Templates) With a wide range of commonly used templates being delivered, you are also free to copy, extend, change or add new templates of your own. Each template is stored in an XML file format in the objrepos\code_templates folder, and then a sub-folder exists for each language type. Templates either execute automatically, or are offered to the developer from within the code editor via the CodeInsights mechanism, as can be seen in Figure 7.
Figure 7: Live Templates Selection
Templates automatically assist the developer in writing commonly used code constructs. You can see how they are presented in Figure 8 shown here are the different forms of "for" loop template that are provided.
Figure 8: Live templates do more than just insert code
One you choose to execute a template, it does not stop there by just streaming code into the editor. Here comes the "Live" part. During the execution of a template "stop points" provide the developer with the opportunity to work with the template to affect the outcome of the template execution, by operations such as contextual refactorings and other active content based on sub-scripts within the templates xml code.


When you select a block of code now, you can right click and choose the "surround" option from the speed menu. This provides you with the options as shown in Figure 9. So you can now rapidly add conditionals and loop constructs as your code evolves.
Figure 9: Surround Option


The Delphi team have done some great work, focussing on intuitive features that provide the developer with benefits that make every cycle faster and easier. The debugging enhancements include expandable views and more information at every level of debugging inspection. As you can see in Figure 10 there are several ways in which expandable information is available from inline expandable tooltips, expandable local variables and expandable watches. This provides the most convenient way to look directly into data values at the point of concern.
Figure 10: Inline Expanded Tooltips, Local Variables
and Watches while debugging
Some of the other notable new debugging features include enhancements to the way you can work with the detailed CPU view so that you can now select multiple items and copy them to the clipboard. There is also good news with remote debugging now being available for native Win32 applications, managed applications, and ASP.NET applications.


Persistence is a vital part of almost all commercial software development and Delphi 2006 continues to improve the support that Borland developers have enjoyed for major enterprise database severs. Developers are still provided with a consistent, fully functional, yet native access to different databases, with the driver support being updated to the following database versions…
Enterprise Database
Name and Version
dbExpress (Win32)
Borlandâ InterBaseâ v7.5 and 7.5.1
Oracleâ 10g
MSDEâ 2000

Microsoft SQL Serverä 2000

Microsoft SQL Serverä 2005
Informixâ 9x

IBM DB2â 8.x
MySQLâ 4.0.24
SQL Anywhereâ 9

Sybaseâ 12.5

Table 1: Database Drivers Available in Delphi 2006
There is a welcome addition for Win32 developers; dbExpress has now been fully integrated into the Database Explorer. This provides full access to view and change data in the tables that you access through dbExpress drivers from within the IDE.
On the .NET side, full connection pooling has been added to Borland Data Providers (BDP), this provides a major performance boost to applications, especially those that serve many requests from multiple clients, such as ASP.NET Web applicaitons. You can now use connection pooling to decrease connection time by using a connection from an existing pool. As you can see in Figure 11, database connection pooling options are available on the Connections Editor dialog box.
Figure 11: BDP Connection Pooling Options from within the Connection Editor

    Together for Delphi

One of the most exciting new additions to Delphi 2006 is that it now includes a full standard UML 1.5 and UML 2.0 Together modelling capability. The benefits of this functionality will apply to all types of developers, from the very code centric, through to those utilising modelling as part of a more extended application life cycle approach.
With the core Together engine having been re-written to ensure the responsive of the seamless integration, the LiveSource capability can provide a fresh view on existing code, and enables you to view and change code from the diagram view, as well as create code by making design changes. There are several key interest areas: diagram types, design patterns, audits, metrics and documentation generation that we will cover here. There are also new things that come with the Together integration, such as model refactorings that nicely supplement the code editor refactorings.
Figure 12 shows a section of code and how it would be represented, and ready to change and adapt from the model view. As you change the diagram, the code changes and as you change the code, the diagram represents the code.
Hide image
Click to see full-sized image
Hide image
Click to see full-sized image
Figure 12: LiveSource in Action

    Diagram Types

The UML diagram types supported have been greatly extended from Delphi 2005, the following diagrams and constructs are available: Class diagram, Use Case diagram, Sequence diagram, Collaboration diagram, State chart diagram, Activity diagram, Component diagram, Deployment diagram, Class, Interface, Structure, Enumeration, Delegate, Namespace, Object, Constraint and Note. You can see in Figure 13 the UML diagram types that are now available from the Add New Diagram dialog box.
Figure 13: Delphi 2006 UML Diagram Types

    Design Patterns

Through many years of working with a strong object oriented language and using a component based approach, Delphi developers often achieve some of the highest levels of reuse. Reuse levels can be extended further thanks to the inclusion of a Design Pattern repository that comes ready loaded with the most commonly used industry design patterns, such as the Iterator pattern shown in Figure 14. A key part of the power of this facility is that you can also store organise and share your own design patterns from models that you develop, or from code that you reverse engineer. When you also add to this the new facility to import and export using XMI as well as MDL, you can even share designs from other tools, languages or even other platforms such as Java.
Figure 14: "Iterator" Pattern from
the Design Pattern Repository

    Quality Assurance Facilities

Delphi 2006 provides new capabilities that unobtrusively enable developers to provide quantitative and qualitative information on code quality. There are two ways that Delphi 2006 can overtly help you with you quality assurance, Audits and Metrics.
These can be used to either prove the quality of software as part of a handover, as well as to help developers comply with coding standards. They can also be used to incrementally check on quality progress through a project.
The Audits facility checks that code conforms to sets of specific rules. The rules that you check against are configurable and configurations can be stored and reused. You can also save the results of an audit in either XML or HTML formats. There is a wide variety of audits that you can apply, ranging from design issues to naming conventions. The developer is also provided with descriptions of what each audit looks for and how to fix any violations that may occur.
Metrics provide quantitative information for the purposes of quality assurance and will enable better informed decisions to be made with regards impact analysis of proposed change. Running metrics on code provides you with detailed information on how complex a piece of code is and can instantly highlight parts of the code that may cause design concerns. You are also provided with tips on how to use metrics and how to interpret the results. The results of the metrics are provided in a integrated window in tabular form, however, Figure 15 shows a Kiviat chart view, one of the graphical ways that Delphi 2006 can assist you in proving your own code, or understanding and working with other people's code.
Figure 15: Kiviat charts provide instant "pulse"
of metrics analysis results

    Documentation Generation

From the Model View you can now automatically generate comprehensive HTML based documentation. You can configure the scope that you wish to apply and you are able to select which parts of the documentation you would like to be included, such as the diagram itself and an applet based navigation tree.
This capability liberates the team from having to write up and maintain documentation as changes apply or as the project progresses and makes it easier to focus on delivering the actual code. Another useful way to apply this capability is to run the documentation on existing systems that may have been written by other developers, or code that has been delivered without comprehensive supporting documentation. You can see a snapshot of a generated documentation set in Figure 16.
Figure 16: Complete and up to date documentation on demand
with Documentation Generation

    ECO III – Model Driven Development

Enterprise Core Objects (ECO), Borland's Model Driven Framework was first introduced in C#Builder 1, with ECO II debuting in Delphi 2005. Since then, ECO has provided many customers with a dramatic improvement in development productivity and quality of the delivered applications.
ECO provides a significant productivity boost as it automates much of the code needed to implement your application's architecture, code that with any other modelling solution you'd need to implement manually. It does this by querying the model information at runtime and then using that information to automatically perform services such as persisting your objects to a database, enforcing business constraints and much more at runtime with no additional code required from the developer. The combination of a deeply integrated Together to create the model at design time, and a runtime framework like ECO to consume that model results in the fastest way to build and maintain .NET applications.
For more background information on general ECO development, please refer to the appendix for references, we are going to focus here on additional functionality provided with Delphi 2006 and with Delphi 2006, Borland deliver ECO III, which raises the productivity bar even further, through features such as State Machine support, ASP.NET AutoForms and Domain Patterns.

    State Machines

One of the major new features in ECO III is the addition of State Machine support, which allows you to express much more of your application's behaviour in the model. In turn, ECO can query this information at runtime and automate even more of your application architecture than before.
Figure 17: ECO will automatically execute State Diagrams
As shown in Figure 17, Delphi 2006 uses the integrated Together UML designers to create the State Diagram. You can lay out the different states for an object, and using OCL (Object Constraint Language) you can define Guard conditions, basically, rules that must evaluate to true before an object can transition from one state to another. You can also define Effects, behaviours that must occur when an Object transitions from one state to another.
Once these are defined, the ECO framework can execute your state machine at runtime, enforcing Guard conditions and executing Effects automatically. No code required. What was once a time-consuming, error-prone task during development and maintenance is now much more intuitive and productive.

    ASP.NET Autoforms

When building an ASP.NET front-end to an ECO application, ECO can now dynamically generate web pages to allow you to interact with your domain model. You can see an example of an ASP.NET application with Autoforms in Figure 18.
Figure 18 : A dynamically-generated ASP.NET UI for prototyping
This allows you to move very fluidly from defining parts of your application in the model to verifying those changes, and if necessary, going back to tweak your model. This iterative approach is incredibly productive, and difficult to achieve if you need to define your UI elements before being able to test the changes to you model.

    ECO Action Language

Continuing the theme of expressing more of your application logic in your model rather than in code, ECO III introduces the ECO Action Language. This is an extension to OCL, allowing you to both define the implementation of methods in your model, as well as invoke other methods from within you model. This even further reduces the amount of hand-coding required in order to build a sophisticated application.

    Domain Patterns

Further leveraging the deep integration of Together into BDS 2006, you can now define common Domain Patterns, commonly occurring collections of business objects, and store these in a central repository so your entire team can leverage a consistent set of definitions of the business problem you are solving.

    ECO is Everywhere

Since Borland first launched ECO in the first version C#Builder, developers have found it has greatly increased both their productivity and the enjoyment they get from building applications. With this in mind, all Delphi developers can now get to experience ECO, and as a result, ECO is now included ECO in all Delphi 2006 editions.
Delphi 2006 Professional users will be able to build Winform-based ECO applications and persist their data to XML files. In addition, Enterprise Edtion developers can extend their ECO applications to the Web using ASP.NET, and persist their objects to relational databases such as Interbase, SQL Server, Oracle and more. Lastly, Delphi 2006 Architect developers gain State Machine support, as well as the synchronization features needed to deploy their server-side ECO apps across multiple servers.

    Team Productivity

With Delphi 2005, Borland introduced industry-leading integration for activities such as configuration management, bug tracking, feature change requests and team discussions. These activities are at the heart of every effective software development team, whether the development team are in different cubicles, different buildings or even different countries.
Delphi 2006 continues this determination to simplify team development by enhancing the existing capabilities, as well as extending them into new areas such as Requirements Management.


Requirements are the voice of your customer. These are the things that they are expecting to see in the software that you are building. Therefore it is absolutely critical to the success of your project that the voice of your customer be heard across all the people involved in the project.
If you can open some source code and, in addition to the developer comments, you can see the exact customer requirement that the code is attempting to fulfil, along with all the discussions and comments made by other people on the team, then you will have a much better context in which to make decisions.
Figure 19: Delphi 2006 provides fully integrated requirements management
It is for these reasons that BDS 2006 introduces deeply integrated access to requirements stored in CaliberRM, as you can see in Figure 19. However, this is far from a static, read-only view of the requirements. Developers are empowered to become fully involved in the evolution of the business requirements: you can edit existing requirements, create new ones, take part in online discussions about requirements, and even use drag and drop to create traces between requirements and source code assets.

    Change and Configuration Management

While previous versions of Delphi have supported integration of Change and Configuration Management, as you can see in Figure 20, Delphi 2006 takes this further.
Figure 20: Change management integration and
server software is included.
It's not uncommon to need to keep track of multiple items in your repository while you are working. You may have two bug reports that relate to the same issue, as well as a discussion thread you've been part of where you are discussing the solution. In Delhi 2006, the Shortcuts window lets you have a docked pane in the IDE that gives you one-click access to all of these items relevant to your current work.
You also have a Pending Checkins pane that allows you to see at a glance the items you have worked on that have not yet been checked into the repository. Similarly, the Pending Checkouts pane allows you to see the changes that others have made that you have not yet pulled down from the repository. The combination of these two new views makes it extremely simple to keep track of changes that you and other members of the team are making.


With this, the tenth version of Delphi, Borland have continued to focus on two main areas, innovation for software delivery productivity and extending support for application lifecycle management. The pragmatic approach of providing a mix of the major languages and platforms in use commercially on Windows, as well as enabling both migration and interoperability between Win32 and .NET makes Borland Delphi (Borland Developer Studio) this a flexible choice for commercial developers.
Although many developers continue to embrace the .NET platform, there are still many organisations that continue to need support for developing Win32 software, either from scratch or in conjunction with .NET. Delphi 2006 provides the most effective way for developers to manage this.
Borland have been providing extended application lifecycle support for some years now, in fact Delphi developers got their first taste of this back with Delphi 7 in 2003. The developer centric application lifecycle management (ALM) support that now shows greatly increased maturity in this release enables development teams to choose to use ALM on an open standards- and as needed- basis, and not to be forced to use any particular process. This enables developers to optionally hook into backend enterprise development services while at the same time be able to work in ways that best suit both their style and their customers or users.


    About the Authors

Jason Vokes is Borland European Product Line Manager for Delphi and C++ and frequently represents Borland internationally as a conference and seminar speaker. Jason is the author of 'C++ Builder for Dummies' and has written numerous technical white papers on software development and associated IT topics.
Malcolm Groves is Borland's Asia Pacific Product Director. Based in Sydney, Australia, he has been a regular presenter at developer conferences throughout Asia, the United States and Europe, as well as an Instructor for Borland Delphi, C++Builder and JBuilder training courses. He also regularly writes for developer magazines, including The Delphi Magazine.

Published on: 12/12/2005 12:00:00 AM
Server Response from: USSVS-BDN9
Borland® Copyright© 1994 - 2007 Borland Software Corporation. All rights reserved.

Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.