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... #117
See Also: Dr.Bob's Delphi Papers and Columns

Delphi 2010 and Upgrades
Should you upgrade to Delphi 2010 or stay with your current version?

A few weeks ago, Embarcadero released Delphi 2010, C++Builder 2010, Delphi Prism 2010 and the combined toolset called RAD Studio 2010. Although I’ve used C++Builder in the past, I’m no longer a regular user, so I will not comment on that tool, but I will try to explain why developers should consider upgrading to Delphi 2010.

Delphi 2010
Delphi 2010 includes new features compared to Delphi 2009, Delphi 2007 (2006 and 2005 also fall in this category), and Delphi 7 (6 and lower also fall in this category). See also the official overview of What’s New.

Upgrading from Delphi 2009?
Compared to Delphi 2009, the most important changes (in my personal view) are a more mature implementation of the new DataSnap 2009 architecture, SOAP 1.2 support, Touch and Gesturing support, the Firebird DBX4 driver and the code formatter (if you ever need to work on “legacy” code from someone else, it’s really really helpful if you can at least re-format this code to your own liking). It’s nice to see Delphi 2010 supports Windows 7 API and interactive touch capabilities before this operating system is even.

DataSnap 2010
Starting in Delphi 3 as MIDAS, with MIDAS II in Delphi 4 and MIDAS III in Delphi 5 when it was a powerful way to build COM-based remote data modules with TCP/IP, HTTP and (D)COM connection capabilities. Delphi 6 introduced the name DataSnap, and until Delphi 2007 this framework was largely left intact. Delphi 2009 introduced a re-architecture of DataSnap – removing the dependencies on COM, introducing a more light-weight way to produce remote server objects and client connectivity Initially with only TCP/IP connectivity, but with the ability to build .NET clients using Delphi Prism 2009. Delphi 2010 now builds on the DataSnap 2009 architecture and expands this framework with new functionality, including support for new targets using two wizards (VCL Forms application, Windows Service application, and Console application, but now also web targets such as ISAPI, CGI or Web App Debugger), HTTP(S) transport protocols, HTTP authentication, client callback functions, support for REST and JSON, and filters to support compression (already built-in) and encryption. The only disappointment is perhaps that an encryption filter is not included “in the box”, although it’s not really hard to implement one by yourself now.

Touch and Gesturing
Although simple touch is nothing more than a touch screen acting as a mouse (you can touch it with your finger to push on a button, drag, or use a scrollbar for example), Delphi 2010 now implements special support for the “drag” movements on the touch screen, also called gestures (when you touch the screen and move your finger in a certain direction, possibly with angles etc.). There are 30+ gestures already included in Delphi 2010, and you can also add your own custom gestures (for movement shapes that are not already included). A gesture is easily connected to a Delphi “action”, so it’s a snap to add the gesturing functionality to new or existing applications. Even more impressive is the full support for the multi-touch or interactive touch supported by Windows 7 and the special multi-touch screens where you can touch using more than one finger, and use this to pan or zoom into images (to name the most illustrative example). The special hardware also support inertia, so the force and speed by which you moved your finger(s) over the screen is taken into account. Very powerful, and not unlike small devices like iPhone and TomTom already support, but which Windows 7 and Delphi 2010 can bring to the desktop as well. Note that gesturing in Delphi 2010 is supported on all versions of Windows (if you don’t have a touch screen, you can “simulate” the gesture by using the mouse), but for the interactive touch the client needs to be Windows 7 (and have the special hardware as well).

Upgrading from Delphi 2007?
Compared to Delphi 2007, there is of course the Unicode support as main new feature, plus language enhancements Generics and Anonymous Methods, as well as the new COM-less DataSnap support. Another big change compared to RAD Studio 2007 is the fact that the Delphi for .NET personality in RAD Studio 2007 was the last one to be included in the actual RAD Studio IDE, supporting VCL for .NET. This is a reason why some developers stick with RAD Studio 2007. But if you’re on Delphi 2007 (or 2006 or 2005), then only the “fear” for Unicode and the efforts to migrate your code (and third-party controls) should be a reason to stop you from upgrading to Delphi 2010. I’ve migrated several projects – big and small – from Delphi 2007 or earlier to Delphi 2009 (and 2010), and although it’s not trivial, the Unicode conversion is not the end of the world either.

In case you missed the news last year: Delphi 2009 introduced Unicode, and as of Delphi 2009, the String type will be a UnicodeString type. All VCL controls will use String aka UnicodeString from now on, and all your code should be aware that a Char is no longer 1 byte long but in fact equivalent to a WideChar of 2 bytes. There is no “off” switch, and no going back. Delphi 2010 and later will all be Unicode versions of Delphi. So you either stick with Delphi 2007 (or below) or must hop on the Unicode bandwagon (and don’t forget to enjoy the ride). See for my blog posts related to Unicode, or check out the Delphi Unicode white paper written by Marco Cantù.

