VCL.NET vs. FCL

106 18
Starting a new Windows project (Delphi for .NET)? What framework to choose, should it be VCL.NET of FCL?

This is the fourth article in the series (I, II, III, V, VI) of articles designed with one goal in mind: to provide a quick and dirty introduction to the world of .Net programming with Delphi.

RTL, VCL, FCL, VCL.NET ... a real maze!

I have to admit, for the last two years, whenever one says ".Net" I think of ASP.NET.

If we were discussing Windows development the natural choice was Delphi with its huge control/class library called the VCL (not to forget the RTL). No other RAD tool had so much to offer.
Today, everybody is talking .Net. If you are to start a new Windows (not a web application) project today, you'll probably ask yourself: "What options do I have? Should I stick to VCL (VCL.NET) or should I go for the FCL?"

Here's a real scenario: recently I had to develop one quick and dirty Windows application using Delphi. My first thought was to use Delphi 7 to do the job, but it appeared that the application should be developed for the .NET platform. Ok, no problem, Delphi for .Net was loaded and a new Windows Forms application was created. ... two minutes passed ... ups! Where are all those great components I'm used to work with? I can't find any of the components from the "Additional" palette. Where are TBitButton, TScroolBox, TLabeledEdit, TMemo and other great gems of the VCL? At that moment I had to ask myself: "Is VCL.NET the answer?".

Maybe all the questions have one ultimate *sub-question* in common: "What to do for a new application that needs to run on Win32 today, .Net tomorrow?" After all, you must ask yourself "Is it possible that the whole .NET framework is Borland's idea?"

What's and Why's of the VCL.NET

So what is VCL.NET? Is it VCL is it .Net? If we put it simple, VCL.NET provides the means to create VCL Forms applications, which are Delphi forms that are .NET-enabled, and use VCL.NET components. Now, VCL.NET components are those good old VCL components just wrapped in the .Net "shell".
VCL.NET is a large subset of VCL, therefore it supports many of the existing VCL classes. In many cases Delphi source code that operates on Win32 VCL classes and functions recompiles with minimal changes on .NET. In some cases, the code recompiles with no changes at all.

If you have requirements for a project that involve Compact Framework support, you'll have to use the FCL. On the other hand, if you need Win32 support you'll definitively decide to use the VCL.NET. The truth is, since you can choose between the FCL and the VCL.NET, that neither one of the two frameworks is ideal for all kinds of applications. There are many factors you should consider. An article entitled "Choosing Between VCL for .NET and WinForms" sums various issues you need to consider. Here's what the author have to say about the "skills factor": "Developers familiar with the VCL for Win32 will feel right at home with the VCL for .NET. There are a few changes, but it will be a very smooth transition. However, no .NET developer should be ignorant of WinForms, so you should learn both frameworks even if you intend to use only the VCL for .NET."

So, what will it be? VCL.NET or the FCL?

For me it's the VCL.NET for quick-and-dirty-but-.Net-aware solutions. How about you? Will you move your existing applications to .NET (or should you leave them to work happily in the Win32 API world)? Are you planning new Windows applications? What is the framework of your choice? Post your comments on the About Delphi Programming Forum. Help others decide!
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.