Porting a Delphi 7 application to .NET.

Any tips on porting your existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005?

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

An application is an executable file of one client server using several third-party user interface elements and Crystal 10 reports for reports.

There is extensive business logic that extends to Delphi types in the user interface, as well as many SQL Server 2000 stored procedures. Another goal is to move most of the stored proc logic to .NET classes.

To reduce the impact on customers, it is preferable, if possible, a phased approach rather than a complete rewrite / conversion. Thanks in advance.

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

+6
migration delphi
source share
9 answers

I worked for a company that moved from Delphi to WPF / .Net around 2007. We tried a phased approach. It was painful. We always encountered subtle mistakes in the conversation. Calling from Delphi to WPF or Winforms and back is painful. If the various user interface controls and application windows speak a lot to each other, I think you will experience significant growing pains.

If you can afford all the conversions at once, I would go for it. If not, separate parts of your application that are standalone or have a minimum of interactions with the rest of the application.

I would also suggest switching to .Net 2008. Why do you choose a technology that is almost 4 years old (VS 2005)? I think this is a very, very bad decision for a business to upgrade to .Net 2.0 when .Net 3.5 is very stable. The only valid reason I would ever introduce to the .Net 2.0 guide is Windows 2000 support. Do you still have Win2k clients? Will you still have Win2k clients by the time you complete your conversion? Do you have clients that you cannot move to XP or Vista? .Net 3.0 and 3.5 are not supported in Win2k. This is the only flaw that I can think of.

.Net 3.5 and C # 2008 offer significant benefits for your company. You have several language features that will speed up development time compared to C # 2.0. You have WPF that is significantly superior to Winforms. I would say that you can develop the same botanical gray Windows that you get in Winforms with WPF, develop them faster, and when you want to get some kind of glaze, you will use technology that can easily provide it. If you are exploring a new window platform for this transformation, why not invest in exploring new material?

Also, say that you have not actually bought VS 2005. You can buy the MSDN Universal license for about the same price and get every development-related product that Microsoft makes. Buy it from a third party and you will get a good discount.

Sorry if I stepped off the negative. Regards, Good luck with your migration. I just have memories when I think about giving up all the goodies in .Net 3.5.

+7
source share

That sounds like a really bad idea to me.

Is there a technological advantage for your product in .NET, or is it basically a political decision to become a Microsoft store? For a client server, Delphi is quite difficult to beat. I used VS2005 / 8, and it really and really sincerely and sincerely is not as good as Delphi for developing Win32. But if you are going to migrate to the Internet on the road, then VS has certain advantages.

If stubborn businessmen simply refuse to use Delphi, then KiwiBastard is true, IMO. Convert to Delphi.NET first, and then upgrade to VS2005. Or 2010, as this is a more realistic schedule :)

+9
source share

I previously worked for a company that wanted to convert from Delphi to C # .NET, because .NET is cool and brilliant. They attracted several more developers who had a lot of experience in C #, and as a result, the developers doubled the number of developers twice to transfer the application to C #, after which he did this to record it for the first time in Delphi for very little additional return on investment (several new features were added in the process). In addition, customers were not happy with the performance of the application or the user interface.

A case study after a case study shows that rewriting is a bad idea . (Tip for kogus hat)

If you have to switch to .NET (yes, I know, you didn’t make a decision, someone with less information did), then I would suggest using Delphi for .NET or RemObjects Oxygene . The latter is a Visual Studio plugin. But even marc hofman, chief software architect at RemObjects Oxygene , said it was a bad idea to port a perfectly working application to .NET. because ".

If you can wait for Delphi Prism, which is also a Visual Studio add-on and is expected to be released later this year.

+8
source share

