Design Element
Comment on "Simple Truths About Cross-Platform Apps"
by Adrian — Mar 21
Well sometimes your clients want to have portable desktop applications, so I think that maybe not *everyone* want cross-platform apps, but *some* do. Then you must find a compromise, and make things as simple as possible, both for you and for your client.

An approach that I found useful for creating cross-platform applications with native UIs, is to create the backend in C++ (that is, the core of your application), use Interface Builder & Cocoa for the UI, and then use Objective-C++ for binding both. Typically the only objc class will be the controller, and the rest is your C++ code. Of course you lose several features built in Cocoa... but you get portability. It's a tradeoff.

This way you have a portable application core, that you can compile in different platforms, and you provide a Mac app with a pure, native look & feel. For the Windows XP and Linux ports, I found that wxWidgets is a fine choice, since it provides a decent UI in both environments. But not for Mac, since you cannot achieve the same degree of design and style; Cocoa is ahead of everything.

For the C++ part, a nice portable library that provides lots of functionality with a portable code base is POCO ( This helps keeping the core of the application portable, and with CppUnit you can unit test it extensively without much effort, in several platforms at once.

This approach, of course, might not be always possible, but in some small projects of mine it gave me great results.

Just my 2 cents! :)

Back to "Simple Truths About Cross-Platform Apps"
Design Element

Copyright © Scott Stevenson 2004-2015