Special Offer - Enroll Now and Get 2 Course at ₹25000/- Only Explore Now!

All Courses
What is Apache Cordova?

What is Apache Cordova?

June 28th, 2019

What is Apache Cordova?

Apache Cordova which was formerly known as PhoneGap is a  free and open-source mobile application development framework that is used to create cross-platform mobile applications using CSS3, HTML5, and Javascript. This means that instead of writing separate code for a particular platform, let’s say, Android and rewriting a whole new code (for the same app) for another platform like iOS or Windows, you can simply use Apache Cordova to write a one-time code that can be distributed across multiple platforms. This will save more time and resources as you don’t have to rewrite codes for each platform plus, it can allow you to reach a larger audience as you are not limited to a particular platform.

The History of Cordova

From a traditional stance, an app developer would be required to have specific skills for a specific platform. For example, in order to develop an app for Android, one would be required to learn Java and need to follow the rules and frameworks specific to Android development. Likewise, in order to develop an app for iOS, one will need to learn a different programming language like Swift or Objective C and hence, follow the rules and framework specific for iOS development. As such, it can be a pain to maintain and rewrite the codes for each platform since they use different frameworks. In order to bridge this gap, frameworks like Apache Cordova have been introduced. It was originally developed by Nitobe in 2009 but later sold to Adobe Systems in 2011.

Unlike native apps that are platform specific, Apache Cordova is used to creating hybrid apps using web technologies like CSS3, HTML5, and Javascript. Developers can also use well-known Javascript libraries such as jQuery and Angular JS to build hybrid apps. As such, a web developer can easily move to hybrid app development without having to learn a new programming language. The Cordova Framework also allows developers to easily package the hybrid mobile applications for each platform so it can be installed just like a native app. The User Interface (UI) of the hybrid application acts like a WebView where it runs in the native container. The native container is flexible as it changes according to the native mobile operating system.
Moreover, hybrid apps can access certain capabilities of native devices with the use of plugins thereby delivering a native experience for the users. Important features of a native device such as a camera, media storage, accelerometer, contacts, geolocation, compass, etc. can be accessed by the hybrid app. The API provided by Cordova Framework also allows developers to easily create custom plugins based on their needs.
The Command Line Interface (CLI) can be used to efficiently develop, test and deploy the HYBRID mobile application across different platforms more easily.  Developers can also run specific commands to test the app on different mobile devices – real devices as well as emulated. However, the SDK tools for each targeted mobile platform must be installed before utilizing the CLI tools.
Another perk of using Cordova is that it also has app templates that have been already coded and are readily available for use. This can help save time and allow developers to create their projects more quickly.
There are also a couple of well-known organizations that have used Apache Cordova to develop cross-platform mobile solutions. Facebook and Salesforce, for instance, use a forked version of Apache Cordova in their SDK. Other organizations like IBM, Adobe and Microsoft are also using this. The Cordova community is constantly growing with a lot of helpful and supportive people. With such a community, it is easy to get assistance and help even if you get stuck.

Pros  of Apache Cordova

  • Cordova offers a single platform that can be used to create cross-platform mobile applications. As such, you don’t have to worry about learning different programming languages for each platform.
  • Saves time as hybrid apps take lesser time to develop as compared to developing an app for each native platform separately.
  • Easier to maintain as it bypasses version making it simple to update. With native apps, developers need to deliver a new version for each update and users need to update the app for each new version release.
  • Cost-effective as you don’t have to spend resources on different platforms. Instead, you can use a single code base to create an app for multiple platforms.

Cons of Apache Cordova

  • Because of its cross-compilation capabilities, hybrid apps tend to be slower.
  • There may be compatibility issues for some plugins across different platforms and devices.
  • Plugins may not function properly so it may need to be forked and modified.

Related Blogs:

  1. What is Apache Spark?
  2. Pyspark Vs Spark
  3. Apache Spark Vs Hadoop