Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion from Delphi to .NET 4 (Without any tool) [closed]

One of our clients wants their Delphi application to be converted to .NET 4.0. After reading responses to various similar questions on this site, I've decided to take a step-by-step approach of converting the Delphi code to .NET.

Since I am a .NET developer, I need to first get familiar with Delphi. It is quite difficult to find any single site which provided a comprehensive overview of the concepts of Delphi. Also I haven't still found any site which provides information about the equivalents of Delphi in .NET. For example what is the equivalent of "stdcall" or "export" in .NET? or what is the equivalent of a particular Delphi datatype in .NET?

Does anyone know about such online resource which provide information about Delphi equivalents in .NET? Also if anyone could provide any tips on this?

like image 642
Hasan Fahim Avatar asked Jun 01 '11 11:06

Hasan Fahim


3 Answers

Really, the fastest way to do this is to start from scratch. Trying to convert the legacy code from Deplhi to C# is just fraught with issues, and at the end of it, you will have a Delphi-like C# application. The underlying frameworks, VCL in Delphi, and FCL in .NET, have significant architectural differences, so given that the amount of time to convert will be roughly equivalent to the amount of time to develop from scratch, you are dooming yourself to a 2nd class application if you go down the conversion path.

And I might add that I have successfully converted an application framework from Deplhi to Delphi.NET, for use in Visual Studio. I did this to maintain inter-process communication and architectural compatability between the two development environnments. If the benefits of this had not be large, I never would have done the conversion.

like image 115
Misha Avatar answered Sep 22 '22 00:09

Misha


As others have pointed out, there is no direct way to answer this unless deciding to go all the way explaining what Delphi is and how it compares to dotNet.

You might however be interested in knowing that the latest versions of RadStudio do include a Delphi.NET which integrates in VS.

That is probably your shortest and safest path to the job.

For starters, the two versions(although remarkably different) still bear enough similarities to cross compile for the most part - and that would certainly be a start.

I am not sure about the GUI, but as long as the application is using mainstream components, there should be dotNET counterparts. DevExpress and TMS come to mind, for instance.

Last, but not least, I am confident that if you need any specific help, we'll all be happy to help :)

Andrea

like image 40
Andrea Raimondi Avatar answered Sep 19 '22 00:09

Andrea Raimondi


I would take some of automated tools for porting to C# just to relif you the pain of porting different syntax, and after that it's all hand work.

And there is a book for Delphi developers that describes .NET and similarities and differences, .NET 2.0 for Delphi Programmers I know that this is other way around but IMO can help

like image 41
Antonio Bakula Avatar answered Sep 22 '22 00:09

Antonio Bakula