tags:

views:

271

answers:

8

Hi!

I'd like develop an application with a complex GUI (combobox with animation, charts with spline, transparent layers, ...). I've good experience with C# 2.0 and I'm studying WPF, but unfortunately I read that there is no plan to port WPF on Mono.

I was thinking about creating my custom GUI control using OpenGL (with OpenTK)... But I feel it will be a hard work (integration with GTK#, debugging, hard to use to design form).

Another possibility is to use Java (with JOGL), but I'm not very skilled with it, and I don't know about performance issues.

Last option is C++, but I've to do a big revision (years since last time I used it), and I find it hard to develop GUI and portable application (Maybe I'm wrong!).

What is your opinion/advice? I'd better choose Java + JOGL, C# + OpenTK or return to C++ (I'm quite afraid to develop such complex application with this language)?

Thank you.

P.S.: Sorry for my English.

+1  A: 

I would not suggest using wpf for it is a platform dependant platform. Silverlight might be a better option.

But if you are developing a web application, jquery would be a nice option you also might consider adobe flex and adobe air; http://www.adobe.com/products/air/

Kadir Sümerkent
No, I'm not developing a Web application, but thank you for your advice. I'll take a look to Air (its name sounds good ;-))
Kill KRT
+7  A: 

I would go with Qt. Take a look at http://qt.nokia.com/products/ . If you are afraid of C++ (but there is no reason to be afraid of it), you can try with Java Swing. I think that those are the best options to go with multi platform desktop GUI development.

vucetica
I'd like to develop new custom controls like this: http://dev.blender.ir/images/first-attempt-to-import-all-sensors-to-nodal-logic.png and I need of a complex timeline/track control, like this: http://www.synthtopia.com/content/wp-content/uploads/2007/06/reason-sequencer.jpgSwing or Qt could help me?
Kill KRT
Qt allows - encourages - developers to subclass their framework for custom controls ("widgets"), and has a powerful graphics manipulation library you can easily tie into your controls.
Austin Hyde
Qt also takes advantage of a platform's advantages, like drawers, sheets, and associating a file with a window in Mac OS X.
Austin Hyde
@Kill KRT. Those controls look quite complex, and developing them in any framework will not be an easy task. But the best way to have them multi-platform is to go with Qt.
vucetica
Actually controls like Kill KRT linked to are quite easy to develop in WPF/Silverlight. They are only hard to develop in Qt because Qt itself is so primitive (no DataTemplates, limited rendering model, etc). And Silverlight is an excellent choice for cross-platform desktop GUI development. So for Kill KRT's purposes I think Silverlight is obviously a much better choice than Qt.
Ray Burns
A: 

Does multi-platform have to include iDevices? Can it be on the web? Those are 2 questions you have to answer first.

If you can live without iPad/iPhone suppport, then Flex/Flash/Air is good option for highly graphical things. It is multi-platform for sure and easily integrates to the web. Probably your best option for this case with the limited details given.

Qt could work for you as well, although I can't say for sure if it's graphic library will make it easy. I've personally never worked with it, so other would have to answer that. But since it is in C++, you could use other libraries as well.

Java Swing sounds rough to me for this complex of a GUI. Making some basic stuff isn't too bad, but if you are expecting an experience like with C# I think you will be frustrated. Just a personal opinion of course.

Lastly, if it can be a web app, why not stick with C# and Silverlight? A .NET solution may work well for you since you are already learning it.

Awaken
It is not a Web application, and I'm not thinking to be compatible with any iDevices... I think I'm going to return on my Stephen Prata's book and give a try to Qt! ;-)
Kill KRT
What? Silverlight is not only for web applications. **Silverlight is an excellent platform for desktop applications as well.** Silverlight applications can run in **or** out of the browser on all major OSes. Your answer seems to imply that Silverlight is restricted to web applications. Perhaps you should edit it to make it clear that Silverlight is a good choice for desktop applications as well.
Ray Burns
My only problem even in my own recommendation against Silverlight is penetration. If he truly wants cross-platform, he will be missing out if he is looking to appeal to a "general" audience. According to riastats, only about half of OSX users have it installed. And I asked 5 Mac friends yesterday and 0 of them had it installed or even knew what it was. The same thing applies even to Windows 7 or Windows XP. I guess it depends on the target audience as well. As always, we probably need more information. And I didn't mean to place doubt on Silverlight's capabilities.
Awaken
Maybe I'm wrong, but as I know Silverlight is natively available only on Windows and Mac, on Linux there is a "porting" (Moonlight). Could I develop an app in Silverlight and easily port to Moonlight?I also know that Moonlinght doesn't completely cover all Silverlight features. The great thing would be have the WPF framework available on Mac and Linux!
Kill KRT
@Awaken: Yes, Silverlight penetration is only 62% today, but do you realize that a year ago it was around 30%? At the rate Silverlight is going, it will easily catch up with Flash by the end of 2011. Also note that the Silverlight installation is so much quicker and cleaner than Flash (no annoying extra steps) that it is conceivable that some of your OSX friends have it installed and don't realize it. But none of this really matters since Kill KRT is developing a *desktop* application - he can simply include Silverlight as part of the install package and be done with it.
Ray Burns
@Ray Burns - No argument from me.
Awaken
A: 

1st. Don't use C# for anything that should be portable (and not, mono is bad option)

My personal opinion - use C++. It would give you very good portability and independence.

You have two options:

  • Qt4 - very good GUI toolkit, makes GUI development very easy, and highly portable.
  • GTKmm - also very good toolkit, but if feels less natural on Windows.

