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.

Considering move from MFC/C++ to Winforms/C# ??? looking for adv

Hi. I'm writing a desktop application. I have 6+ years of C++ / MFC, so I started off writing it in MFC/C++. I'm considering switching it to Winforms/C# because:

1) I like MFC, but I don't want to lock into an older technology that Microsoft doesn't seem too keen on enhancing in the future (i.e. MFC)

2) I might have a future need for mobile/web development

If I do move the app, I'd take the full plunge and re-write the whole dang thing in C#, so I'm not concerned about any interop (etc) issues. I've read a C# book, and the language seems straightforward for me, given my C++ experience, so I'm not worried about the language itself.

I'd like to hear some advice on:

1) WinForms/C# - how is the UI programming experience (I'd especially like to hear, if you have extensive MFC experience)? e.g. How does using purchased components, or writing custom controls compare with MFC? I've read "you must be on crack to even consider MFC in 2005" in a few message boards, but I've yet to be convinced - would you agree with this?

2) WinForms/C# - what do you think the prospects are with regard to the new Vista UI (i.e. is XAML going to kill off support for WinForms)? Should I just stick with MFC for now, and then move it over to XAML in a number of years ???

3) If I do go for it, I plan to buy a lot of the UI components - can anyone recommend some UI suites (e.g. Infragistics). I'm looking for: a good extensible "grid", VS2005 style docking windows, a VS2003+ property grid, and a report control for printing

Any advice would be very much appreciated...

Warren Stevens
Warren Stevens Send private email
Monday, October 17, 2005
 
 
Why?
Arafangion Send private email
Monday, October 17, 2005
 
 
I would choose wxWidgets before choosing MFC.
Jussi Jumppanen
Monday, October 17, 2005
 
 
If you are good at C++/MFC, I can't see any reason for using Winforms/C#.

C# is a nice language, but the results produced with it don't really stand a chance against Win32 applications, IMO.

My advice is to ignore MS latest and greatest, and shoot for maximum platform independence instead (Wx,Qt,C++).
Fritz Send private email
Tuesday, October 18, 2005
 
 
Instead of .NET we move to Qt (from VB/VC) for our desktop applications.
Ervins
Tuesday, October 18, 2005
 
 
If you have no plans to go cross-platform, I would not bother with wxWidgets or Qt. You will never use the primary benefits offered by these frameworks.

If MFC is working for you, why change?

I think if you like the idea of portability to mobile platforms, .NET may be a good choice.

VS 2005 will support managed C++, so perhaps you have your answer right there.
MBJ Send private email
Tuesday, October 18, 2005
 
 
Cross platform or not, go with Qt. The point is to for something that works and in which you can put in your ideas to work immediately. Qt will be trivial for you to learn. You can always consider doing multiplatform if you ever require it in the future.

My app was meant only for Windows and I went with Qt. It just works and productively is awesome.
James
Tuesday, October 18, 2005
 
 
we started to write a new app in 2005 in mfc. the other options was c# and winforms.

because speed and ui speed is a critical factor in our app we dropped the idea to use winforms after doing several tests. it's very slow compared to a mfc app.

oh, and i love the pointer arithmetic in C++. yikes.

Tuesday, October 18, 2005
 
 
Notice how we are getting more "compare" and "moving" that involve something and dotNet?

Is this marketing in action?
flash91
Tuesday, October 18, 2005
 
 
> If you have no plans to go cross-platform, I would
> not bother with wxWidgets or Qt. You will never use
> the primary benefits offered by these frameworks.

Microsoft have publicly stated they are no longer enhancing MFC, where as wxWidgets is constantly being updated.

In my opinion that is one pretty big "primary benefit".
Jussi Jumppanen
Tuesday, October 18, 2005
 
 
I keep hearing people say that Winforms is slow compared to MFC. I wonder how that's being measured. Does anyone have any hard numbers?

I will freely grant that there's a startup cost to WinForms, but at runtime I can't really see the difference on my boxes. And the development experience is SO much better in C# that I'd much rather use it.

MFC is poorly designed, and I wouldn't do any new development in it. If you're sticking to C++ and Win32, I'd suggest seriously looking into WTL. But first, I'd give WinForms a try. It gives you the easy of use of VB with the power you need to get the real stuff done. And using third party components is *simple* - just install 'em and you're done. You don't have to deal with COM registration, ActiveX hosting, or sixteen different DLL's with different combinations of runtime library, debug, release, multithreaded, not multithreaded, unicode, mbcs, etc.
Anonymous for this one
Wednesday, October 19, 2005
 
 
It's impossible to deploy a .NET application, (it is much more complicated than the marketing brochure says, unless you are deploying a trivial clickonce app, and even that a lot of bootstrapping and such and such).
anony Send private email
Wednesday, October 19, 2005
 
 
"I keep hearing people say that Winforms is slow compared to MFC. I wonder how that's being measured. Does anyone have any hard numbers?"

Speaking from my own experience using WinForms applications, the UI can feel a little sluggish. Maybe not slower per se, but you can see the UI repaint, and that's bad. Even with very simple programs like Calculator.NET I can often see the controls being painted, column by column, on my dual core Athlon.

There's been some studies done on this (was it Apple that did it?), and they found that it didn't take much at all for people to perceive a program as being sluggish if the UI wasn't very snappy. That may be what people are talking about when they say it's slow?
sloop
Wednesday, October 19, 2005
 
 
Do yourself a favor, for the desktop move to Python/pyWidgeths and for any web based apps, move to Rubyb on Rails.

You'll be more productive than you could ever dream of.
?
Wednesday, October 19, 2005
 
 
There's no reason to rewrite everything in WinForms, specially since they are already expecteded to be deprecated in a few years.

And yes, WinForms performance is very similar to Java Swing. Surprising, huh?
Rubinelli Send private email
Wednesday, October 19, 2005
 
 
Dear anony,

Nothing is impossible. Especially deploying a .NET app. I've already done it.
Developer #13
Thursday, October 20, 2005
 
 
"VS 2005 will support managed C++, so perhaps you have your answer right there."

I used Managed C++ in VS 2003 for a Fortune 500 company.  Used it because the rest of the team did not want to go to C# but wanted some of the benifits of going with .NET.
SteveM Send private email
Friday, October 21, 2005
 
 
Isn't managed C++ dead and C++/CLI the way to go now?
The lifespan of those technologies get shorter and shorter...
Fritz Send private email
Saturday, October 22, 2005
 
 
Yeah, but Managed C++ was such an ugly kludge that the complete redesign was justified IMO.
Chris Nahr Send private email
Saturday, October 22, 2005
 
 
"Microsoft have publicly stated they are no longer enhancing MFC, where as wxWidgets is constantly being updated."

I have read many people on the web stating that MFC is dead and no longer supported but check out this link:
http://msdn.microsoft.com/visualc/whidbey/mfc2005/default.aspx

Seems supported to me...
Jeremy Shull
Tuesday, November 08, 2005
 
 

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

Other recent topics Other recent topics
 
Powered by FogBugz