Upgrading from Delphi 7 (or below)?
Compared to Delphi 7, Delphi 2010 offers all of the above plus the new IDE. Developers who stick with Delphi 7 (or earlier) often regard the new IDE as inferior and don’t want to (or feel the need to) change their way of working. It may be good to note that Delphi 2010 now offers a truly un-embedded designer desktop including the old component palette (with the search/filter capabilities of the new tool palette), so you can have the best of both worlds if you wish.

Uncheck the “Embedded designer” option in the VCL Designer category of the Delphi Options in the Tools | Options dialog. You need to restart the IDE, but select the Default Layout (the forms will still be separate from the code editor) or select the “Classic Undocked” layout for separate floating windows. Also interesting to read are the pages that discuss the new features in Delphi 2009 (and 2010) since Delphi 7.

Upgrade Policies after 1-1-2010
A final reason to upgrade – or at least to consider upgrading this year – is the new update rule that Embarcadero is strongly considering (I’m a reseller in the Benelux, unfortunately not allowed to resell to other countries, and as far as I’ve heard, this new upgrade rule is already decided, but officially it seems to be under consideration). The rule states that in order to purchase an upgrade to the latest version of Delphi, you should own a version which is at most three versions old. So Delphi 2006 will still be good enough to upgrade to Delphi 2010 next year, but Delphi 2005 and older will no longer qualify. And for Delphi 2011 you will need at least Delphi 2007 (or 2009 or 2010). If you do not qualify for an upgrade, you need to pay the full New User price, which is much higher. So, if you are using a version of Delphi prior to Delphi 2007, and you do not want to “go Unicode” right now, but also do not want to close the door on Delphi completely, it may be a good idea to consider upgrading to Delphi 2007 right now, so you can still purchase an upgrade to Delphi 2011 (a year from now probably).

Delphi Prism 2010
Delphi Prism 2010 includes new features compared to Delphi Prism 2009, and is also different compared to the .NET personality of RAD Studio 2007, Borland Developer Studio 2006, 2005 or Delphi 8. If you’ve invested in VCL for .NET, then it should be clear by now that this is a dead-end, and as a result IntraWeb has also been reduced to just the Win32 edition (and no longer a .NET edition, since IntraWeb is based and built on top of the VCL, which is hard if there is no longer a VCL for .NET). But also if you’ve been building ASP.NET web applications or web services, I would highly recommend to move away from Delphi 8 or the later Delphi for .NET personalities and instead move to Delphi Prism inside the Visual Studio IDE. Note that Delphi Prism is sold with a non-optional first year subscription included. The reason is that a new version of Delphi Prism is released every quarter, so with each subscription period, you are guaranteed to get four updates of Delphi Prism, and Embarcadero probably hopes (or expects) that you will renew the subscriptions to keep on getting the new updates. And I must admit, while some developers may decide to skip upgrading from one Delphi for Win32 edition to another (as well as upgrading all third-party controls), it’s really painless to install a new upgrade of Delphi Prism. In fact, you do not even have to uninstall the previous version, as it’s just the compiler which can be remain registered in the GAC. Very stable, and the fact that third-part controls just work in the Visual Studio shell for all editions of Delphi Prism (and the upgrades) is a welcome experience compared to the DCU incompatibility of the Win32 editions of Delphi.

RAD Studio 2010
If you are using both Delphi 2010 and Delphi Prism 2010, then it will make sense to consider RAD Studio 2010 which contains both. Note that while Delphi Prism includes a required first year of subscription, this is not the case with RAD Studio. So developers sometimes purchase RAD Studio without subscription, which is not a good idea, since that will defeat the quarterly upgrade schemes for Delphi Prism. So, if you want to work with Delphi for Win32 as well as Delphi Prism for .NET, I can really recommend taking a subscription as well, if only for the continuity for the Delphi Prism for .NET personality.

Answering the question if you should stick with your current version of Delphi, or go to Delphi 2010 (and/or Delphi Prism 2010 – and/or RAD Studio 2010), is not easy, and depends on your personal (and professional) circumstances. In this article, I hope I’ve outlined some of my own personal and – as a reseller – professional reasons and guidelines that I’ve discussed with lots of my clients in the Benelux. I hope some of it was at least a bit useful to the readers (and even if not, I want to thank you for reading this far).

This webpage © 2009-2010 by Bob Swart (aka Dr.Bob - Rights Reserved.