views:

1195

answers:

4

When developing with Mono for an app to be run on Windows and Mac OSX (and maybe Linux) which would you suggest, WinForms or GtkSharp for the GUI and why?

Specific examples and success/horror stories would be much appreciated.

+3  A: 

When deciding whether or not to use a cross-platform architecture, gague your requirements of having a tight UI against agility toward change and development time. Using a platform-specific UI framework is (almost) always going to give you better looking and better performing results than you'll get from a cross-platform one.

Adam Robinson
A: 

I would say WinForms. Mainly because you won't need Mono on Windows to run programs on it.

Migol
You don't need a full mono to run GTK# on Windows, just the GTK# assemblies: http://www.go-mono.com/mono-downloads/download.html. An app could bundle them, but most people involved in F/OSS prefer the "system copy" method.
MighMoS
@MighMoS didn't know that. So why would anybody chose Winforms on Mono for a new app, unless your target platform is Windows?
Yar
But you still need to distribut them and AFAIK it's like 30 MB of them.
Migol
A: 

GtkSharp requires X11 on Mac OS X. Mac users will find that off-putting. I haven't tried Winforms on OS X, but mono's Linux winforms support was pretty immature (buggy) and slow. I don't think there is a mature .net GUI toolkit for OS X at this point, at least nothing at the level of Swing or SWT.

karunski
Actually, according to http://en.wikipedia.org/wiki/Gtk_Sharp GtkSharp no longer needs X11 on OSX as of Mono 1.9
Adam Haile
Yeah, you're right, I just tried it and it doesn't launch the X server. Still, both GTK# and Winforms need X11 on Mac OS X to work, and it doesn't have a native look and feel.
karunski
That's not true. WinForms on Linux work great... if you know how to code against them
pablo
+6  A: 

Cross platform development is a nice idea, but to be completely honest I have never seen an application that looks really good outside of its native environment. That is why I think, that if you really want to offer good user experience you should use native toolkits on all platforms that you want to support.

Of course, if you just want a proof of concept, then WinForms on a Mac (or Linux) are alright but if you want an application that competes against other native solution then you really should consider writing a separate native frontend for each supported platform.

A good example how that was done is MindManager from Mindjet. Their Mac version is a full, from scratch rewrite of the interface. The result is an application that gives Mac users the experience that they learned to expect on their platform.

So, back to Mono. There are Cocoa# bindings in Mono. Personally, I have never tried using them, but if you want to target Macs with your application, they are certainly worth a look. It would be really great if they could be regarded as a valid choice for UI development on a Mac.

Piotr Zurek