The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

To .NET or not to .NET

I've just started planning and designing a new application for Windows. I would normally go straight in and code it in C++ using MFC for the user interface but having just installed Visual Studio 2005, I've realised how dated MFC applications look.

I like the look of the menubars and toolbars in Visual Studio and set about finding out how to include those in my application. It turns out that you have a choice:

1. Use Windows Forms (C++/CLI) to write the entire application
2. Create the application using MFC as normal but include the Managed Extensions allowing me to include Windows Forms controls.
3. Purchase a third-party library that gives me similar controls for use in native C++.
4. Code them myself.

Now, I have been avoiding learning WinForms and C++/CLI so far but maybe it's time to learn. Options 1 & 2 will involve learning on my part as well as having to install the .NET runtime on clients machines. Option 3 is not ideal for a starting MicroISV (which is what I am hoping to do) and 4 obviously takes time.

My question is, what would you other developers do to get a modern looking user interface? Would you switch from MFC to Windows Forms to achieve this?
Thursday, March 02, 2006
Is C++ an absolute requirement?

We've been a C++ shop for as long as I care to remember, but for our most recent Win32 GUI app we dipped our toe in the C# waters.

We are never, ever, ever going to code a GUI in C++ again. C# is just so much more productive it isn't funny.

We've used the DotNetBar library (, I think) and it's worked great for us.
Andrew Lighten Send private email
Thursday, March 02, 2006
I agree with Andrew. If you are going to do .NET, use C#. Managed C++ is a waste of time. You'd might as well just do it using MFC if you are going to do C++ anyway. Besides, you will pick up C# in about a week and end up getting Java for "free". C# and Java are so close it isn't even funny.

So if you decide to do the .NET thing I would suggest spending just a little more time and learn C#. You won't be sorry.
Turtle Rustler
Thursday, March 02, 2006
+1 for using C#
System of a Don Send private email
Thursday, March 02, 2006
What exactly is it that VS2005 C# WinForms gives you in GUI look?  Is there someplace I can view this on-line?  (I looked briefly at the MS Visual Studio website, but could not take time to find something because my wife is yelling at me to come help give the kids a bath!) Is it simply automatic support for XP Themes or is there something more?  There are ways to get the XP Theme support in your MFC apps without too much trouble.

I have VS2003 and have only played with WinForms (using C#) a little.  I'll admit, it was very easy and intuitive.  I'll wager VS2005 WinForms makes it even easier.  But I, like you, am a seasoned C++/MFC developer and that seems easy to me as well.

My point is, 1) figure out exactly what it is that you want, 2) figure out how to do it in MFC, 3) then make the decision whether it is worth it to make the C#/.NET jump.  Your post is obviously seeking advice about 2) and 3), but 1) is not clear to me.
fjlaga Send private email
Thursday, March 02, 2006
Andrew, Managed C++ is dead, but C++/CLI is a great language! It came a little late, but it's still a thing to consider. C# is not everything.
smalltalk Send private email
Friday, March 03, 2006
I am a seasoned C++ developer and was also very reluctant to even look at C#, thinking that it was similar to VB.  However, now after using it some personal projects, I am completely converted, to the extent that I would be very happy to never use C++ again.  This isn't an easy thing to say after building my C++ skills and experience over many years.  I still code in C++ at work and it feels as though I get far more done at home in the evenings in c#.
Furie Send private email
Friday, March 03, 2006
Thanks everyone for your replies.

I'm not really looking for answers to my questions, just opinions on what others would do in this situation.

I must admit though, the thought of using a language other than C++ hadn't even crossed my mind because I know it so well but there's no reason why I couldn't consider it.

At work, we use C++ exclusively with MFC and CodeJock XTreme Toolkit Pro (which is excellent) for user interfaces. I've been meaning to learn .NET for a while in my own time to keep my skills base current so I'll probably end up finding a .NET solution - either C++/CLI or C#.
Friday, March 03, 2006
This is a great thread.  I'm considering writing a small desktop app in C#/.NET instead of C++/MFC.

There is one question that was raised in the original message that I'm still not sure of.  Is installing the .NET runtime on a users machine a big deal.  I've worked for companies in the past that had components that required the VB runtimes.  It turned into a support nightmare.  It would not always install correctly or a newer version would be install and break the app.

What is peoples experience with this?  Has it been pretty straight forware or is it a problem?

Randy Arms Send private email
Friday, March 03, 2006

You and I sound like we are in the exact same boat.  I have been a die-hard MFC/C++ developer at work for many years now.  We also use Xtreme Toolkit for GUI stuff.

However, lately I have been reading about all the new fangled XAML, WinFX, Microsoft Designer, etc. coming out for Vista development and it hit me like a ton of bricks - I may soon be irrelevant with my current skill set (like 3-7 years from now).  So, I got ahold of a really good C#/VS 2005 book and started porting some of our company's internal ultilities made in MFC to C# (Windows Forms).  All I can say is that I am also pleasantly surprised with C#/.NET.  I can certaily see how this stuff is the future of Windows development in the next 2-10 years.  Plus, it is really nice to learn something new again.  I forgot the joy and satisfaction that there is in learning a new programming language and tool.

