Home » Apache Cordova Tutorial

Apache Cordova Tutorial

by Online Tutorials Library

Apache Cordova Tutorial

Apache Cordova Tutorial

Apache Cordova is defined as an open source platform which is used for building mobile applications using HTML, CSS and JavaScript. It consists the set of pre-developed plugins that provide access to the device’s camera, GPS, file system, etc. We can consider Cordova as an application container with the presence of web view that covers the entire screen of the device.

In 2011, Adobe acquired Nitobi and donated open-source core to Apache Software Foundation and it was rebranded as Apache Cordova.

The users of the Apache Cordova are as follows:

  • If you are a mobile developer and want to make your application compatible on more than one platform without the need to re-implement it with the language of each platform.
  • If you are a web developer and want to deploy your web application on different store portals.
  • If you are a mobile developer and want to mix native application components with a WebView for accessing the device-level APIs. You can also use it to develop plugin interface between native and WebView components.

Our Apache Cordova tutorial is designed for students and working professionals. It covers all the basic and advanced topics such as PhoneGap, architecture, installation etc., that will guide you on how to create mobile applications with ease.

What is Apache Cordova?

Apache Cordova is defined as an open source platform which is used for building mobile applications using HTML, CSS and JavaScript. It acts as a container that is responsible for connecting our web applications with native mobile functionalities. It mainly offers a bridge that defines the connection between the web applications and mobile devices.

Apache Cordova provides a set of API’s that are responsible for providing the access to the native device features such as Camera, SIM card or the contacts lists. We can consider Cordova as an application container with the presence of web view that covers the entire screen of the device. The web view used by the Cordova is same as the native operating system. In iOS, by default UIWebView or a custom WKWebView class is used, whereas in Android, android.webkit.WebView is used.

Apache Cordova consists the set of pre-developed plugins that provide access to the device’s camera, GPS, file system, etc. Following are the platforms where we can develop apps using Cordova:

  • Android
  • iOS
  • Windows
  • Firefox OS
  • Blackberry
  • Tizen
  • Web OS
  • Symbian
  • Ubuntu

Who can use Cordova?

The users of the Apache Cordova are as follows:

  • If you are a mobile developer and want to make your application compatible on more than one platform without the need to re-implement it with the language of each platform
  • If you are a web developer and want to deploy your web application on different store portals.
  • If you are a mobile developer and want to mix native application components with a WebView for accessing the device-level APIs. You can also use it to develop plugin interface between native and WebView components.

Evolution of Apache Cordova

Nitobi created an open source API i.e., PhoneGap in 2009 which is used for accessing the native mobile resources. The PhoneGap is responsible for creating mobile applications using standard web technologies.

In 2011, Adobe acquired Nitobi and donated open-source core to Apache Software Foundation and it was rebranded as the Apache Cordova.

Features of Apache Cordova

Now, the Features of Apache Cordova are as follows:

  • Cordova Core Components:
    Cordova provides different core components that every mobile application needs. These components create base of an app that helps us to focus on implementing our own logic.
  • Command Line interface:
    This tool is responsible for building processes and installing plugins for different platforms. It is used for starting the projects and make the development process easier.
  • Cordova Plugins:
    It provides API for implementing native mobile functions to our JavaScript app. These plugins provide access to device capabilities in an application such as camera, battery, contacts etc.

Advantages of Apache Cordova

The advantages of Apache Cordova are as follows:

  • It is an open-source platform.
  • It is easy to learn and used for developing a cross-platform application.
  • It provides flexibility to build apps for multiple platforms without learning new programming languages.
  • Development of applications in Cordova is fast because it transforms into app that is supported by other platforms.
  • It is very quick to prototype.
  • It consists the set of pre-developed plugins that provide access to the device’s camera, GPS, file system.
  • There are many community add-ons that provides several libraries and frameworks.

Disadvantages of Apache Cordova

The disadvantages of Apache Cordova are as follows:

  • It is not optimal for large apps because hybrid apps are slower than native ones.
  • Because of running its code in the web view, its performance become slow.
  • It is not suitable for game application development, because it needs some higher-end plugins that are currently not available.

Important Aspects of Apache Cordova Framework

Single Code Base:

Cordova framework is capable to support different platforms like iOS, Android, Ubuntu and Windows. So, a developer can build a single mobile app by targeting several mobile platforms.

Cordova framework allows the developers to develop app in HTML5, CSS3, and JavaScript. Developer can write a source code once and packed it for individual mobile platforms by using specific devices installer format. This format enables the app to deliver native user experience by accessing native device functionality like GPS, Bluetooth, Camera, Contacts etc.

App Templates

Cordova App Templates are used to accelerate hybrid mobile application development by using the pre-existing code. The developer can choose templates from various sources i.e., npm, Git repository, etc.

Variety of Development tools

Cordova Framework is designed to be compatible with different mobile app development frameworks and IDEs. Developers can create different mobile applications by using the popular tools like Ionic Frameworks and IDEs like Visual Studio.

Shortcomings

Cordova Framework has its own shortcomings. To build the hybrid mobile apps, mobile app developers address the shortcomings of Apache Cordova. Cordova Framework is used to reduce hybrid mobile app development time and cost.

Prerequisite

Before learning Apache Cordova, you need to be familiar with the HTML, CSS and JavaScript.

Audience

Our Apache Cordova tutorial is designed to help beginners and professionals.

Problems

We assure that you will not find any problem in this Apache Cordova Tutorial. But if there is any mistake, please post the problem in a contact form.


You may also like