473,395 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Just your opinion about MFC and C++.NET

Hello!

Some information to be able to have a change to answer the question.
Assume I have a large system developed in MFC.
In this system we have only C++ code so no other language exist.
This system is 10 year old.

I just want your opinion about porting this system.
Assume it should be ported should it be to C++.net or C#.net.

I just want to know the advantage or dissadvantage between C++ and C# if you
have any idea.
I know the syntax is vary similar between C++, C# and Java.

//Tony
Nov 17 '05 #1
9 1351
Tony Johansson wrote:
Hello!

Some information to be able to have a change to answer the question.
Assume I have a large system developed in MFC.
In this system we have only C++ code so no other language exist.
This system is 10 year old.

I just want your opinion about porting this system.
Assume it should be ported should it be to C++.net or C#.net.

I just want to know the advantage or dissadvantage between C++ and C# if you
have any idea.
I know the syntax is vary similar between C++, C# and Java.

//Tony


Tony:

Not sure what you mean.

If you mean converting your MFC app from VC6 to VC7 or VC7.1 or VC8,
then you just need to recompile. This does not involve .NET at all.

If you mean completely porting the application to the .NET framework,
then this is a lot of work. I would certainly recommend that you wait
for Visual Studio 2005 (not much longer!). If you do that, and stay with
C++, there is a new language C++/CLI which is much nicer than the
managed C++ in VS 2002/2003. But, personally, I am avoiding anything to
do with .NET for now, so I have no real opinion on C++ vs C#.

David Wilkinson
Nov 17 '05 #2
This is getting confusing.

VB6,7,8 ?

..NET Framework?

Here I thought .NET enveloped all these.

Oooh my head hurts.