So, although this does not answer your question, maybe it will help to know the opinion of someone in a very similar situation to you.  Like everyone above said, if you are good at C++, C# will only take a week or two to getthe hang of.  My biggest challenge is getting my head around all that .NET offers.
Friday, March 03, 2006
The fact so many think C#/.NET or C++/MFC are their primary choices for Windows desktop apps, shows yet again how inept Borland is at marketing their IDEs.

Have any of you guys considered C++ Builder?

It gives you C++, and all the benefits of C++ and the C++ standard library.
It’s a drag-and-drop IDE just like Visual Studio/C# or VB.
There is no .NET runtime to distribute.
There are hundreds of 3rd party components available.

MFC is C# are not the only choices. In fact, they are both poor choices for desktop apps.
MBJ Send private email
Friday, March 03, 2006
Isn't Borland abandoning it's IDE products and moving towards Application Lifecycle management?
sr Send private email
Friday, March 03, 2006
"MFC is C# are not the only choices. In fact, they are both poor choices for desktop apps."

I'd agree, if we were talking about java-based desktop apps.
sr Send private email
Friday, March 03, 2006

I never said C# was everything. We still use C++ for all our Win32 server based stuff, and will do so for a long time. And it's all we use for our *nix coding.

But when you're talking about Win32 desktop GUI applications -- the rich client stuff for most of our customer desktops -- our experience is that C#/WinForms/.NET is so good that C++/MFC no longer makes economic sense.
Andrew Lighten Send private email
Friday, March 03, 2006
MBJ mentioned C++Builder, which is Delphi for C++.  I've used it for some time now.  I liked it a lot for its time.

But ya know what?  Delphi's chief architect moved to Microsoft in 1996 and then he designed C#.  Anders Hejlsberg kicks ass.  C# is even better than Delphi:  It's Delphi + Java + VB, with more third-party support.

C++/CLI is a great *language*, but *tool* support for C# is better.  Resharper, for instance, is worth looking into - but only for C#.  And even within Visual Studio, C++/CLI feels like a second class citizen.

C++ still offers features you can't get elsewhere, but .NET makes it so easy to switch into C++ on an as-needed basis that I don't mind using primarily C#.
Chaz Haws Send private email
Friday, March 03, 2006
+1 on C# in VS 2005 as a productive programming environment.  Well worth the quick learning curve.

Only one thing about .NET apps: they are generally slower than an MFC app, particularly at startup time when there are no other .NET apps loaded.  After the app is loaded, the performance hit isn't as serious, although still noticable.
Saturday, March 04, 2006
"Isn't Borland abandoning it's IDE products and moving towards Application Lifecycle management?"

They plan to sell off the IDE business.

Don't get me wrong, I think C# and .NET are a great development environment, but two things really bug me.

1. Need to downloaded and install .NET runtime.
2. .NET apps are noticeably slower than pure WIN32 apps.

This may not be a problem in the corporate world, but for those who development desktop apps for download off the net, it's a problem. Not only does the user have to download a 20 mb. runtime, but WinForms GUIs are not as snappy as what they are used to seeing. So, it’s a double hit.

And with Delphi/C++ Builder, you can usually link everything you need into the EXE.
MBJ Send private email
Saturday, March 04, 2006
If you are just planning now, skip the Winforms altogether and go straight to Avalon.
I am of the same background as you - seasoned C++ dev, MFC/Xtreme Toolkit yadda yadda but I am using C# and Visual Studio 2005 for my future microISV product. For the GUI I already have a working WinForms 2.0 implementation that I am not really happy with and plan to go with Avalon even if it means yet another framework for my customers to install. As somebody said it on one of these forums - if your customers don't find your solution to their problem worthy of a framework installation, you're doing something wrong.

Try Avalon (Microsoft calls it Windows Presentation Foundation) you might be very pleasantly surprised. And don't think of C# as a different language - I jumped in from C++ without reading a single C# language book (but I did read a LOT of .NET and BCL books).
Drazen Dotlic Send private email
Sunday, March 05, 2006
I personally code using VB.Net...and I think it's great! The only issue (which has been voiced on JOS before) is that once the app is completed, you have to make accommodations to users on downloading/implementing the .Net framework which is about 23MB in size.

While this is a small obstacle, it is a bit irritating because it bloats the size of your app tremendously AND, because the way that Microsoft has structured the relationship between its frameworks and its application design, it will ALWAYS be this way when deploying software created in .Net.


Because Microsoft comes out with a new OS every 4 years, so you are always going to have the problem of deploying bloated (new Frameworks) on users' systems.

.Net is a great language though......easy to learn.....challenging to master.....incredibly flexible...
Brice Richard Send private email
Monday, March 06, 2006
New languages and framework every 2 years too.
Artad Gobeski
Monday, March 06, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz