472,374 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 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 1304
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.