Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating a Delphi 7 application to .NET

Any advice on how to migrate an existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005?

Visual Studio 2005 has already been purchased, the company wants to move away from the Borland/Codegear tools.

The application is a single client server executable, utilizing a number of 3rd party UI controls and Crystal reports 10 for reporting.

There is extensive business logic spread across Delphi types in the UI as well as many SQL Server 2000 stored procedures. Moving much of the stored proc logic into .NET classes is another goal.

To reduce impact on customers, a piece by piece approach rather than a complete re-write/conversion would be preferred, if possible. Thanks in advance.

[Update] Has anyone had any experience, good, bad or ugly, using Managed VCL for this type of scenario?

like image 653
Ash Avatar asked Oct 16 '08 01:10

Ash


2 Answers

That sounds like a really bad idea to me.

Is there any technological advantage for your product to be in .NET, or is it mostly a political decision to be a Microsoft shop? For client-server, Delphi is pretty tough to beat. I've used VS2005/8 and it is really and truly genuinely and sincerely not as good as Delphi for Win32 development. But if you're going to migrate to the web down the road, then VS has definite advantages.

If stubborn business folks simply refuse to use Delphi anymore, then KiwiBastard is correct, IMO. Convert first to Delphi.NET, then migrate from there to VS2005. Or 2010, since that is a more realistic timeline :)

like image 148
JosephStyons Avatar answered Nov 11 '22 22:11

JosephStyons


I worked at a company that was migrating from Delphi to WPF/.Net circa 2007. We tried a piece by piece approach. It was painful. We were always running into subtle bugs in the interop. Calling from Delphi to WPF or Winforms and back is painful. If the various UI controls and windows of your application call on each other a lot, I think you will experience significant growing pains.

If you can afford to do the whole conversion at once I would go for it. If not, split out the parts of your app that are stand-alone or have the minimum of interactions with the rest of the app.

I would also suggest jumping into .Net 2008. Why are you picking a technology that is almost 4 years old (VS 2005)? I think it is a very, very bad business decision to choose to jump into .Net 2.0 when .Net 3.5 is very stable. The only valid reason I would ever present to management for .Net 2.0 would be to support Windows 2000. Do you still have customers on Win2k? Will you still have customers on Win2k by the time your conversion is complete? Do you have customers you cannot get to move to XP or Vista? .Net 3.0 and 3.5 are not supported in Win2k. That is the only downside I can think of.

.Net 3.5 and C# 2008 offer significant advantages for your company. You have a number of language features that will accelerate develop time compared to C# 2.0. You have WPF, which is vastly superior to Winforms. I would argue that you can develop the same batteleship-gray Windows you would get in Winforms with WPF, develop them faster, and when you want some eye-candy you will be using a technology that can easily provide it. If you are learning a new windowing platform for this conversion, why not invest in learning the new stuff?

Also, please tell me you didn't actually buy VS 2005. You can buy an MSDN Universal license for about the same cost, and get every development related product Microsoft makes. Buy it from a 3rd party and you will get a good discount.

Sorry if I came off negative. Sincerely, good luck on the migration. I just have flashbacks when I think of having to give up all the goodies in .Net 3.5.

like image 40
Jason Jackson Avatar answered Nov 11 '22 22:11

Jason Jackson