views:

430

answers:

6

I've just received an assignment to upgrade an old Delphi 3 project that I wrote in 1999 to a newer version and add features (I previously discussed this in related questions here and here). I was assuming that the appropriate route would be to first upgrade my development environment to Delphi 2010 and then port the application.

I'm now considering whether to upgrade the application to my existing copy of Delphi 2007 instead in order to avoid the Unicode complications. The application runs at a single company in the United States and is tightly bound to requirements of a single state, so it would not benefit from Unicode support.

My question is: would the additional hassle of dealing with Unicode issues outweigh the benefit of using the most recent version of Delphi? You may assume that I have no experience with Unicode.

+2  A: 

They have done such a good job implementing Unicode in Delphi 2009 that most programs that do not do tricks with characters and bytes convert over with no problem.

The caveat is as long as you are not using any 3rd party packages. If you are, you should upgrade those. If they don't have upgrades and you don't have their source code, then you might be better off not going to Delphi 2010.

But I would make the jump if at all possible. I did and I'm glad I did.

lkessler
I'm using LOTS of third party packages (DBISAM, WPTools, TMS Planner), but they all have new versions for 2010 and, presumably, for 2007 as well.
Larry Lustig
Then the question is how much will it cost you ($ and time) to upgrade them. If you only go to 2007, there's probably no need to upgrade them.
lkessler
No, I need to upgrade them anyway, I only have the Delphi 3 versions. the only cost difference would be the Delphi product itself, but I'm happy to buy that (at the professional SKU as per the discussion in my previous question).
Larry Lustig
And, the cost of Delphi itself pales in comparison to the other products I need.
Larry Lustig
Then it sounds to me like you should do the upgrade to Delphi 2010. You'll like all the new features. I especially like the simplicity of Shift-Ctrl-V to declare a variable on the fly as I write code. That alone has saved me hours. You'll want to upgrade someday anyway. So why do it twice, to 2007 and then to 2012 in a couple of years. The little bit of extra work that it "might" take you to get it working with (or despite) Unicode will be worth it.
lkessler
A: 

"That depends"

It depends on the number of 3rd party controls and the current state of those controls. (Are they still on the market with updates for 2007 and 2010?)

It depends on code size and code quality. If you have a large, loosely managed code base it will be a harder path to 2010.

It also depends (largely) on project input/outputs... are you reading from files/databases/communications? How will they react to Unicode, or can you easily narrow down all of those touch points to ensure proper handling?

One other major dependancy is the life of the application... "Going Unicode" now might serve you better if you are going to support this application over the long term as eventually they'll stop selling 2007 and you'll be forced into it.

I own 2009 and have built minor applications/utilities with it, but the main work is still in 2007, 2006, D7, and D5 depending on project.

Darian Miller
Lots of 3rd party apps, all of which have been updated and are still available. It's a database application using DBISAM, and the database itself shouldn't have to move to Unicode unless that's inevitable (which I doubt). The code base is truly awful, I can say that having written it myself — I'm happy to do this work simply to improve the existing code. The application is expected to continue in service for at least another decade although possibly without major changes (there haven't been any in the last eight years until now).
Larry Lustig
+3  A: 

why "upgrade" to a version that is not the latest, it just guarantees an earlier "next upgrade". I'm very very happy with Delphi 2010, I recommend porting to that version unless you use a 3rd party lib that is not available for D2010

Joe Meyer
+3  A: 

You should try it (the upgrade) on a D2010 trial, and give yourself a day or so to get a feel for the type of complications that result. Generally, if you didn't use a lot of PChar for pointer arithmetic, and you didn't use sub-ranges of strings, e.g. Code[1] := 'A', and so on, there should be few or no upgrade issues. Aside from the unicode upgrade, the D2010 IDE is much nicer to use, and seems faster than D2007.

cjrh
+2  A: 

D2007 may be easier to upgrade, because you it will not require changes of your code to work probably with Unicode, and if your code doesn't require a lot of PChar and others ANSI dedicated functions, it may work in Delphi2010 without a lot of work.

But if you have time and resources to upgrade to Delphi 2010, it will be better options, because sooner or later version from Delphi 2009 and later will be the standard versions.

Also the IDE productivity is higher in D2010, beside new language additions like generics, anonymous methods and others which make your code better, if you going to rewrite some sections of it.

Mohammed Nasman
A: 

See here. It can confuse the things when coming to D2010.

Fabricio Araujo