Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Delphi 7 to .NET? Help!

We've currently develop a large CRM suite of applications covering all areas of Accounts, stock, sales, crm  etctetetctc using Delphi 7.

I recently been told that we've just sold a ".NET enabled" version of the software to a large corporation, so I had better hurry up and create one.

Typical of our marketing department. A potential client, during a  demo, splutters a buzz-word, and all of a sudden "of course our application is  ISOxxx compliant", and compiled/tested to XYZ standard".....

Anyway .NET.

How? What version of Delphi do I use? We have access to Delphi 8, but I've never used it. Do we upgrade to 2006, 2007...? I've no idea.  Do I even use Delphi (I would like to)? The applications that comprise the suite of programs at the moment are desktop based, but in the .NET version I would like to extend certain functionality so that it's accessible via browsers/pda etc but still using the same shared code. I take it, this is what .NET will allow you to do...? Does anyone have any migration recommendations - the existing source code is almost 1million lines - I don't relish the prospect of manually converting this/starting again from scratch.....

Any help, ideas, suggestions greatly received. I've spent too long allowing the .NET bandwagon to disppear into the distance and now I have to catch up fast.

Thanks

Steve


0
steve-west
Asked:
steve-west
  • 4
  • 2
1 Solution
 
DropZoneCommented:
>> How?

Better start checking out tutorials :)

>> What version of Delphi do I use? We have access to Delphi 8, but I've never used it. Do we upgrade to 2006, 2007...? I've no idea.

Version 2007 is only for Win32, so you should use 2006, which is the latest version that supports .NET.

>> Do I even use Delphi (I would like to)?

If you are (like me) experienced in Delphi, it will be orders of magnitude faster for you to use it for your .NET application than having to learn, say, C# from scratch on top of learning the .NET Framework.  I use it for ASP.NET web applications and its fine.  The only hitch is that Borland (er, I mean CodeGear) is a whole version behind than Microsoft, so Delphi 2006 supports the .NET Framework 1.1 and not 2.0.  Depending on your needs, this may be an issue.  However, it is perfectly adequate, in spite of some limitations.

>> The applications that comprise the suite of programs at the moment are desktop based, but in the .NET version I would like to extend certain functionality so that it's accessible via browsers/pda etc but still using the same shared code. I take it, this is what .NET will allow you to do...?

.NET will permit you to do this by offering a comprehensive framework shareable between applications and platforms.  By creating the application in a componetized fashioned, separating the presentation layer from the actual processing, you can re-use the same code base for a web application using ASP.NET.

>> Does anyone have any migration recommendations - the existing source code is almost 1million lines - I don't relish the prospect of manually converting this/starting again from scratch.....

If your existing code base is in Delphi, then you're in luck!  Delphi.NET does a pretty good job of abstracting datatypes and things like that to maintain the "illusion" of regular Delphi code.  For example, you can continue using TComponent, TObject, and TDateTime, and they will be nicely interpreted as their appropriate counterparts in .NET.  You'll have to change some things, however, as there are some things done differently in .NET than in regular Delphi applications, but this shouldn't be such a hassle.

In particular, look into using Delphi's VCL.Net, which is a wrapper of most components in the .NET framework to make them look and work (code-wise) as the typical VCL components you are used to.

You should be able to find good tutorials by searching in Google.  In particular, this site may help: <http://www.drbob42.com>.

One thing to keep in mind:  C# was designed by the same guy who designed Delphi, so it is fairly straightforward to understand if you have a Delphi background (if you can get past the C-like syntax).  I mention this because the majority of examples and tutorials you will find may be in C# and not Delphi, and this should not discourage you.

    I hope this helps.
    -dZ.
0
 
DropZoneCommented:
One more thing I forgot to mention:  Delphi 2006 contains a C# compiler (in case you want it).  Also, the .NET framework will allow you to use components written in any language -- the only limitation is that each "assembly" (sort of like a DLL: a code library in .NET) can only have one language.  The reason I mention this is so that you know that you can download or purchase third-party .NET components and be able to use them in Delphi.NET normally, regardless of the language in which they were written.

    Cheers!
     -dZ.
