I was wondering how multi-platform applications are developed. Applications like Microsoft Office for MAC/Windows, FireFox for MAC/Windows/Linux etc.
If they have to code for different platforms then it’s hard to manage and there are lots of other complexities involved.
Q: How do development teams manage the complexity of developing for multiple platforms?
Microsoft office is not a multi-platform application. If you’ve ever used the Mac version you’d know. The last multi-platform version of Office was the infamous Office 6.0 way back in 1998. What happened was users moaned about the look-and-feel and decried the ‘porting’ mentality.
The Mac version of Office is not only written by a different team, it is written by a completely different department: The Mac Business Unit, also known as the MacBU. Different head of department, different managers and I believe different sales and marketing people as well.
That is one way of doing it. Also known as “the proper way” among Mac users.
Of course, not everyone is Microsoft’s size and can afford to create a completely different subsidiary just to support Mac users (much less Linux users). The slightly more sane way of doing it is to use a cross platform library for the GUI stuff like wxWidgets or QT or GTK. After all, most of your core C code isn’t going to change much accross platforms, just the proprietary stuff like GUI and file management. Heck, you can even stick to POSIX function call for file management and networking for cross-platforminess. But be warned, there is a high chance of Mac users hating the end result (like what happened to MS Office 6.0).
The third way is the middle way. Keep the common, core application code separate from the proprietary GUI stuff (which is a good idea anyway in terms of maintainability). The MVC design pattern is a good way of doing this. Have a way (using #define or diferent build script/makefiles) to switch the View and Controller components of your MVC framework. This is what Google does with Chrome. The Mac version uses native Mac graphics and the Windows/Linux version uses a graphics engine called Skia. The core of Chrome is WebKit and V8 both of which are cross platform.