Choosing between Cordova and PhoneGap
Making a choice between Cordova and PhoneGap may seem to be difficult, but it is indeed very simple. Adobe owns PhoneGap which is accompanied with additional built-up service. One more element associated with PhoneGap is the fact that eventually additional service may or may not be offered and there may be charges associated for future use.
Apache is the owner of Cordova and it will always be maintained as the open source project. Both PhoneGap and Cordova have similar API and it is better to choose Cordova, until you want to utilize the additional features of PhoneGap.
There is certain third-party plug-ins which makes extra functionality like native sharing, analytics and many platform specific and device specific functionalities available for use. Cross-platform support is limited to the third-party plug-ins. What you need to confirm is the plug-ins and the version available in each platform, before deciding on the platform to use.
Deciding the Platform and version
Supporting iOS6, iOS7 and iOS8 and Android 4.4 (Kitkat, version 19) would mean that it is blessed with third-party plug-ins along with HTML and CSS3, which are modern browser friendly. The best example is the iOS apps for Face book and Twitter which only supports iOS6 and later. Supporting versions earlier to iOS5 is not easy and Cordova has assigned these versions as 3.5.
Version 5.1.1 is implemented in the first generation iPad and this makes these iPad users not able to download your apps unless you customize the application in XCode. The nest is support for 64-bits iOS device like the iPhone 5S for which you will have to use the current version of Cordova (3.5 and greater) or the other option is conducting customization with XCode.
The level of complication is more when you want to choose the legacy version for Android, which would depend on your needs. It is advisable to keep a track of the Android developer dashboard for the weekly update and statistics of the Android platform version. Play market don’t form a part of the Android version 2.0 and before that, this makes the downloading of the apps difficult for these users. For Android version 2.3 which is the Gingerbread version 10, is not recommended to be used for the Cordova security guide. Many of the third party plug-ins is also not compatible with the Gingerbread version and it is prohibited from use. The number of users for the Android 3.x which is the Honeycomb version 11-14 has zero number of users, which means that it is not worthy to put in time and effort for testing this version.
When we speak about the Android version that is worth using, we can take into consideration version 4.4 which is the kitKat version 19. It renders excellent CSS3 and HTML support. This makes it possible for the mobile App developers to build their own iOS Cordova app for Android and view the same in the 4.4.x version of the Android device. For version 4.0- 4.3, which is the ice-cream sandwich and the Jelly bean version and version 14-18 would require the app developers to put in little more effort, specifically for the implementation of hardware accelerated CSS 3D transforms and scrollable divs. This would land in you spending majority of the UI bug-fixing time working on these versions.
Modernizr would be the approach that I would recommend for CSS and platform support as well as version fragmentation. Cordova device plug-in could be used for the detecting the OS and version along with rendering special class to the HTML or the body elements like iOS, Android and Jelly-bean. You can bring in a little variation to this concept by adding a class like “legacy” for some of the platform versions. This helps in simplifying the CSS selectors and allowing similar kind of platform and version differentiation.
Considering the Form factor
This is the question that is raised in relation to the device that you would support. Would it be a mobile phone or tablet from-factors or are you interested in providing a responsive and universal experience. These are the factors that would have an effect on the requirement for designer, developer and tester for your project. This is similar to the extra effort required for each platform and platform version or a new level of effort for the designers and developers required for each form-factor and break-point setting.
This could be anticipated with the extra level of effort associated with the testing requirement for each platform version with the extra level of effort put in by the designer or the developer.
Considering the offline support
By offline support we mean the function of the app when there is no availability of internet connection. Certain apps like the calculator don’t require any internet connection, while there are other apps which don’t function in the absence of internet connection. Cordova network or Cordova connection plug-in could be used for detecting the connection type along with handling online and offline detection.
Coping-up with XCode and Eclipse
There are certain elements associated with Cordova XCode implementation, which may not be liked by most of the app developers. Some examples would be hiding the status bar while launching the application, disabling of the universal application status and customization of some of the Cordova application setting sand plug-ins. When you have the intending of launching the developed app in the app store, it is essential to learn certain basic XCode development. Knowledge regarding Eclipse IDE is essential as it would enable direct change to the AndroidManifest.XML file.
Testing of the App
It is advisable to have more than one physical device associated with each version or platform. Identification of some of the major devices could be accomplished with the help of simulators and emulators, but having a real device for testing would be an excellent idea. In certain cases emulators give false positive or negative for the bugs. It also helps to get aware of certain specific bugs and issues with the platform, version and device.
Debugging of the Cordova application could turn out to be challenging in certain cases. But this challenge could be eased out with the help of chrome and safari dev tools. In case of the Android devices, you must be capable of choosing the tool, inspect the devices along with having full access to the application’s HTML, CSS and JS. You will have access to the developer’s panel with the enabling of debugging of iOS safari and Mac safari. You can reload the app with the help of Command + R instead of opening of safari developer panel, which could be painful.
All the important points mentioned for developing iOS and Android app with Cordova and Phone Gap would be helpful for the readers in taking decision.