tags:

views:

3173

answers:

6

OK, this is minefield, but trying to understand why one would pick .NET (or equivalently Mono) for cross-platform development over the other toolkit is difficult without experience in the both.

For programmers who may have used both, what features would be missed or desired? Conversely, what would a user of one find missing from the other in terms of paradigm or some other aspect? There is a lot to be said of either toolkit, but comments from someone who has used both would be valuable.

Here are some related questions on the topic:

Edit: Would using Mono only be a viable option if Windows was one of the targetted platforms?

A: 

Have you considered wxWidgets. Its also cross platform, C++ like QT and uses native controls unlike QT, and don't require any framework to run like .NET.

.NET and mono are almost the same thing, If you are writing simple user based application with not much system or network programming, .NET should be the best.

If performance is critical aspect of the application lot of people uses C++ libraries like QT, wxWidgets.

Priyank Bolia
Does this answer do anything for you: http://stackoverflow.com/questions/464463/qt-being-now-released-under-lgpl-would-you-recommend-it-over-wxwidgets/464689#464689
how can I use an LGPL QT in my commercial application??? I go with wxWidgets only which I selected after a long research. Its fast, native controls, C++, multi platform. http://stackoverflow.com/questions/464463/qt-being-now-released-under-lgpl-would-you-recommend-it-over-wxwidgets/465803#465803
Priyank Bolia
Link the LGPL Qt libraries dynamically. This meets the requirements of the LGPL. Of course, rewriting an existing corpus of code simply to use another library might not be worth it. Sometimes it is.
A: 

.NET is not for cross platform. It is very painful to code and make it work effectively for MONO and .NET. The reason why individuals go with .NET more than TCL/Tk or Qt or Java Swing is because of Rapid Application Development.

RAD is virtually impossible with any of the other frameworks that exist. RAD is possible on simple cases, but when was the last time you wrote a business based application that had simple use cases.

GUI toolkits in general are difficult to work with because you need to understand the basics. The basics being data binding, clipping, refreshing, layout managers and event handling. All of these concepts are difficult for average developers. The reason being is that most of it is being abstracted away with more of the modern toolkits out there. For instance, with Java Swing I do not need to know anything about clipping or refreshing since they do it "magically" for me. What happens in the case of when something does not refresh magically, that situation then presents a virtually impossible solution. The code then becomes exponentially more complex.

.NET is typically used by many UI developers because extending it is very simple. Creating an extension method to extend a control is very easy. Creating a method to bind data is even becomming more simple with .NET entity framework. There is a cost to use this RAD tool though, and that is that it is not platform independent.

jwendl
Could please elaborate on "painful"?
EricSchaefer
@EricSchaefer: I suspect that the differences between .NET and Mono make it so.
I dunno, this is debatable. Qt is pretty damn RAD.
Max Howell
@EricSchaefer I should have emphasized the word 'and' between .NET and MONO. You wouldn't want to redistribute mono libraries on a windows machine, that does not make sense.
jwendl
Agree, QT IMO is near close to RAD as .NET, actually truly cross platform, and is native, and has no dependencies outside its self, which can be statically linked if need be.
ApplePieIsGood
-1: Why is it "virtually impossible" to do RAD with Qt? It has a designer, and using PyQt you can prototype things very quickly.
Nick
+1  A: 

For cross-platform (and unique platform) I would go to Qt because it's more clean than Mono and Windows.Forms and with the MVC pattern all the application is more easy to expand and modify

xgoan
How is Qt "more clean"?
EricSchaefer
Seconded! Any details or expansion on the differences welcome.
++more clean .
Here Be Wolves
A: 

Perhaps you can write most of the application in a portable language/framework, and write a separate "graphical interface skin" for each operating system you plan to support? That strategy of course may work well in some cases, but may fail horribly in many others.

Justice
in case of Qt, even the "skin" can be written along with the application. The framework ensures that the "skin" has native look and feel.
Here Be Wolves
+1  A: 

I'm using Qt4 for cross platform development and are quite happy with it. Deployment works fine (at least if you link Qt statically, which isn't hard at all), the API is really nice and consistent and Qt Designer allows fast development of the GUI parts so one can concentrate on the real logic. The signal and slot concept is also something I really like after getting used to it.

From my experience deployment with wxWidgets deployment is harder (in my case it was specifically Linux due to the dependency on GTK, no idea about Mac).

bluebrother
A: 

You would pick Mono (and perhaps C#) for cross platform development for the same reason that someone would pick Java or Python. These languages run on a virtual machine and if you are careful choosing libraries and designing code it will work cross platform (without recompilation). Native languages (like C, C++) do have standards so the language is the same on multiple platforms, but the compiler settings and libraries you use may not be cross platform (e.g. processes, networking, etc).

Besides the technical issues, the familiarity of a cross platform framework saves time. E.g. learning a GUI library can take weeks/months. You're obviously going to save time if the API is the same on all targets.

Qt4 is well designed, well documented and comes with some useful, solid tools. wxWidgets is becoming massive with dozens of widgets, some of which you'll never use. Qt has fewer widgets that are more flexible. I used to use wx quite a lot but I'm a Qt convert now because of LGPL license, good docs, the designer, PyQt, the new IDE and growing user base.

Both Qt and wxWidgets have Python bindings (i.e. PyQt and wxPython) so you could write cross platform GUI code using these libraries. For Mono it is more tricky but there is GTK# and Qyoto. I haven't tried either of these but they seem to be getting to a point where they are mature enough to used (e.g. see MonoDevelop).

Nick
Qt has bindings in more languages than I care to enumerate
Here Be Wolves