MFC vs .NET

R

rupa

Hi All,

Can someone explain me the difference between doing GUI programming
using MFC vs .NET winforms?

I want to understand what is the difference between these 2
technologies in terms of following parameters:
1) performance
2) ease in programing
3) usability
4) size of the executable
5) future support of the technology


Thanks
Burks
 
J

Jeff Gaines

Hi All,

Can someone explain me the difference between doing GUI programming
using MFC vs .NET winforms?

I am a hobbyist programmer, not a professional but my thoughts are:
1) performance

MFC or any other compiled language is much quicker (even VB6 is quicker).
2) ease in programing

VS 2005 has to be the best programming environment ever, it is superb.
Think VB6 with bells and whistles.
3) usability

Excellent. Two major things missing if you are coming from 'C' - no
#include which is a major pain and you have to prototype everything if you
want to use the API - i.e. DLL's, Interfaces etc. Built in API support is
limited.
4) size of the executable

Difficult to compare, the .Net runtime is much bigger than the MFC runtime
DLL's for sure.
5) future support of the technology

Don't know officially but there will still be MFC desktop apps in 20
years, that will see me out :)
 
K

Kevin Spencer

1) performance

There is a slight performance difference, particularly when an application
first loads, as the IL must be JIT-compiled. After that, the difference is
largely negligible, depending on what features you use and how you write the
code.
2) ease in programing

Much different. The .Net platform is designed for productivity. In terms of
speed of development and maintainability of code, .Net wins hands down.
3) usability

Not sure what you mean here, other than the fact that .Net programming
syntax is easier to work with.
4) size of the executable

Some difference, but not significant, largely due to the IL used by the .Net
platform.
5) future support of the technology

..Net has a great future. So does MFC.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
P

PvdG42

rupa said:
Hi All,

Can someone explain me the difference between doing GUI programming
using MFC vs .NET winforms?
See comments inline...
I want to understand what is the difference between these 2
technologies in terms of following parameters:
1) performance
For typical GUI applications, the difference is negligible.
2) ease in programing
In general, .NET wins hands down, but if you're talking C++, MFC uses
standard C++ syntax (plus all the MCF classes, datatypes, constants, etc.)
whereas you have to learn C++/CLI syntax to do WinForms in .NET. There's a
bit of a learning curve there.
3) usability
For the end user or the developer?
4) size of the executable
As Kevin pointed out, .NET will be a bit larger, but not much if you link
MFC statically.
5) future support of the technology
In general, I guess you could say that .NET is the future, but don't count
MFC out. VS 2008 includes significant enhancements to MFC, so it's
definitely not abandonware :)
 
R

rupa

There is a slight performance difference, particularly when an application
first loads, as the IL must be JIT-compiled. After that, the difference is
largely negligible, depending on what features you use and how you write the
code.


Much different. The .Netplatform is designed for productivity. In terms of
speed of development and maintainability of code, .Netwins hands down.


Not sure what you mean here, other than the fact that .Netprogramming
syntax is easier to work with.


Some difference, but not significant, largely due to the IL used by the .Net
platform.


.Nethas a great future. So doesMFC.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net









- Show quoted text -

Thanks for the reply. I am new to .NET world and few basic questions
were bubbling inside me Would appreicate if you could answer these
questions:
1) When we build any product using .NET framework, then do we have to
worry about shipping the framework with the product bundle as well.
Won't that increase the size of the total product?
2) Does .NET framework comes by default installed with Microsoft
WinXP, Vista OS?
3) Is there any way where we can ship only relevant libraries ( the
one that application is using ) of .NET framework while shipping the
product and not include the ones that application is not using?

Thanks
 
K

Kevin Spencer

Hi rupa,
1) When we build any product using .NET framework, then do we have to
worry about shipping the framework with the product bundle as well.
Won't that increase the size of the total product?

You might have to include the redistributable, yes. It's about 20MB in size,
as I recall. You can also link to the MS download location for it in your
installation package.
2) Does .NET framework comes by default installed with Microsoft
WinXP, Vista OS?

No, yes. More specifically, it is not part of the original install of XP,
although it is an upgrade that comes through Windows Update, so it is highly
likely to be on any XP system. It is part of Vista.
3) Is there any way where we can ship only relevant libraries ( the
one that application is using ) of .NET framework while shipping the
product and not include the ones that application is not using?

If you use the Framework, the entire Framework must be installed.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
R

rupa

Hi rupa,


You might have to include the redistributable, yes. It's about 20MB in size,
as I recall. You can also link to the MS download location for it in your
installation package.


No, yes. More specifically, it is not part of the original install of XP,
although it is an upgrade that comes through Windows Update, so it is highly
likely to be on any XP system. It is part of Vista.


If you use the Framework, the entire Framework must be installed.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net








- Show quoted text -

Thanks All for your replies. The discussion is really useful to me.

I have just one last question in my mind.

1) Is Microsoft Office using any of the .NET technology ( or
framework ) in their products like microsoft word, excell etc? If yes,
then how is it managing to refer the framework without having .NET
framework installed as the default in windows XP OS?

Thanks
 
I

ilda.cpp

Hi All,

I'm new with Visual Studio .NET 2005.

I will work with C++.

Someone can explain me the main differences between MFC, Windows
Forms and WinForms?

Thanks
 
K

Kevin Spencer

1) Is Microsoft Office using any of the .NET technology ( or
framework ) in their products like microsoft word, excell etc? If yes,
then how is it managing to refer the framework without having .NET
framework installed as the default in windows XP OS?

Any product that requires the .Net platform either installs it or it doesn't
work. AFAIK, no Office products employ the .Net platform. Office 2007, I
believe, has some built-in Interop assemblies that enable .Net applications
to interact with Office products.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
K

Kevin Spencer

"MFC' is "Microsoft Foundation Classes." It is a set of C++ classes for
writing C++ applications.
"Windows Forms" and "WinForms" may refer to any of several things, all of
which share one thing in common: the Windows Forms API, which is an API in
the Windows Operating System for creating forms and controls.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

.NET Vs MFC controls 2
mfc or dotnet? 20
WPF vs WinForms 18
MFC vs .NET 1
MFC or .NET FCL? 2
Adobe Flex vs. .NET WinForms 11
.Net vs MFC 3
Win32? MFC? .NET? What to use for embedded dev? 9

Top