RAD Studio (Common)
|
This release provides key new features for developing applications using both Delphi and C++Builder.
Please note that this release is a breaking change in both Delphi and C++Builder. The main focus and feature of this release is the change from using ANSI-based strings to using a Unicode-based string type, appropriately named UnicodeString. This means that to use Delphi or C++Builder 2009 to work on pre-existing applications, you need to make some modifications in your code, largely related to string handling, and you need to successfully recompile your code.
About Unicode: The Unicode Standard has been adopted by many computer industry leaders, now including CodeGear. Unicode provides a unique number for every glyph, regardless of the platform, program, or language in use. According to the Unicode Consortium (http://www.unicode.org), Unicode is required by modern standards such as XML, Java, ECMAScript (JavaScript), LDAP, CORBA 3.0, WML, and so forth, and is the official way to implement ISO/IEC 10646. Unicode is supported in many operating systems, all modern browsers, and many other products. The emergence of the Unicode Standard, and the availability of tools supporting it, are among the most significant recent global software technology trends.
Incorporating Unicode into client-server or multi-tiered applications and websites offers significant cost savings compared to legacy character sets. Unicode enables a single software product or a single website to be targeted across multiple platforms, languages and countries without re-engineering. It allows data to be transported through different systems without corruption.
The IDE is fully Unicode-enabled, from top to bottom, left to right, and front to back. The entire IDE itself is now a Unicode-based application, requiring that all components and design-time code be based on the UnicodeString type as well. Unicode characters are fully supported in identifiers and strings. See Unicode in the IDE for more details.
There are some exceptions: You cannot use Unicode characters in DLL names. A few command line utilities such as MAKE, IMPDEF and IMPLIB cannot handle Unicode file names.
The change in the default string type affects other data types and many functions as well. For example, SizeOf(Char) is now 2 bytes, not 1 byte. Calls to Length(MyString) return the number of characters, not the number of bytes in the string.
You can also use Unicode in the command console by setting the font and code page properties.
First and most important, to use Delphi or C++Builder 2009, you need to make some changes in your existing code and then recompile your application to handle Unicode, as described in the help topic Enabling Your Applications for Unicode (Delphi) and Enabling C++ Applications for Unicode.
Backing Up Your Projects: You cannot migrate a project from the 2009 version to any earlier version. Before you open your existing projects in Delphi or C++Builder 2009, you might want to make a backup copy of the project so that you can restore the project in its entirety if unexpected problems occur.
Format of Project File Has Changed: For both Delphi and C++Builder, the format of the project file has changed in order to accommodate new features of this release. Project files have a file extension of .dproj, .cbproj, or .bdsproj. When you open any previously existing Delphi or C++ project, the compiler first saves a backup copy of your project file with the extension .2007.
The following message is displayed for a Delphi project (a similar message appears for a C++ project):
Project <project_name> is about to be upgraded. The project will no longer be usable with previous versions of the product. A backup of the project will be created. Backup project name: <editable_field>
A checkbox allows you to prevent the message from recurring and to always create backup files. The project file is opened and saved in MSBuild format, and then reopened in the IDE. Note that the compilers in Delphi and C++Builder 2009 are version 12.
The following changes have been made in the Delphi compiler:
The following changes have been made in the Integrated Development Environment:
The following key features are new or significantly changed:
C++Builder previously included code visualization in a one-way UML Class diagram viewer. C++Builder now has live code and two-way UML modeling in the Class diagram. This means you can work in the source code, work in the UML model, and move back and forth with full, live synchronization - "the code is the model, the model is the code."
C++Builder includes support for the Class, Use Case, Sequence, Collaboration, Component, Deployment, Statechart, and Activity diagrams.
The C++Builder modeling support also includes design pattern support including "create by pattern" and harvesting objects in your models with the "save as pattern." C++Builder supports Gang of Four design patterns including the Behavioral, Creational, and Structural groups of patterns.
When you want to generate HTML documentation for your project, you can right-click on any diagram, select the Generate Documentation pop-up menu item, and choose to generate diagrams, JavaScript navigation tree, and interfaces for the current namespace, current namespace with descendant namespaces, current diagram, or all diagrams.
The COM wizards have been revamped and enhanced for Delphi and C++Builder 2009, and one new COM wizard has been added (ActiveX Control). The wizards are available in the ActiveX and Multitier folders in the New Items dialog box. The COM wizards are: COM Object, Automation Object, Active Form, Active Server Object, Remote Data Module, Com + Event, COM + Subscription, Property Page, ActiveX Control, Transactional Object, Transactional Object, Transactional Data Module, Type Library, ActiveX Library. Both the ActiveX Library wizard and the Type Library wizard are project level wizards, and thus they are only available from the gallery if there is no active project. All other COM wizards are only available if there is a valid project open to contain them. See Using COM Wizards.
A new file type has been added to the COM architecture – the text-based RIDL file (Restricted Interface Definition Language). The RIDL file is the storage mechanism that the project uses to persist the type library data to disk. The binary .tlb file is now an intermediate file (like a .res, .dcu, .obj, and so forth). This means that you can rebuild the .tlb file from the command line (outside the IDE), that you can edit .tlb files using a text editor, and the history is stored by the IDE. See Saving and Registering Type Libraries.
The Type Library Editor now works on top of a .text file (the .RIDL file) instead of the binary .tlb. The .text file is compiled using the new type library generator, GenTLB.exe, to generate the binary .TLB file. This change means that:
The following key features are new or significantly changed:
Many changes have been made to improve support for database application development.
Unicode support has been added to the Oracle, Interbase, and MySQL dbExpress drivers.
The dbExpress driver framework has these changes:
DataSnap is a multi-tier architecture for database applications. DataSnap provides a middle-tier application server that contains and manages remote data modules. DataSnap has been enhanced to provide a very general connection mechanism between components in different tiers.
The new class TDSServer manages the creation and lifetime of transports and server method classes. You can use TDSServer to create your own middle tier server. The new component TDSServerClass can be used to specify an application server-side class with published methods that can be called from a remote client using dynamic method invocation. Methods in this class can be called from remote clients, such as the DBX Client Provider or the ADO.NET provider.
Once you have connected to a DataSnap server, you can call methods in an application server similarly to stored procedures. For instance, you can use the new class TSqlServerMethod to call server methods by specifying a text class and method name for command text and parameters for the method. Server methods can use a TDBXReader to receive and return datasets to and from the client.
The new smart tables are an abstraction of the different datasets Datasnap supports, so they can be passed transparently between client and server.
You can still write application server side classes that extend TRemoteDataModule, so that the providers they contain can be accessed by the new client-side TDSProviderConnection client component. TDSProviderConnection provides connectivity to a DataSnap server using dbExpress and is provided to keep existing applications compatible and take advantage of new DataSnap features. New applications do not need to use TRemoteDataModule or TDSProviderConnection with DataSnap.
Application servers need not be connected to databases at all. A server methods class has only two requirements:
Getting BlackfishSQL Licenses: The way you get deployment licenses for Blackfish SQL has changed. You no longer use the .slip file that was previously included with the product. Now you can generate a deployment license file online at http://reg.codegear.com. For more information about installation, deployment, and licensing, see the Install, Deploy, and License files located, by default, at C:\Program Files\CodeGear\RAD Studio\6.0.
Protected API Now in the Help: Protected methods (procedures and functions) and protected properties are now included among the API help topics.
See a Preview of VCL Components in CDN: For an illustrated summary of new and enhanced components for this release, see this article by Anders Ohlsson:http://dn.codegear.com/article/38349.
See Some of the New VCL/RTL Features to Support Unicode: This CDN article is Part II of Nick Hodges' series about Delphi in a Unicode World. He describes highlights of API for Unicode, such as Character and TEncoding: http://dn.codegear.com/article/38498.
Microsoft Windows Compatibility: Some components, classes, methods, and properties are compatible with the look and feel of the Windows Vista operating system. For a list of controls that are available on Vista, see Components Available Only on Specific OS.
VCLJPG to VCLIMG: The vcljpg package was removed and its contents are now in vclimg. Update projects using vcljpg to use the vclimg package instead.
TDataSet Changes in Bookmark Handling: DB.TDataSet has some significant changes in its handling of Bookmarks:
var Bookmark: Pointer; begin Bookmark := MyDataSet.GetBookmark; ... MyDataSet.GotoBookmark(Bookmark);
For handling strings in the new Unicode mode, you might need to use the SysUtils.TEncoding class as described in Using TEncoding for Unicode Files.
The following classes have enhancements:
One of the new features is support for the 2007 Microsoft(®) Office Fluent(TM) User Interface. This is commonly known as the ribbon. The ribbon is managed by TActionManager. TActionManager allows you to develop more usable applications by deploying the IDE to create ribbons for your Delphi application. Using TActionManager enables you to create commands, buttons, and graphics linked to these ribbons.
Support for ribbon controls includes the following core components:
Ribbon Controls Demos: Three demos for ribbon controls are installed with the product. Go to My Documents | RAD Studio | 6.0 | Demos | DelphiWin32 | VCLWin32 | RibbonControls.
Related topics about ribbon controls:
ITE and ETM are now available for both Delphi and C++Builder.
The Integrated Translation Environment (ITE) is a part of the IDE that simplifies localizing your projects. ITE can create a new localized project from an existing project. ITE does not automatically translate text, but provides a dialog listing all text that needs to be localized and fields in which to enter the corresponding translated text. Once you have entered the translated text and built the localized project, you can set another language active and display a form in the localized text; you don't have to switch locales and reboot your system. This allows you to perform localization without requiring a localized system.
The External Translation Manager (ETM) is a standalone application that works with DFM files and text strings in the source code. Although ETM does not allow you to create a new localized project, it does provide a dialog listing localized text and the translated text, similarly to ITE.
Command Help: Help is now available for the commands on the various drop-down menus in the IDE, such as the File menu and Component menu.
Optimizing Your Access to the Online Help: Do you sometimes have frustrating problems when you try to use the online help? See the following article in CodeGear Developer Network for valuable tips about using and customizing the help viewer, setting the filters and other options to control the Index and Search capabilities: Getting the Best Results with RAD Studio Online Help.
Protected API Now in the Help: Protected methods (procedures and functions) and protected properties are now included among the API help topics.
The F1 context-sensitive help dialog now displays RAD Studio results at the top of the list.
Enabling Unicode in Your Application
Enabling C++ Applications for Unicode
TCHAR Mapping for Unicode in C++
Transformation to Source Code Overview
Tiburon Sneak Peek: COM - by Chris Bensen
Tiburon Sneak Peek: Project Options - by Chris Bensen
Saving and Registering Type Library Information
Tiburon DataSnap Enhancements - by Steve Shaughnessy
Preview: Some New and Enhanced Components in Tiburon - by Anders Ohlsson
Delphi in a Unicode World Part II: New RTL Features and Classes to Support Unicode - by Nick Hodges
Webinar Replay: What's new in Delphi 2009
Using TEncoding for Unicode Files
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|