0
 
steve-westAuthor Commented:
Thanks for these comments, suggestions. I'm interested to know of your opinion to Turbo Delphi. Delphi 2006 isn't cheap (although this is not too important) and I'm wondering if it's worthwhile moving across to TD. (Also, can delphi 2006 compile a WIN32 (delphi 7) project ?)

Thanks

Steve
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
DropZoneCommented:
First of all, I've never used Turbo Delphi for .NET, so I don't know what is different about it.  I believe that the difference is the lack of multi-language compiler (which is not a big deal if all you will be doing is Delphi).  But for Win32 applications, it would be my personal choice (if my company didn't have licenses for 2006/2007 already).  I would carefullly check out the product description matrix at the CodeGear site to make sure it fits your needs as a platform for future development, before commiting to it.

Secondly, Delphi 2006 comes with both "personalities":  Win32 and .NET.  Although there have been some minor changes since Delphi 7, your code should compile without problem.  In any case, you should be able to modify any necessary existing code without too much hassle.

A major difference in 2006 is that the FastMM memory manager has been included as the default manager, and so if you used it in the past as a third party component, you would not need to do so now.

One thing I must warn you about:  The help file has been getting progressively worse since version 5, so expect it to be cheesy (except for the .NET components, which include the extensive MSDN Framework and SDK documentation, go figure!).  However, Borland (er, CodeGear, dammit) is aware of the many complaints regarding this, and is working towards improving the help system for future versions.

The important thing to consider is that if you *must* develop in .NET (as I have had to), as well as Win32, unless you are willing to change platforms completely to Visual Studio and learn C# or (eek!) VB.Net, then Delphi 2006 is a good choice, as it covers both worlds in an already familiar IDE and language framework.  The Turbo version will only offer one platform (either Win32 or .NET), unless you buy both separately.

Don't get me wrong, I am not a lover of .NET by any stretch, and I find Delphi 2006 flakey and bug-ridden and unstable , specially while working with ASP.NET (thought this is more to do with the extensive use of Microsoft's technologies integrated into the Delphi IDE in order to support the framework); however, I've used Visual Studio in the past and find it even more uncomfortable to work with (although Delphi keeps looking more and more like it on every version).  Plus, what can I say, I like Object Pascal :)

    Cheers,
    -dZ.
0
 
steve-westAuthor Commented:
Thanks for this - good to hear about FastMM (this has solved a lot of problems in the past).

From what I've understood after looking around a bit, Borland-CodeGear-have finally started to turn things around when it comes to developer confidence - both in the company and product. I wouldn't have minded too much to go the C# sharp way - a got some experience in this already, but this was a few years ago - but I have to consider the skill sets of the other developers, may of whom have only just got to grips with Delphi, together with our existing code base.

I've decided to go with Delphi 2006. As you said, TD will only provide one or the other (not both on the same machine), and we do maintain many utility programs. We can't really ask a customer to install the .NET framework, just so that their 100kb FTP program will work....


Thanks for your help, you've earned the points.

Now, don't s'pose you know how I go about .NET'ing our COM applications ....  ;)


0
 
DropZoneCommented:
You're in luck!  .NET can be integrated with COM components using COM Interop, and doing this in Delphi is pretty simple.  The reverse is also true:  you can create .NET components that can be wrapped as COM and used in Win32 applications.  If what you are looking to do is to convert your current COM applications to .NET, then that may be a bit involved but not too hard.

I found the following page in MSDN that explains a bit about .NET/COM migration and interoperability:
http://msdn2.microsoft.com/en-us/library/ms978506.aspx

I didn't read the whole thing (just skimmed it a bit), but it seems to explain the Pros and Cons in deciding to either migrate code completely or interoperating between both frameworks.  If you have so much code already available in COM, it may be wise to just wrap it and re-use it from your new .NET application.  However, keep in mind that performance may be impared.

Please, do not take my word on this as an endorsement, as I have not had to do what you are expecting to.  So far my experience with .NET has been to create brand new applications and to expose some of their code to our existing Win32 applications using COM Interop wrappers.  As always, your mileage may vary.

    Cheers!
    -dZ.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now