Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Dr.Bob's Delphi Notes Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
 Dr.Bob Examines... #128
See Also: Dr.Bob's Delphi Papers and Columns

Delphi XE
The RAD Studio Team at Embarcadero has produced its annual upgrade product again, and this time the version numbers – replaced by year annotations in 2004 – are replaced by the XE label to close the ranks with the other Embarcadero database and development tools. Apart from that, RAD Studio XE now consists of four tools again: Delphi XE, C++Builder XE, Delphi Prism XE (hosted in Visual Studio) and finally RadPHP XE, formerly known as Delphi for PHP, in its own IDE. In this article I will mainly focus on Delphi XE, and at a later point I will return to cover Delphi Prism XE.I’m afraid I haven’t used C++Builder a lot in the recent years, and left PHP aside (but may want to check it out now that we can build DataSnap clients with RadPHP XE).

Delphi Roadmap
First of all, for those of you who haven’t seen the updated roadmap, Delphi XE is not the cross-platform version of Delphi that can produce executables for Win32, Mac OS X and Linux. Neither does it contain any 64-bits support.These bits are delayed, and covered by the new roadmap.According to this, we can expect the 64-bits preview command-line compiler in the first half of 2011, and is followed by the other projects that slowly but surely introduce compiler support for Mac OS X clients, followed by Linux Servers and 64-bits Servers and Clients.Apart from the 64-bits compiler preview, there are no longer dates associated with the roadmap projects, which is smart in my view, since it prevents the usual disappointment when target deadlines slip and functionality is not delivered when people hope for it.

No Mac OS X
Anyway, without Mac OS X and Linux support, what do we find in Delphi XE? The main answer is bug fixes. There has been a growing sense of quality assurance within the Delphi Team, and the fact that Mac OS X support is not part of Delphi XE can probably be explained by this new desire for high quality releases.Better not to ship something (Mac OS X support) than something which would result in a bad first impression (anyone remember Kylix or Delphi 8 for .NET?).

Delphi XE – Bug Fixes
According to Quality Central, almost 1000 bug fixes have been implemented for the release of Delphi XE. Not all were bugs introduced with Delphi 2010 – some go as far back as 10 years or longer (i.e.before the new IDE, with bugs in the VCL or RTL).If your favourite bug(s) is not on the list of fixed bugs, then there’s a good chance it wasn’t on the list to begin with.I know a number of people who complain about Bug X or Bug Y but never report the bug, which results in a small chance it will be fixed.If you find a bug, please report it, and if you don’t want to enter it in QC yourself, then use the newsgroups or send it to me (as a last resort), so I can enter it in QC, which will significantly increase the chance of the bug being worked on and fixed. This applies especially to people who have used Generics in previous version of Delphi who may have encountered bugs and issues, and there has been a lot of work on the improvement of Generic support, so you may as well give it another go (if you gave up earlier).

New Features
There aren’t really that many new features in Delphi XE, although some are worth a mention. A fairly complete list can be found in the online help (which is now becoming truly online, as the help is also growing in the form of a wiki page) at http://docwiki.embarcadero.com/RADStudio/en/What%27s_New A very small new feature but welcomed by me is the option to select the form in the form designer, and then do Edit | Copy.This will place a copy of the form’s DFM contents (in plain text format) as well as a bitmap of the form at design-mode in the clipboard.When pasting in Word, for example, you can then select either the bitmap or the textual representation of the DFM file (and you can paste one after each other if you wish, for a complete description of what’s on the form).Ideal for people who need to make documentation or want to write articles or courseware manuals.After Delphi 7, with the introduction of the embedded designer, the process of producing screenshots of forms at design-time was not as easy as with Delphi 7 (or earlier versions of Delphi), where we could just select the form, press Alt+PrintScrn and paste the contents.I reckon not a lot of people will use it, but my productivity as a writer has gone back up. Another small feature enhances the process of working with different build configurations.In previous versions of Delphi, the Release and Debug builds would end up in the same place.And I sometimes accidentally shipped a Debug build to a customer, where I meant to ship the Release build.Especially embarrassing if you include code snippets in the main project file to report any memory leaks at shutdown using:

{$IFDEF DEBUG}
  ReportMemoryLeaksOnShutdown := True;
{$ENDIF}

With Delphi XE, the output of the Debug and Release builds are placed in different directories on your hard drive.Sure, this could be configured in Delphi 2010 as well, but now we get this functionality out of the box, which is helpful, and avoids any future embarrassment for me. The RTL and VCL haven’t been extended a lot, compared to previous releases, although there is now a new TRegEx record (not a class), which offers regular expression support.It’s actually the open source project from Jan Goyvaerts, which mimics the regular expression support found in the .NET Framework. For SOAP v1.2 clients, there is now new support for client certificates.Previously, we had to override the THTTPRio class and override a number of methods and events, but now there is a new property ClientCertificate of the HTTPWebNode property, which exposes the CertName, Issues and SerialNum subproperties, including a nice dialog where we can select the certificate at design-time (of course, this certificate must be present at run-time on the client’s machine in order to run).This greatly reduces the effort to release SOAP clients that require certificate support. Web development in general has been extended as well: the WebBroker, Web Service and DataSnap Web Service web server application wizard now offers two new choices: an Indy VCL application and an Indy Console application.These offer the ability to build web server application with a built-in Indy HTTP server, so no IIS deployment is needed for these projects.This also greatly reduces the need for Web App Debugger executables, since we can now debug the Indy VCL applications just as easily.

