Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Say I've to develop an app that runs on iOS, Android and Windows 8 Mobile. Now all three platforms are technically in different program languages. The only 'reuse' that I can see is that of the boxes-and-lines drawings (UML :) charts and nothing else.

So how do companies/programmers manage the variation of the same product across different platforms especially since the implementation languages differ? It's 'easier' in the desktop world IMO given the plethora of languages and cross-platform libraries to make your life easier. Not so in the mobile world.

More so, product line management principles don't seem to be all that applicable - what is same and variant doesn't really matter - the application is the same (conceptually) and the implementation is variant.

Some difficulties that come to mind:

  • Bug Fixing: Applications maybe designed in a similar manner but the bug identification and fixing would be radically different. A bug on iOS may/may-not be existent for that on Android. Or a bug fix approach on one platform may not be the same on another (unless it's a semantic bug like a!=b instead of a==b which would require the same 'approach' to fixing in essence
  • Enhancements: Making a change on one platform would be radically different than on another
  • Code-Design Divergence: They way the code is written/organized, the class structures etc., could be very different given the different implementation environments - leading to further reuse of the (above) UML models.

There are of course many others - just keeping the development in sync and making sure all applications are up to the same version with the same set of features etc. Seems the effort is 3x that of a single application. So how exactly does one manage this nightmarish situation?

Some thoughts:

  • Split application to client/server to minimize the effect to client side only (not always doable)
  • Use frameworks like Unity-3D that could take care of the cross-platform problem (mostly applicable to games and probably not to other applications etc.)

Any other ways of managing a platform line? What are some proven approaches to managing/taming the effects?

share|improve this question

1 Answer 1

For starters, there are a couple more ways to run the same code on all 3 platforms:

  • All 3 of the platforms you mention will run C++ code. This makes it possible to have common core code. Depending on the type of app you're developing, you may only need platform-specific adapters for interfacing with things like UI, location services, etc.
  • Phonegap allows you to deploy the same HTML/CSS/Javascript code on many mobile platforms. You could even look into using something like GWT to generate the HTML/CSS/Javascript from Java code. (I haven't tried this, but would love to know if anyone has done so!)

For some apps though, you want to preserve the feel of the native OS and so you necessarily end up with a lot of divergent code. If this is the case, you really can't escape the fact that you are writing 3 apps, not 1.

There are a few things you can do though, to help keep things on track:

  • Design for all platforms: When you're looking at a new feature, you always need to keep in mind a general idea of how it's going to work on each of the platforms. This is one area where it's crucial to involve people with experience of the different platforms.
  • Lead development on one platform: Get each new feature implemented on one platform first, before porting it across to the others. You will get most of the kinks worked out of your design when you do the first implementation, then (providing you document the changes!) the implementation on the other platforms should be much more straightforward.
  • Don't force uniformity: Sometimes, things just need to work differently on different platforms. If something feels like forcing a square peg into a round hole, it's almost certainly a bad idea. If it doesn't bite you now, it likely will later.
  • Testing: Whenever a bug gets discovered, check for it on the other platforms.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.