Comparing Qt4 with Cocoa

139 Views Asked by At

I'm on the beginning slope of learning Mac programming and in particular Cocoa. It seems to be a comprehensive framework providing all kinds of things every app programmer needs. Qt4 is the same sort of thing at a general level, except it runs on other platforms and uses C++ instead of Obj-C. More importantly for me, I've used Qt4 and so am familiar with it, though hardly expert. I am new to Obj-C and app programming in general, but know C++.

I'd be interested in comparisons of Qt4 and Cocoa, tips for those starting one coming from the other (either way), and discussions on their internals, API design, intended uses, how the designers of each made decisions about how things should work, etc.

What are some recommended readings?

(Of course, I want serious writings by professional developers with real experience with both, not flame wars or fanboy gush or marketing pablum.)

1

There are 1 best solutions below

0
On BEST ANSWER

So far I have used Qt4 to implement some cross-platform applications (Windows & Mac) and I used XCode (Objective-C) only for iPhone Applications development - therefore I don't have first-hand experience in using Objective-C for native Mac applications.

I think the best advantage of Qt4 is portability, and I love it for it. Not only you may port the entire Qt Application to different environments, but with a small effort you can create standard C++ libraries (libraries that not use Qt4 Classes) which are far more useful and portable.

On the other hand, I think the XCode/Objective-C environment is more mature regarding project management and UI Design and off-course you can use the full set of Mac-OS native calls in your application. As you may know Objective-C is fully compatible with C++ and you can use any third party C++ libraries, but if your main environment is XCode/Cocoa you will finally find yourself writing mainly Objective-C code which cannot be ported to any other environment but Mac-OS/iOS.

Therefore to cut a long story short, I think your decision must be based more on your long-term needs than to any environment/design/language/API details:

=> If you know that you will build Apps for Mac-OSX (or iOS) for the next 1-2 years and there is no portability requirements, go with the XCode/Objective-C approach to create a more solid base for Mac Application development.

=> If this is a "Just One Mac/OSX Application" thing and then you will return to Qt4 or another environment, maybe it's better to stick with Qt4, enjoy the advantages of portability and use the experience you already have to reduce the developing time.