Call us : 020 3500 1520

Tech Blog: Delivering one application across multiple platforms

This deep-dive technical post has been written by our CTO Dominic. It’s pretty technical and unashamedly uses acronyms and jargon.

We’ve had two recent projects that required delivery on iOS, Android and Web. Each of these have their own, totally separate, development languages; Objective C, Java and HTML.

Challenge: How could we deliver without developing the code 3 times over, an expensive route for most.
Solution: Develop it once in HTML and wrap the resulting code in the native environments for iOS and Android using PhoneGap.

Easier said than done, actually.

First, whatever Integrated Development Environment you use (Eclipse in our case), you’ll need to create a setup that allows you to have all the code (HTML,CSS and JS) in one place whilst being able to build and test in the 3 environments without too much shuffling around. This is largely a configuration exercise.

Second, you need to pay close attention to the user interface to ensure it looks and feels native in iOS and Android. This requires making adjustments in the JS and CSS to check each platform works correctly.

Third, the web site is bound to be a different beast to the apps, typically having additional functionality as well as presenting a slightly different user experience.

We solved the last challenge by encapsulating all non-user interface functionality within their own JavaScript files and then breaking down the user interface into reusable components that could be included in different configurations depending on whether it’s the web site or the app. A small PHP pre-processing script did the combining which allowed for near instant agile development and testing. These processed files were then used in the PhoneGap publishing process or deployed to the web.

So in summary, delivering multi platform with the same code base is possible, but only with careful planning and design.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Last updated by at .