From: MrAsm on
On Sun, 11 Feb 2007 02:18:35 GMT, Steven O. <null(a)null.com> wrote:

>I now plan to develop some simple scientific and mathematical
>applications, mostly for self-study purposes, but some of them may
>turn commercial at some point. The guts of the programs will be the
>mathematical logic and processing, but I do need a GUI front-end for
>data input, setting parameters, results display, etc. I've downloaded
>both Visual C++ Express and Visual C# Express, but haven't explored
>them yet, and I'm trying to decide which one to pursue.

I believe that with Visual C++ Express you *can't* use MFC. You may
download the Platform SDK (separate download) and develop your GUI
code using that SDK (not MFC).

But if you find it hard to develop GUIs using VC6 and MFC (with all
the wizards and IDE support), I think you will have hard-time to
develop using "pure" Win32 Platform SDK...


>In terms of underlying code for program logic, I'd prefer to work in
>C++, both because I know it already, and because it is more universal
>than C#. (So, for example, it would be easier to port the code to
>some other environment down the road.)

There are C# projects in development under GNU/Linux (like Mono and
DotGNU). But I don't know their level of compatibility with
Microsoft's C# and IDE...


> On the other hand, I don't
>want to waste time learning GUI programming again.

If you don't want to learn GUI programming, then choosing Visual C#
2005 Express would be a better option.
It's just drag-and-drop and add event handlers... :) Very RAD.


>I want to be able to slap together a basic GUI using drag-and-drop
>style development for GUI components. A very quick peek at Visual C++
>Express does not immediately reveal a drag-and-drop development tool,
>but I may have missed something. (Have not even installed Visual C#
>Express yet.) So, in the end, I'll go with whichever language makes
>its easier to put the GUI together, and if that means learning C#,
>I'll do that.

So you should learn C#.

And consider also that C# is basically C++ without pointers and with
some interesting features (like garbage collector, built-in
reflection, a huge library - the .NET framework, etc.)

However, if you want to implement very complex data structures, you
may also consider support of libraries like STL or Boost. In this
case, for what I know, you have to use C++ (maybe there's a STL.NET,
but I think it is under development...).

I think that building the core of your app in C++ and building the GUI
using C# RAD-system, and call C++ code from C# (using C-interface DLL
or COM) would be the best choice for you.

MrAsm
From: Scott McPhillips [MVP] on
> Steven O. wrote:
>
>> Short version: I will be creating stand-alone applications for
>> Windows. Which environment will make it quicker and easier for me to
>> create the necessary GUI's -- Visual C++ or Visual C#?
>>
>> Longer version: I took a bunch of programming classes some years
>> back, including two semesters of C++, but I've been away from it for a
>> while. One thing I found with C++ was that trying to create even a
>> basic GUI using Visual Studio 6 with MFC was an absolute bear.

Creating a dialog-based MFC application is not an absolute bear, it is
easy. It has a learning curve, to be sure, but so does C#. Given your
knowledge and preference for C++ then you should have another go with
MFC. Maybe achieving some comfort with it takes a bit longer than you
had available in school.

>> On the other hand, I don't
>> want to waste time learning GUI programming again.
>> I want to be able to slap together a basic GUI using drag-and-drop
>> style development for GUI components.

MFC and C# both provide drag-and-drop GUI design.

Do you have access to anybody who is familiar with MFC? Somebody like
that could get you going in 10 minutes with an MFC dialog-based application.

--
Scott McPhillips [VC++ MVP]

From: MrAsm on
On Sun, 11 Feb 2007 11:32:17 -0500, "Scott McPhillips [MVP]"
<org-dot-mvps-at-scottmcp> wrote:

> >> On the other hand, I don't
> >> want to waste time learning GUI programming again.
> >> I want to be able to slap together a basic GUI using drag-and-drop
> >> style development for GUI components.
>
>MFC and C# both provide drag-and-drop GUI design.
>
>Do you have access to anybody who is familiar with MFC? Somebody like
>that could get you going in 10 minutes with an MFC dialog-based application.

Scott: I think that C# RAD approach is far more easier than MFC.
To me, C# RAD seems more like to Visual Basic 6 RAD.

For example, to change the background color of a control, in C# you
simply set it into property sheet, while in MFC you should at least
have to use a custom derived class (e.g. CColorEdit, CColorStatic,
some can be found on CodeProject), then have to call proper method in
OnInitDialog(), etc.

It is not hard for one who can program in MFC, sure :) But for a
beginner, I believe C# approach is far more easier than MFC ones.

Sure, if you have a good mentor, you can learn MFC in less time, and
you can be productive in dialog-based apps.
But if you have not a mentor, MFC is IMHO much harder than C#.

Also, consider that MFC books (including the great book by Jeff
Prosise) are focused on Visual C++ 6 IDE and wizards. The Visual
Studio 2003/2005 IDE is very different from VC6 one, and - even if
that is not a big problem for a programmer who already knows MFC - I
think it is a problem for one who is learning MFC for the first time,
and has only VC6 related tutorials and books.

MrAsm
From: MrAsm on
On Sun, 11 Feb 2007 08:03:30 +0100, "Bruno van Dooren [MVP VC++]"
<bruno_nos_pam_van_dooren(a)hotmail.com> wrote:

>> Short version: I will be creating stand-alone applications for
>> Windows. Which environment will make it quicker and easier for me to
>> create the necessary GUI's -- Visual C++ or Visual C#?
>
>See my blog for an explanation of when I would use either C++ or C#, based
>on their strengths and weaknesses.

In your opinion, do you think that would be possible to buil some
"important" software like Office or Visual Studio or Mathematica using
C#? (...and don't require to user wait long time for app start-up or
computations.)

Thanks in advance,
MrAsm
From: Norbert Unterberg on
Steven O. schrieb:
> On Sun, 11 Feb 2007 08:03:30 +0100, "Bruno van Dooren [MVP VC++]"
> <bruno_nos_pam_van_dooren(a)hotmail.com> wrote:
>
> Thank you, your blog is helpful. For my purposes, it's still a coin
> toss. I want rapid application development, so C# seems appealing in
> that sense. On the other hand, I plan to write my own low-level
> libraries for things like matrix processing, data structure searches,
> etc., for which the memory control and speed of C++ would be
> appealing. Decisions, decisions....

Before doing all the work again, you might want to have a look at the work
others have already done. Have a look at boost linear algebra package:

http://www.boost.org/libs/numeric/ublas/doc/index.htm

Norbert