I've been reading up on GUI frameworks including WPF, GTK and Cocoa (UIKit). I don't really do anything related to Windows (I'm a Mac and Linux guy) or .NET, but I'd like to be able to throw together GUIs for various operating systems.

We are in the enviable position now of having high level scripting languages that work with all of the major GUI toolkits. If you are doing Linux GUI programming, you could use GTK in C, but why not just use PyGTK (or PyQt). Similarly, for Java, one can use JRuby. For Mac, there's MacRuby. And on .NET, there's IronRuby. This is all fine and good, and if you are building a serious project, there are tradeoffs that you might encounter when deciding whether to, say, build a WPF app in C# or in IronRuby, or whether you are going to use PyGTK or not.

The subjective question I have is: what about learning those frameworks? Are there strong reasons why one should or should not learn something like WPF or Cocoa in a language one is familiar with rather than having to learn a new language as well?

I'm not saying you should never learn the language. If you are building Windows applications and you don't know C#, that might be a bit of a problem. But do you think it is okay to learn the framework first? This is both a general question and a specific question. I've used some Cocoa classes from Ruby and Python using things like PyObjC and there always seems to be an impedance mismatch because of the way Objective C libraries get built.

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
If this question can be reworded to fit the rules in the help center, please edit the question.

6 Answers
6

Yes, there is nothing wrong with it as such. The only problem I can see is that all of the sample code, tutorials and documentation, etc will likely be in the frameworks "native" language.

For example, you can use PyGTK, but the main GTK documentation is tailored to the C API. So you should be able to learn the basics of it using the Python samples, but anything more complicated and you're likely going to need at least a passing knowledge of C in order to be able to read the documentation, etc.

But you don't need to be a C guru just to be able to read the documentation...

Matches my experience with Qt's Python bindings. Much example code is C++, so being able to read C++ is vital.
–
delnanDec 26 '10 at 12:32

For looking at the functions and the parameters required, one doesn't have to be a C++ master. It will do fine. Go with Python, know a little bit of 'how to read C++', and you are done in case of PyQt. imho PyQt is better than using C++ and Qt framework.
–
kadajDec 28 '10 at 12:24

If you are productive in a certain language and that language offers bindings to some library written in another language I don't see what the point is of learning an entirely new language just so you can use the library. What matters about the library is the interface and that's not going to change no matter what language you are using.

The reason that you should learn the new language is that apps written in those "high level scripting ... SOMETHING"... are slow, buggy, basically sucks. If you want to do real client app developement - bad idea. For experimenting - great, you won't waste too much time if you want just to test/play.

We are in the enviable position now of having high level scripting languages that work with all of the major GUI toolkits.
Yes we are and they all suck. Have you seen ANY good application using those? Neither have i. Any good windows GUI app in PHP or Python? None.

This is all fine and good, and if you are building a serious project..
Then you'll fail and the result will be DECADES behind of what could be done using c# that's not too hard to learn. That's simple, c# is designed specifically to do windows desktop apps. Everything is integrated (IDE, language, form designer, code), you will get nowhere near level of "high level, single purpose programming language" using some "general purpose (read no-purpose) high level scripting language".

On the other hand you can have multi-platform UIs using HTML and it works well :) That's because it's not "general purpose" :)
If you want real cross-platform native apps, then why not java?

I am a .NET developer with an understanding of C# and WPF. I think you could certainly code WPF using a different language such as IronRuby, but it would be more difficult to learn since all of the documentation, examples, videos, etc. use C# as example code. Also, some of the APIs probably lend themselves to usage from a C# perspective, and might not "blend" as well with Ruby (this is just a guess - I'm only superficially familiar with Ruby).

Also, your skill will be less marketable, assuming you want to be gainfully employed using this technology (if this is for a hobby it doesn't matter as much). Employers looking to hire WPF developers are almost certainly looking for C# skills at the same time.

I'm guessing these points apply equally well to other frameworks / languages.