Part 3 of my blog post listing new features in Delphi XE2. After an introduction and some focus on 64-bit, it is time to look into the updates to some core or "classic" Delphi features: RTL, VCL, and the like. 

Despite the 64bit compiler, the Mac compiler, and the FireMoneky initiative, there are some significant features in Delphi XE2 even for developers still fully focused on Win32 development with the VCL. I won't say this is an impressive release for Win32 VCL developers, but there are a few significant additions worth mentioning. There is one big change: all unit names have now a prefix indicating if they are part of the system, the VCL, native Windows and so on. Using alaises you can generally avoid changing the uses statements of existing applications, but I encourage you to move your own unit names and your uses statements to the full form whenever possible.

VCL Styles

The most relevant new feature for the VCL is the support for styles. Extending over previous support for themes, you can now select a set of colors and style elements (border lines, elements widths, and various effects) for the VCL controls. So you can pick a rather standard Windows style, go for extra blue, or select a dark and red set of colors to impress your users.

The way this works is you can refer to external style files at run time, loading them, or embed styles in your application as resources, using a special new page of the Project Options dialog box called Appearance. Another element worth noticing is that while themes were tied to the version of Windows you are running your application on, styles are totally independent. This means you can use a modern looking Windows 7-like style even when your applications run on Windows XP.

Notice that there are system elements the styles don't apply to, like common dialog boxes or drop down menus. Since these are managed directly by the OS, bypassing the VCL, styles don't apply.

More RTL

While VCL styles have been heralded by Embarcadero, many other features have passed almost unnoticed but add value for Win32 VCL developers. More than to the VCL itself, the new features relate with the to RTL.

For example, there have been extensions to the IOUtils unit to better support symbolic links, several methods added to the TPoint and TRect records, a new TOSVersion cross-platform structure, an abstract TLoginCredentialService.

The most significant RTL update, however, is ZIP support. Not only is this a very nice feature, but it has also been implemented in a cross-platform way. The new class is called TZipFile. Several other file management units, and particularly IOUtils.pas, have been also extended. 

Here Comes OBDC

There is a very significant new feature also on Delphi's native database side. The dbExpress architecture, in fact, has been extended with a driver for ODBC. With this driver you can connect with any database having ODBC support... which basically means any database. In cases a database vendor has an updated release, you should be able to support it right away using ODBC rather than wait for an updated specific dbExpress driver.

Given that even Microsoft has announced a push towards ODBC and away from OLE DB, this is quite interesting making dbExpress a more open and viable platform. Might have made sense to put this in the Professional version, but almost all of dbExpress is available in the Enteprise version only.

Cloud Clients

Finally, the Azure clients architecture introduced in Delphi XE has been significantly extended in XE2, becoming much more abstract. Not only there is a set of base classes sharing the core features of both Azure and corresponding AWS (Amazon Web Services), with specific behaviour implemented in subclasses; but there is also a rich set of classes representing the resulting data structures. Rather than returning a JSOn or XML string, the services return arrays of rows or arrays of fields, again in a way totally independent from the specific service. (I'm going to show this in one of my CodeRage session!).

More Coming

Other new features include the Mac compiler, FireMonkey, iOS support, and the DataSnap extensions. Stay tuned.