April 18, 2016

533 Views

Hybrid Mobile App Development Using Cordova Framework

Introduction

Cordova framework is a free and open source that allows one to create mobile apps using standardized web APIs for mobile platforms. It enables developers to build applications for mobile devices using JavaScript, HTML5, and CSS, instead of device-specific languages. The applications developed are neither native (because all layout rendering is done via web views instead of the platform's native UI framework), nor purely web-based (because they are not just web apps, but are packaged as apps for distribution and have access to native device APIs).

There are also several third-party, open source, readymade Cordova plugins available, which can be used to implement some native functionality in apps. These functionalities or features are neither available in JavaScript yet nor does it come with the latest Cordova build. A developer can use some existing plugin, or write his own, to extend the app functionality for a mobile platform.

Cordova CLI installation on Windows machine

  1. Install Node.Js and Git Client.
  2. Install Cordova Plugins- C:\>npm install -g cordova
  3. Create First App - cordova create myapp com.example.myapp FirstApp
  4. Add platform - cordova platform add android
  5. Build App- cordova build android
  6. Test App- cordova emulate android(for emulator) or cordova run android (for device)

Advantage

  1. Save Maintenance and Support Efforts for entire App Lifecycle

    For bug fixing, adding/removing features, and updating/changing the UI, one has to make changes in only one piece of code, instead of three separate native apps. This is especially true if we want to update the UI of the app.

  2. Does not require diversified skillset engineers

    Cordova App development requires engineers with skillset in HTML5, CSS, and JavaScript, and very minimal and basic underlying platform knowledge. If we develop native apps, then we need engineers who have expertise on iOS development on Mac, XCode, Objective-C, Java, Eclipse IDE etc.

  3. Development requires minimum hardware

    Using Cordova App development does not require one to purchase Mac machine to develop Apps for iPhone devices.

Limitations and Drawbacks of Using Cordova

  1. Cordova framework has its own JavaScript library which is shipped as a part of App Deployment packages and eventually gets installed on the device. This entire library has to be scanned and approved by some approval authority before it can be used. This scanning and approval is tedious and very time consuming operation.
  2. Cordova Apps does not provide some specific platform functionality. For example, Background Tasks for Notifications. Furthermore, it supports some features only to some specific platform versions. Though one can extend the functionality by writing custom plugins, but these plugins are platform-specific, and one has to write separate plugins for every platform to support in its native language.

Required Development Efforts (No. of Months) Vs. App Development Model

References