A phased conversion would mean changing your own Delphi code to use COM so that the .NET side coexists with Delphi (or perhaps using some other technology - it's hard to say)

If possible, it might be easier to convert the application to Delphi.NET first, then at least .NET bits will be able to communicate a little easier.

Just a thought.

+3
source share

Disconnecting from CodeGear / Borland tools basically eliminates any Delphi.NET-based solution and general correspondence of your application.

Hope my answer below helps with your solutions.

From experience (rewriting the Delphi application with a group of people) it comes down to one of two options below.

But first a warning: you will take at least the general development efforts that it took to write the current Delphi application.

In our case, this was justified, because the old Delphi application (in fact, this is Kylix) had an end to life for various reasons. Our scribe consisted of two parts: rewrite with limited additional functionality, followed by many additional functions (the design of the first part already took into account the second part).

Back to your choices:

1- general rewrite in C # or VB.NET in Visual Studio

2- partial reuse of existing Delphi business-level code using Oxygene from RemObjecs (Visual Studio plugin with syntax that is very similar to Delphi syntax). CodeGear will soon offer Prism (probably before the end of 2008), which will also be integrated into Visual Studio.

Since the access to .NET data and the user interface are completely different from Delphi, you will have to do it from scratch (for both scenarios 1 and 2). Visual Studio 2008 offers many benefits here in Visual Studio 2005.

There is no such thing as this migration gradually, since here you are completely changing the platform, this is all or nothing.

Both scenarios will take a considerable amount of time (even if you have Delphi experience, getting used to the .NET world will take time).

Visual Studio can interact with Crystal Reports and works well with SQL Server.

Since Visual Studio 2008 offers many benefits (not only .NET 3.5, but also performance), you'd better go for it. On the user interface side, you need to make a balanced choice between WinForms (for example, Windows Forms) and Windows Presentation Foundation (aka WPF).

If this is a 1 to 1 rewrite, you might want to stick with WinForms, as it is familiar with what you have. You probably need to use some third-party components to customize your interface. DevExpress is a good choice here because they have similar components in Delphi and Visual Studio.

But if you want to go for future eye candy, then you can consider WPF. Get ready for a steeper learning curve here than WinForms, as it is very different from what you are used to.

If you decide to stay with Delphi, you may need to look at VCL for the Internet (aka IntraWeb) and in Delphi 2009 (a lot has changed in the Delphi world since Delphi 7 was announced 6 years ago).

Good luck making your choice!

- Jeroen

+2
source share

I would suggest looking at Hydra from RemObjects. It basically breaks the com interface for you and provides an observer pattern for the interaction between your Delphi application and .Net. You can have .Net forms in panels inside your Delphi application. This provides a good migration path when you replenish your Delphi code as functions are transferred to .Net.

+2
source share

For me, the question is: what language would you use? Hope C # and not VB.Net. (With all the clumsy policies on this issue, this is not clear in any way.)

Next time you are likely to hear that there are converters that will help you with this. We just passed the evaluation of such converters (Delphi 7 to C #) and were very! disappointment.

Can I offer a compromise? What about Delphi Prism? This is Delphi in VS2008. Of course, you still have Delphi and therefore Codegear, but you also have VS (as your company expects).

+1
source share

A scientific report was published on the successful transformation of 1.5 million Delphi C # projects by John Brant, don Robert et al. He wrote the Delphi parser, C # generator, and many AST conversion rules. Gradually expanding the set of rules, making daily builds, a lot of unit tests and some alteration of the complex parts of Delphi, he allowed him with a team of 4 people, including some of the original developers with in-depth knowledge of Delphi and C #, to port the software after 18 months. John Brant and Don Roberts are the original developers of the refactoring browser and the SmaCC compiler kit, you are unlikely to be able to do this quickly.

Although it was a significant investment, it is nowhere "the same size as the initial development." The authors note that simply rewriting without tools or a single-shot tool, as Jeren notes, is very likely to lead to, especially if new requirements are taken into account.

The authors made large-scale refactoring, remaining on one platform for another project, completely replacing the conservation infrastructure. This may be relevant for older (BDE?) Projects.

+1
source share

Only you can really decide if a phased approach is possible. For example, an application can be easily shared or all forms are too closely related to all business logic. Technically, this is possible, but it all depends on how the code base is structured.

0
source share

All Articles