Also, Java has Swing toolkit that comes with JDK and available on all Java platforms even very strange like OpenVMS.

Artyom
Why are you saying that Mono is a bad option?
jgauffin
Has Java Swing performance issues? Should I use Java+OpenGL (JOGL) to render faster my complex controls? I wonder how complex GUI (such Maya, Cubase, Adobe Premiere) are realized!
Kill KRT
@jgauffin, Mono is not an option for two reasons: (a) mono goes always several steps behind .Net, (b) Mono does not support WPF, so only way to develop gui is using something like Gtk#.
Artyom
@Kill KRT - if the performance is critical for you, use C++ with Qt or GTK, don't work with languages like Java or C# as they have quite poor performance.
Artyom
Why down-votes?
Artyom
Upvoted. Seems that many Java and C# fans don't like to hear that they are not cross platfrom (Java is only targeting the Java Platform - even with SWT) and Mono for GUI's i agree it's a joke. Myself i'm going the hard way and code all my stuff in the native platform toolkit Cocoa/MFC/GTK with my own abstraction layer.
Lothar
+3  A: 

I would suggest Mono and GTK#. Developing apps with .Net is far more effective than doing it in C++ vanilla. Sure, you have to stick with C# 3.0 and .Net 2.0 (some features from 3.5 is implemented, like LINQ). But it still gives you a lot more than C++ with, for instance QT, would give you.

jgauffin
I know... I also find C# dramatically more productive than C++, but when I did try to create an *exotic* custom control (like a treeview with animated icon) I found many performance problem, GDI+ are limited. So I'm looking for a library/framework that makes thing simpler and faster. Does GTK# that? Or maybe I'd better choose C++ and QT?
Kill KRT
@Kill KRT: GTK has a lot of flexibility that Qt shares, since both toolkits come from an environment where there is really *no* native widget library. Qt is, however, much easier to extend than GTK in a lot of areas.
greyfade
I have not had any performance problems with GDI+. Double buffering is something that is required if you are going to use a animated icon or something like that. Then it'll be smooth as a babies ass ;)
jgauffin
+1  A: 

Go C# for productivity. Nothing against C++ but it's a bit verbose. As for the GUI library, I think WinForms used to work on Mono. Alternatively, GTK#.

Mau
A: 

Silverlight runs on Windows/Mac/Linux and some handhelds, and is being ported to more handhelds. I believe Silverlight will ultimately be ported to every popular device.

Silverlight is:

  1. Much, much more powerful than Flex/Flash/Air.
  2. Much, much more powerful than Qt.
  3. Ridiculously more powerful than GTK+ or GTK#.
  4. Ridiculously more powerful than JOGL.

Silverlight has all of the features you have requested.

Silverlight works very well with C#, which is a much more productive language to work in than C++.

Silverlight is basically a very large subset of WPF, so if you already know WPF, you already know Silverlight.

Unless you absolutely require iPhone/iPad support I think the decision is perfectly obvious.

See this comparison of WPF and Cocoa to get some feeling of how WPF/Silverlight compares with the likes of Qt, Flash/Flex/Air, and GTK#, all of which use a primitive WinForms-like object model similar to the one used by Cocoa.

Ray Burns
I didn't know Silverlight could be used to develop also "desktop" application. My doubts are:- Performance (QT vs Siverlight)- Portability (Moonlight doesn't completely implement all Siverlight features)- How Silverlight is related to WPF? Can I study WPF and then easily "switch" to Silverlight?
Kill KRT
Silverlight was originally called "WPF/e" for "WPF Embedded", and is a simplified version of WPF. Originally it was *much* simpler than WPF but now the gap has narrowed substantially. The first versions were web-only but later versions allowed Silverlight to run as a desktop application.
Ray Burns
Moonlight actually implements 100% of each Silverlight version and passes the Silverlight test suite supplied by Microsoft. Moonlight is about 1 year behind, so for Linux portability, generally just stay one version back.
Ray Burns
Studying WPF and then switching to Silverlight is an excellent approach: Many have done so quite successfully. Here and there you will find things missing, but all the fundamentals are the same. In fact, if you don't use any WPF-only features your WPF application will actually compile and run in Silverlight with no changes. Don't spend much time learning FlowDocument or 3D because they aren't yet included in Silverlight, but almost everything else is.
Ray Burns
Performance between Qt and Silverlight will be comparable in most cases. For complex graphics and animations Silverlight's display will be noticeably faster and smoother. For windows with ten thousand widgets visible at once Qt will initialize faster. Other than that you won't see much difference between the two.
Ray Burns
I don't know if it is a my problem due to my soft/hardware configuration, but this Silverlight demo runs very slow to be a basic particles engine: - http://labs.nerdplusart.com/particles/fullscreen.php -I'm running on Ubuntu 10.04 64bit with Core 2 Duo Q6600 (quad core @ 2.66GHz), 4GByte of RAM and a GeForce 8800 GTS (with last official nVidia driver installed)! Could you confirm it is quite slow with Moonlight?
Kill KRT
The demo you linked to runs very well (and smoothly) on Silverlight. I don't remember Moonlight being noticeably slower than Silverlight but can't check this partcular link right now. (My Linux installations are all virtual machines, so it would have been using software rendering.)
Ray Burns
A: 

At my day job (a well-known microprocessor company) we develop complex engineering apps with Java, Eclipse RCP, and Java OpenGL. Performance is good -- we can easily get many millions of polygons/second and up to 100 frames/second. The SWT widgets in Eclipse are fast enough where we haven't had to render any custom controls with JOGL.

I've got a set of tutorials that shows how to get started with this kind of programming. The series starts with http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/.

Wade Walker