A variety of apps out there, like Firefox, Fring, Skype run on a variety of platforms. How do they manage their code? Do they have different UI for different platforms? As in, Firefox have to use Cocoa on Mac, WinForms or equivalent on Windows, QT equivalent on Linux. How is it possible for the same source code to show diff UI just by compiling for a diff target?
They ensure that a bug fix in one version (like a security issue) is fixed in all releases, this means that code is not duplicated anywhere. So How is the underlying architecture designed?