Search code examples
cordovahybrid-mobile-appmulti-device-hybrid-apps

Phonegap/Cordova cross platform architecture and single code base


I am building a product using Web Api for the backend and AngularJS on the client side, expecting to launch in a couple of months. All logic is fairly well separated from the client.

Being the sole developer (and marketing, sales, etc) I am very keen on maximizing efficiency and therefore looking at Cordova to handle the mobile app side of things. I have never done any iOs/Android development, but am very quick at picking up new languages and environments so I do not consider that my primary barrier to entry, but I am more concerned with duplication of work effort.

My question is thus; would approaching a small-ish application with the intent of having a single code base by way of Cordova be the right method? I am concerned about having to deal with 3 types of styling to handle iOS/Android menus and slight UI differences between web and mobile applications. Do I just litter with my code with a whole bunch of if(iOS) menu=a, elseif(Android) menu=b, else menu=c ?

Or, would trying to keep the clients as thin as possible and writing native Android/iOS apps be a smarter approach? Here my only real issue is extra effort of maintaining three code bases for the clients.

I've done a lot of reading around and while the opinions seem to be pretty split, no one focuses on the complexity of maintaining multiple code bases with thin clients versus the coding overhead of handling styling with one code base across multiple platforms.

Thanks for your input,


Solution

  • Months later... I am deep into development of the app and it's going swimmingly. I ended up using Cordova with Ionic-Framework and it does exactly what I want. Ionic handles the native look & feel cleanly without a ton of extra work, and everything seems to going well with Cordova. Even better... with 5 minutes of extra work I can easily re-use all of my code for a mobile web app accessible from any browser. Highly recommend

    Ionic Framework