Re: Forms and VC++
- From: "Larry Smith" <no_spam@xxxxxxxxxxx>
- Date: Fri, 17 Nov 2006 12:36:07 -0500
If I want to take advantage of the "forms" capability of .NET 2005 and
I want to program in C++, am I required to use the "managed" C++ ? I am
referring to the same "forms" capability as is available to C#
programmers.
Just curious, but is there a reason you're choosing C++ over C#. It may
be a
religious issue but I would never consider it for most mainstream .NET
development. You'll have a much easier time in C#.
I teach an introductory and intermediate C++ programming courses at a
local college ( http://www.bcit.ca/study/courses/comp2617
http://www.bcit.ca/study/courses/comp2618 ) . In the past if I wanted
to give my students a taste of creating "Windows App" in C++, I was
pretty well forced into giving them an introduction to MFC. I am told
(I have not yet had a chance to try it myself) that this "forms"
capability is easier to use than MFC. Is this true?
If so, would this CLR/C++ provide a way for me to teach C++ without
restricitng all my course assignments to console type apps?
In all honesty, I've never actually tried it using C++ so I can't give you
any first-hand experience. I am very experienced in C++ however (20+ years
in C and then C++) but also have about a year of very intense C# development
under my belt now. I'm no expert yet but have already worked in many core
areas of the language including forms. I started working on my own
commercial app last year and chose C# because C++ has been bastardized to
work in .NET while C# was developed explicitly for it. It's a much more
natural fit in the .NET environment. The bottom line is that there are new
non-standard keywords you have to deal with if you go the C++ route
including a new way of dealing with resource managment (who controls memory,
etc. - .NET has garbage collection of course so your C++ apps will no longer
release any .NET resources they acquire - it's really an ugly but necessary
violation of the RAII protocol and may confuse new C++ developers). It's
completely unnatural IOW and so C# is the far better choice IMO. If you're
teaching a C++ course then you may have issues with this. i.e., trying to
teach the C++ language while having to pollute your student's experience
with a lot of non-standard Microsoft extensions (which really run contrary
to the usual C++ rules). I'm willing to bet that Windows forms in C++ will
still be much easier than MFC however (or the raw WinAPI of course) but it's
your call. I doubt that most will actually use it in the real world (C++
form development under .NET) but the experience may still be worthwhile.
That is, I figure that creating .NET forms in C++ is probably very similar
to C# anyway. The IDE takes care of most of the work for you and there's a
lot of similarity between the major .NET languages within the IDE. The
entire experience is really unrelated to C++ however (the subject of your
course) but if you want create a GUI-based Windows app using C++ (while
applying bleeding-edge techniques) then it's probably your only practical
choice these days (since MFC and the WinAPI are clearly on their way out as
mainstream technologies). At least they can port their experience to C# if
they ever go that route.
.
- Follow-Ups:
- Re: Forms and VC++
- From: blangela
- Re: Forms and VC++
- References:
- Forms and VC++
- From: blangela
- Re: Forms and VC++
- From: Larry Smith
- Re: Forms and VC++
- From: blangela
- Forms and VC++
- Prev by Date: Re: Forms and VC++
- Next by Date: Re: Forms and VC++
- Previous by thread: Re: Forms and VC++
- Next by thread: Re: Forms and VC++
- Index(es):