:-(

"David Wilkinson" <no******@effisols.com> wrote in message
news:OF*************@TK2MSFTNGP14.phx.gbl...
Tony Johansson wrote:
Hello!

Some information to be able to have a change to answer the question.
Assume I have a large system developed in MFC.
In this system we have only C++ code so no other language exist.
This system is 10 year old.

I just want your opinion about porting this system.
Assume it should be ported should it be to C++.net or C#.net.

I just want to know the advantage or dissadvantage between C++ and C# if
you have any idea.
I know the syntax is vary similar between C++, C# and Java.

//Tony


Tony:

Not sure what you mean.

If you mean converting your MFC app from VC6 to VC7 or VC7.1 or VC8, then
you just need to recompile. This does not involve .NET at all.

If you mean completely porting the application to the .NET framework, then
this is a lot of work. I would certainly recommend that you wait for
Visual Studio 2005 (not much longer!). If you do that, and stay with C++,
there is a new language C++/CLI which is much nicer than the managed C++
in VS 2002/2003. But, personally, I am avoiding anything to do with .NET
for now, so I have no real opinion on C++ vs C#.

David Wilkinson

Nov 17 '05 #3

"ProfitMaxTrading.com" <no****@nospam.com> wrote in message
news:CHv6f.5876$xE1.2922@okepread07...
This is getting confusing.

VB6,7,8 ?

.NET Framework?

Here I thought .NET enveloped all these.

Oooh my head hurts.

:-(

I'll attempt a clarification. Lets start by assuming you meant to type VC
instead of VB.
VC 6, 7, 7.1, 8 are referring to versions of the C++ compiler, which come
with Visual Studio 7, Visual Studio .NET 2002, Visual Studio .NET 2003 and
Visual Studio 2005, respectively.
All these versions of the C++ compiler support Windows application
development using MFC.
With Visual Studio .NET 2003, we got an additional technology for developing
Windows applications with C++, .NET Windows Forms which uses the .NET
Framework classes in place of the MFC classes.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Nov 17 '05 #4
Peter van der Goes wrote:
VC 6, 7, 7.1, 8 are referring to versions of the C++ compiler, which
come with Visual Studio 7, Visual Studio .NET 2002, Visual Studio


VC6 (aka VC '98) is from Visual Studio 6, not 7.

-cd
Nov 17 '05 #5
Tony Johansson wrote:
Hello!

Some information to be able to have a change to answer the question.
Assume I have a large system developed in MFC.
In this system we have only C++ code so no other language exist.
This system is 10 year old.

I just want your opinion about porting this system.
Assume it should be ported should it be to C++.net or C#.net.

I just want to know the advantage or dissadvantage between C++ and C#
if you have any idea.
I know the syntax is vary similar between C++, C# and Java.


Syntax is the least or your worries - almost a non-consideration IMO.

Get VC8 and compile your app. You'll have somewhere between zero and
several thousand errors to fix due to language changes since VC6. While the
numbers may be daunting, these errors are usually easy to fix once you've
tackled the first few.

I wouldn't even consider "porting" a large MFC app to C# unless it's ready
to be completely retired. You'd have to re-write virtual every line of
code, and you'd have to do major re-architecting to fit into the Windows
forms paradigms instead of MFC. Many MFC concepts simply have no equivalent
in windows forms (e.g. documents, views), so you'd have to build
replacements for those features yourself. Finally, windows forms (even in
VS 2005) doesn't have the UI richness that's attasinable through MFC.

Having updated your app (I wouldn't call it porting) to VC8, you can now
consider whether you want to use .NET for new features going forward. The
version of MFC included in VC8 allows you to host .NET forms and controls
inside MFC views, so it makes it easy to use .NET to add new features to an
existing MFC application without re-writing the base application in another
language or framework.

-cd
Nov 17 '05 #6
Hello!

You say this and it sounds good.

Having updated your app (I wouldn't call it porting) to VC8, you can now
consider whether you want to use .NET for new features going forward. The
version of MFC included in VC8 allows you to host .NET forms and controls
inside MFC views, so it makes it easy to use .NET to add new features to an
existing MFC application without re-writing the base application in another
language or framework.

Now to my question. Assume we compile the MFC application in VC8. When we
want to add new feature to the application using .NET is it then possible to
use C# insted of C++. I just think that using C# instead of C++ will cause
less error beacuse it's an easier language. Compare this you create an
application quicker when using Java then C++ beacuse it's an easier language
and the possibility of strange errors in the future is much less with Java.

C# is quite similar to java.

//Tony
"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
skrev i meddelandet news:e8**************@TK2MSFTNGP09.phx.gbl...
Tony Johansson wrote:
Hello!

Some information to be able to have a change to answer the question.
Assume I have a large system developed in MFC.
In this system we have only C++ code so no other language exist.
This system is 10 year old.

I just want your opinion about porting this system.
Assume it should be ported should it be to C++.net or C#.net.

I just want to know the advantage or dissadvantage between C++ and C#
if you have any idea.
I know the syntax is vary similar between C++, C# and Java.


Syntax is the least or your worries - almost a non-consideration IMO.

Get VC8 and compile your app. You'll have somewhere between zero and
several thousand errors to fix due to language changes since VC6. While
the numbers may be daunting, these errors are usually easy to fix once
you've tackled the first few.

I wouldn't even consider "porting" a large MFC app to C# unless it's ready
to be completely retired. You'd have to re-write virtual every line of
code, and you'd have to do major re-architecting to fit into the Windows
forms paradigms instead of MFC. Many MFC concepts simply have no
equivalent in windows forms (e.g. documents, views), so you'd have to
build replacements for those features yourself. Finally, windows forms
(even in VS 2005) doesn't have the UI richness that's attasinable through
MFC.

Having updated your app (I wouldn't call it porting) to VC8, you can now
consider whether you want to use .NET for new features going forward. The
version of MFC included in VC8 allows you to host .NET forms and controls
inside MFC views, so it makes it easy to use .NET to add new features to
an existing MFC application without re-writing the base application in
another language or framework.

-cd

Nov 17 '05 #7
"Tony Johansson" <jo*****************@telia.com> wrote in message
news:oY*********************@newsc.telia.net...
Now to my question. Assume we compile the MFC application in VC8. When we
want to add new feature to the application using .NET is it then possible
to use C# insted of C++. I just think that using C# instead of C++ will
cause less error beacuse it's an easier language. Compare this you create
an application quicker when using Java then C++ beacuse it's an easier
language and the possibility of strange errors in the future is much less
with Java.


When you are using the Visual C++ "It just works" feature, you can compile
C++ code to .NET code. This .NET code can use any .NET component created by
any .NET language.

If you really want to use C# for the most part, you would compile your
existing code via IJW (at least the one that should be extended with managed
features) and write some C++/CLI code that calls your C# code. However, you
would end up in a situation where you use 3 different languages: C++,
C++/CLI, and C#. I am not sure if this is really what you want.

Re: IJW, I am probably doing a webcast about how IJW works. If it is
interesting for you, I will post you a link when it is done.

Marcus
Nov 17 '05 #8

"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:eY**************@TK2MSFTNGP10.phx.gbl...
Peter van der Goes wrote:
VC 6, 7, 7.1, 8 are referring to versions of the C++ compiler, which
come with Visual Studio 7, Visual Studio .NET 2002, Visual Studio


VC6 (aka VC '98) is from Visual Studio 6, not 7.

-cd

Argh! Typo on my part. Thanks for pointing that out, Carl!

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Nov 17 '05 #9
If the program you're describing uses MFC to do document/view and makes
heavy use of other MFC classes I would try to stay with it going forward
unless you have a compelling reason to switch to C#. You can move parts of
your program to managed code that are not necessarily performance restricted
and/or where you want to use .NET functionality. My feeling is that C# will
develop as time goes on to have more things that MFC currently has, but that
doesn't seem to be the case at this time.

IOW, a lot depends on what your program is doing. If you've written a
web-service using MFC, for example, I would hurry up and switch it to .NET
using C#. If you use MFC ISAPI, um, my opinion, is that you shouldn't these
days.

Tom

"Tony Johansson" <jo*****************@telia.com> wrote in message
news:yK*********************@newsc.telia.net...
Hello!

Some information to be able to have a change to answer the question.
Assume I have a large system developed in MFC.
In this system we have only C++ code so no other language exist.
This system is 10 year old.

I just want your opinion about porting this system.
Assume it should be ported should it be to C++.net or C#.net.

I just want to know the advantage or dissadvantage between C++ and C# if
you have any idea.
I know the syntax is vary similar between C++, C# and Java.

//Tony

Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
by: Kevin Smith | last post by:
For what it's worth, I wrote the original PEP 318. I probably wasn't qualified, but I just wanted a nice simple way to declare class methods without having to repeat the function name. After...
72
by: Herbert | last post by:
I'm still relativey new to stylesheets, so I'm hoping that the way I'm going about things can be seriously improved upon, i.e . I just haven't undersood something obvious about the 'cascading'...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
3
by: Sasha | last post by:
Hi everyone, Here is my problem: I have the following classes: - DataNode - this class is designed to hold some data and will be contained in a tree like data structure DataTree. When...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
12
by: Jeff | last post by:
Looking for your highly subjective opinions (from those of you who have been working extensively with VS 2005). I have a client that needs/wants a complete rewrite of an existing application. I...
54
by: smnoff | last post by:
Below is a section from string.c at this linkhttp://cvs.opensolaris.org/source/xref/on/usr/src/common/util/string.cthat I am trying to fully understand.I don't fully understand LINE 514; not to...
15
by: =?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?= | last post by:
In my opinion rethrowing exceptions without providing anny extra information is a totall waste Examples : in my opinion wrong : A: Public sub DoSomeStuff() Try do it
4
by: EiEiO | last post by:
Hello, I have a front end back end application created in Access. I need to get it into SQL Server. I used the upsize wizard to create the SQL Server database and the adp front end. The front...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.