Another nice feature, especially when working with someone else’s code, is the fact that the Code Formatter can now be used to format the entire project at once (even from the command-line), instead of just the active editor file at a time.And what’s even better is the fact that I can not only customise the Code Formatter’s settings, but I can also save (and on another machine load) my personal preferences and reformat a project’s source code to my liking.This significantly increases the readability of code written by others (which sometimes uses a less than ideal coding style). This brings me to another point: version control.Delphi XE now includes a SubVersion integration in the IDE, which means we can add projects to a SVN repository and then submit files to the repository, update files (from the repository to the local project) and view the SVN history.All from within the Delphi XE IDE.What’s missing – and a big miss in my view – is IDE support for Locking and Unlocking source files.This is a normal part of SVN, but for some reason doesn’t get exposed in the Open Tools API project (which is also open source by the way) for the SubVersion integration.Since it’s open source, my initial request for adding the Lock and Unlock got a response of “why don’t you have a look at the project [and add it yourself]”.Having looked at the Open Source project, I think it would be a better idea for the original authors to add this to their project (instead of me branching out and overwriting some working version of the code).If you agree with me, then please vote for Quality Central feature request report #87736 at http://qc.embarcadero.com/wc/qcmain.aspx?d=87736

Third-Party Add-Ons
Apart from the bug fixes, and new features, the so-called Tool Chest for Delphi Developers has increased again with the release of Delphi XE. And this makes me think back to the release of Delphi 7.There were not that many new features in Delphi 7, most were bug fixes, but there were a number of third-party tools included in the box (such as IntraWeb 5.x, Modelmaker, Bold) to make development easier.This time, the list of included third-party tools has grown by at least five new offerings.AQTime standard adds a number of profilers to Delphi, that can be used to profile not just performance, but also memory and resource usage, code coverage, unused units, and more.Raize CodeSite is probably known by a large number of readers, and the Express Edition is now available for all Delphi XE users.Same thing with FinalBuilder and Beyond Compare, two tools that are now bundled with Delphi.A final set of new components is from /n Software, and contains a subset of IP*Works!.These components do not mark the end of Indy, but they are mainly included because IP*Works! offers the same set of components for Delphi, C++Builder and RadPHP.The downside is that you can only have IP*Works! for Delphi or for C++Builder installed, but not both at the same time (and speaking of installing: the IP*Works! Setup is not done by the initial install – you need to download it from the Registered Users page on the Embarcadero website).

DataSnap and Cloud
A lot of effort has been put into DataSnap, REST and Cloud functionality (although the latter is only at the “getting started” level, and we should expect more functionality in the next releases). DataSnap has been extended with HTTPS support for IIS servers (ISAPI DLLs) and HTTPS support in DataSnap clients.Note that there is no built-in HTTPS support, yet, for stand-alone or Indy DataSnap servers.This is in theory possible (Indy supports HTTPS), but needs manual tweaking. Another enhancement is the two-phase communication protocol for filters, that now allows public/private key exchange between client and server.Note that if you use symmetrical encryption, then these keys are exchanged before the actual encryption takes place, which means that you need to use HTTPS to ensure that the keys themselves were passed safely.There are two encryption filters included in the box now, PC1 and RSA.I must admit that I’ve never heard of the former before I saw it appear in DataSnap. Another enhancement of DataSnap in RAD Studio XE is the new TDSAuthenticationManager, which not only supports authentication but also authorization.Apart from logging in people, we can now assign roles to the session, and use these roles to disable certain functionality.For example in the Server Methods unit, it’s easy to disable certain methods by using a special custom attribute to specify that a certain role is needed to allow the method (or a certain role is used to disallow that particular method).I’ll come back to this topic in more detail in a later article for the magazine. With DataSnap we can now build servers using Delphi or C++Builder Enterprise, and we can make clients in Delphi, C++Builder, Delphi Prism and even RadPHP.The DataSnap servers can use REST or DBX for the communication with the clients.The REST protocol is ideal for thin clients, but the thin clients have no support for DataSnap filters, so you must keep this in mind when designing your security.

Microsoft Azure support is added in the form of four components:

The Amazon EC2 Cloud support is surfaced in the special “Deploy to Cloud” wizard in the project menu, which can be used to deploy DataSnap Servers to the Amazon EC2 cloud. The dialog can be used to specify a username and password, and then select a region as well as the specific target machine to deploy the DataSnap server application(s) to.The only downside is that you still have to manually start the DataSnap server manually (unless it’s an ISAPI DLL deployed to a virtual directory), and also need to stop the DataSnap server before you can replace it with another version using the same dialog (otherwise the application will be running and hence locked).But it’s a nice dialog for initial cloud deployment. With advancements in Cloud Computing by Amazon, and others... Cloud support and services are evolving quickly.

Summary
Delphi XE does not overflow with new features, but it does include almost 1000 bug fixes as well as a number of new features that tend to make the developer more productive. The addition of half a dozen third-party tools to the IDE help to expand the tool chest of the Delphi developer (except for those who already own these tools, of course).Delphi XE does not contain the long awaited 64-bits capabilities or Mac OS X support – for that we have to wait at least until the first half of 2011. The best way to stay current with Delphi is to purchase a subscription with your next upgrade, so you’ll be assured of regular upgrades for an annual price (which is cheaper than buying an upgrade every year).


This webpage © 2010 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.