473,750 Members | 2,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1376
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******@effis ols.com> wrote in message
news:OF******** *****@TK2MSFTNG P14.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

"ProfitMaxTradi ng.com" <no****@nospam. com> wrote in message
news:CHv6f.5876 $xE1.2922@okepr ead07...
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.nos pam>
skrev i meddelandet news:e8******** ******@TK2MSFTN GP09.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******** *************@n ewsc.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.nos pam>
wrote in message news:eY******** ******@TK2MSFTN GP10.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******** *************@n ewsc.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
2588
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 submitting it to BDFL for approval, more work was needed and the discussion of PEP 318 on python-dev increased rapidly. It was evident that I was in over my head, so I asked more someone more experienced to take over. I guess others had bigger...
72
4858
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' nature of the coding, which I believe concerns the way attributes relate to one another when 'nested'... I think I can illustrate the nature of the beast with this example, using just two text styles:
99
6226
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 small or mid-sized business. http://groups-beta.google.com/group/microsoft.public.msdn.general/browse_thread/thread/9d7e8f9a00c1c7da/459ca99eb0e7c328?q=%22Proposed+MSDN+subscription+changes%22&rnum=1#459ca99eb0e7c328 Damn! To be that...
3
2038
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 DataNode is changed, it raises "Changed" event. The class has a reference to the DataNode it is being contained in: - DataTree - tree like data structure that contains DataNodes; When
41
4318
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 on some initialization information obtained elsewhere. Basically, I'm going to create my own dynamic toolbar where the toolbarbuttons can change. I'm not using the VB toolbar because of limitations in changing things like backcolor (I can't get...
12
1500
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 will be proposing a .NET Windows application with a supporting SQL Server database. It will likely take 4-5 months before we roll out the first production version. Because of the apparent issues with VS 2005 (poor performance, unpredictable and...
54
3421
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 mention that entire inner while loop and what it'strying to accomplish. I figured that if I can at least understand each line of this strstr methodand why it's written the ways it written, as well as in regards to perfomance or code simplicity, it...
15
1898
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
2403
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 end is complaining often when I try to execute code. I tried using the mdb front end and linking tables to SQL. After renaming the table (links) from dbo_tbl_Customers to tbl_Customers, the app runs great.
0
9001
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9583
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9396
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8263
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6808
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4888
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.