Re: C++ vs. C# (new to windows programming)...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Volker Hetzer wrote:
Hi!

Hi,

What would you suggest?

You could use both.

C++ with a C++/CLI library wrapper for the back end code and C# or any other language for the GUI part.
IMHO it's more straightforward and somewhat easier in C# and other managed (only) languages to code a GUI application.

The compiled C++/CLI library can be easily used from any .NET language and additionally you have separated your GUI from the other code.
Which is a good idea anyway, since a new GUI framework will be introduced for Vista / Windows XP - Windows Presentation Framework.
Though both frameworks will be supported side by side. And you will be able to mix them.

I miss some features of C++ in C#, like RAII, but IHMO that's not that relevant for the GUI part. On the other side C# compiles much faster and offers more IDE features (better Intellisense, code snippets, refactoring) than C++/CLI.

C++/CLI will compile to faster IL code, no doubt, but I doubt that you will see a relevant speed difference for your managed GUI.

For a more (significant) responsive GUI (running on slow PCs) you would have to choose a native compiler / IDE, which Microsoft offers only for C++. But using MFC to start a new IDE isn't a good idea - IMHO. You should IMHO choose another vendor if you want to go that way.

I would suggest you to play around somewhat with C++/CLI and C# and code some simple GUI applications with both languages. Additionally you should create a simple .NET library in C++/CLI and see how easy it is to consume the managed objects / classes from any .NET language you like.
Then you can make a decision of your code.

If you need speed and supporting native code (assembly language, mixing managed and native code) then C++/CLI is the way to go. But you can compile this code to a library (dll) which has some C++/CLI objects wrapping the native code. Which you would have to do anyways in a C++/CLI only application, because you need to marshal data from and to native code when mixing native and managed code.

Lots of Greetings and Thanks!

Hope my post has helped somewhat.

Volker

Andre
.



Relevant Pages

  • Re: Newbie Needs Ada Advice
    ... the "right" thing, and it seems to me like Ada is, in theory, a great ... text-to-whatever-type conversion when you read stuff from the GUI back ... "right" language to me for most of what my objectives are. ... Ada as the "engine" for my program, and somehow use Java to create the ...
    (comp.lang.ada)
  • Re: Newbie Needs Ada Advice
    ... the "right" thing, and it seems to me like Ada is, in theory, a great ... text-to-whatever-type conversion when you read stuff from the GUI back ... "right" language to me for most of what my objectives are. ... Ada as the "engine" for my program, and somehow use Java to create the ...
    (comp.lang.ada)
  • Re: Still clinking to Java?
    ... I was toying with saving effort by making the C version a DLL and redoing the GUI in my portable Cello GUI. ... But there would be new work on the engine, and just trying to get a clean compile of the C version under VC++ I saw enough to remind me I would rather work in Lisp. ... IDE investments can simply be skipped. ... I just don't want to switch language _at that point_ and recode ...
    (comp.lang.lisp)
  • Re: Best book for learning MFC/VC 7.1 for developing rich GUI apps ?
    ... many people will ask why you're not considering starting from the .Net framework - which is where most of Microsoft's efforts are today. ... Well, IL code can be easier reengineered as native code, since you have additional information about classes, variable names etc.. ... By the way the C++ compiler is the only one which can compile mixed binaries. ... all I need is to know how to create a GUI frontend for my libraries - I like .NET GUI capabilities but I don't like the fact that my binaries can be easily converted to source. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: casts
    ... client to bankroll Yet Another development of a vanity system for ... supporting GUIs, yeah I dunno how do dat. ... to the GUI, another to localizations, another to QA, another to the ... University in machine language for the IBM 1401 in 1970. ...
    (comp.lang.c)