Should I learn .NET for making design tools?

Started by
22 comments, last by SimonForsman 11 years, 10 months ago
Ah. I'll take a look at it then.

Thank you, everyone. laugh.png
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
Advertisement
I see many people here recommend winforms - but it is like the retarded uncle of WPF. If you want to easily make a good looking, and/or custom looking GUI, you should learn WPF instead, ESPECIALLY if you don't already know winforms.

It's databinding support is an ridiculous amount better than winforms, it separates view and logic ala HTML (but more app-centric, of course) via XAML, it is hardware accelerated among more things. On one occasion I made the backend in C++, made a wrapper library using C++/CLR, and made it available to end-consumers via WPF. Very smooth.

I should point out that for now WPF seems to be windows only - relying heavily on D3D etc, etc, it's probably hard to make a mono implementation. If I recall correctly, winforms also had a few problems running on mono.

On a final note, C# is a very pleasant language. :) It's not quite as powerful as C++ when it comes to templates among other things, but syntax-wise and ease-of-use it's very good.

I see many people here recommend winforms - but it is like the retarded uncle of WPF. If you want to easily make a good looking, and/or custom looking GUI, you should learn WPF instead, ESPECIALLY if you don't already know winforms.

It's databinding support is an ridiculous amount better than winforms, it separates view and logic ala HTML (but more app-centric, of course) via XAML, it is hardware accelerated among more things.


It's also slow, bloated and has a very uncertain future. I worked on a wpf app for 3 years and it really wasn't worth it. Even MS have stopped pushing it in favour of html5.

Winforms, on the other hand, might not be sexy, but it's stable, fast and has a user base that's an order of magnitude larger than any wpf app.

In fact, I've only seen two WPF apps in the wild. One is Visual Studio 2010 and the other was Evernote (and they eventually ditched it)
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
Winforms under mono is supposedly much more reliable now but they still recommend GTK# instead. GTK# though there isn't any reason why you can't use it on a .net application, you just loose visual studios graphical designer which is excellent IMO.

It's also slow, bloated and has a very uncertain future.


I'm not saying you are wrong, even though my experience is not the same, but do you have anything backing that up?

[quote name='Fábio Franco GFT(Partner) at Microsoft (MSDN)']
Windows Forms will not have any future development.
[/quote]

I know it's just a wrapper for the Win32 API, and support isn't going to be dropped for it, but still.

Admittedly, I haven't tested WPF on computers older than about 6 years, but I've never noticed anything sluggish.

Bloated is a somewhat weird notion. A bloated UI is obviously bad, since it is very cluttered, hard to get an overview. Some people call C++ bloated. Other people call it feature rich. Other people say that it has a too small standard library. In WPF you can just use what you want.

I've also worked on a commercial WPF app, but very small. I found it comfortable to use. YMMV.
In my opinion pure windows GUI programming (win32) needs some getting used to, but it's not really as hard as everybody seems to believe. It's incredibly powerful once you get the hang of creating your own custom window types (controls). If you don't like GDI, go HW-accelerated and draw everything yourself with Direct3D or OpenGL. You also get to stay close to your engine and within C++ without having to muck about with interoperability with .NET.
Also, you can always check some of the available win32 C++ wrapper libraries like win32++ or DWinLib.
In my opinion pure windows GUI programming (win32) needs some getting used to, but it's not really as hard as everybody seems to believe.

True, but not hard to use doesn't make something efficient. It's not hard to make a hole for a pool in your garden using your hands either, still most people would rather use a shovel instead. Same with win32, trying to make a advanced GUI application in pure win32 will take you twice as long as it would with any decent GUI toolkit, or even longer if you want to use special GUI widgets that win32 doesn't natively has but you have to make yourself first. However there is no reason that using C++ means using win32, in fact the main reason why C++ has a bad name when it comes to GUI is WIN32. However there are several decent GUI toolkits available for C++ that are just as good or even better then stuff like Winforms.

Personally I'm using Qt for tools as well as prototype applications, it comes with an extensive library of not just GUI widgets but also a powerfull application framework. It also has a decent form designer, not just for placing GUI elements but also setting up the events. It's very easy to make a GUI in it, and it can easily be integrated with your c++ game engine by having a custom widget to which your engine can render.

[quote name='ChaosEngine' timestamp='1341398804' post='4955586']
It's also slow, bloated and has a very uncertain future.


I'm not saying you are wrong, even though my experience is not the same, but do you have anything backing that up?
[/quote]

I don't have any hard numbers at the moment (I left that job 18 months ago), but the WPF app was using nearly 10 times the memory of the equivalent winforms app and took 2-3 times as long to start up.


[quote name='Fábio Franco GFT(Partner) at Microsoft (MSDN)']
Windows Forms will not have any future development.


I know it's just a wrapper for the Win32 API, and support isn't going to be dropped for it, but still.

[/quote]

Agreed, winforms isn't ideal, but it's still better than WPF. No-one is using it. It utterly failed to get any traction in the marketplace.



Bloated is a somewhat weird notion. A bloated UI is obviously bad, since it is very cluttered, hard to get an overview. Some people call C++ bloated. Other people call it feature rich. Other people say that it has a too small standard library. In WPF you can just use what you want.



When I say bloated, I was referring to the memory usage.


I've also worked on a commercial WPF app, but very small. I found it comfortable to use. YMMV.


The company I worked for bet on WPF as the successor to winforms and committed to using it for an enterprise LOB app after a few experiments with smaller apps. And for small apps, it was great, but it just doesn't scale well at all.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
I just installed Windows 8 Release Preview and Visual Studio 2012 RC. The UI for your app is now developed with either XAML or HTML. The .NET forms designer is gone and in its place is an XAML designer. So if you are interested in the future of Microsoft GUI development you may want to investigate XAML.
I think it depends heavily on the goals. Are you talking about generic, fancy tools or just stuff to make specific things to specific games?

I made a specific map editor that only had keyboard input and was perfectly enough. I'm also making an editor that I want to release, and I think I will try Qt for that or some other powerful stuff.

This topic is closed to new replies.

Advertisement