What is the Cordova Framework?

Brad Hanks

The Cordova Framework is a set of native APIs for mobile devices and a set of common JavaScript APIs that allow Web developers to build mobile applications using HTML, CSS, and JavaScript. 

Originally released on Sunday, April 1, 2012, it may have been a coincidence that the name of the conference was almost the same as the name of the framework, but the Cordova Framework was the most talked about topic at the conference. 

Stretched over all three days of the conference, the framework was described as a project in development by the Apache community, with the participation of big companies such as Apple and Google. Its source code freely available on GitHub, it was touted as the solution that will bring the open web to mobile devices.     

 

Cordova Framework MVC Integration

The Cordova Framework MVC integration includes:                  

A <mvc> tag that allows you to specify a JavaScript file that contains your application's model, view, and controller layers. The tag that allows you to specify a JavaScript file that contains your application's model, view, and controller layers. 

A <mvc-config> tag that allows you to specify configuration settings for the framework (for example, which controllers are loaded). This tag allows you to specify configuration settings for the framework (for example, which controllers are loaded). 

A <mvc-controller> tag that allows you to specify a controller class in your JavaScript file. This tag only works with controllers that extend from the Cordova framework's Controller class (which are not available on all devices). However, this tag can be used as a placeholder for future versions of the framework when it supports all types of controllers.

A <mvc-view> tag that allows you to specify a view class in your JavaScript file. The Cordova Framework MVC integration supports any view classes which extend from the Cordova framework's View class (which are not available on all devices). However, this tag can be used as a placeholder for future versions of the framework when it supports all types of views.                 

A <mvc-data-source> tag which has been updated to support specifying multiple data sources and configuring them using data binding expressions. This is useful for scenarios where more than one data source is needed.

For example, 

% raw %}{{ personModel }}{% endraw %} 

For more information, see the Cordova Framework MVC Integration Guide

Cordova Framework for Android Development 

The Cordova Framework for Android Development is a cross-platform mobile development framework that allows you to create applications with web technologies. It allows you to use the same HTML, CSS, and JavaScript code across multiple mobile platforms.                                

The framework is built on top of the open source Apache Cordova project. The Apache Cordova project provides a native application development environment that allows you to access the device's hardware and software capabilities. 

The Cordova Framework for Android Development is used by many developers around the world to create mobile applications for various platforms. The framework is open source and free to use. It is maintained by the Apache Software Foundation.                  

The Cordova Framework for Android Development documentation helps you create a simple application using this framework. You will learn how to install and configure the Cordova Framework for Android Development on your computer. You will also learn how to create a simple application using this framework and how to run it on your computer.                  

The Cordova Framework for Android Development documentation will also help you to learn more about this framework and its features. You will also learn how to use this framework in your projects. 

     

Cordova Fun Facts

Here are some fun facts about Cordova that you might not already know: 

How did Cordova Framework get its name?

The name Cordova was chosen to emphasize the cord that binds the Web and mobile platforms together.  

                

What are the main features of Cordova?

Apache Cordova is an open source project that runs on a number of popular mobile device platforms, allowing you to write your application once and run it on multiple mobile device platforms, such as iOS, Android, Firefox OS, Windows Phone, etc. 

The core of Apache Cordova is a set of native APIs that allow a developer to access device features, such as the camera, the accelerometer, the filesystem, etc. These native APIs are implemented in JavaScript. 

Here are the two most popular features: 

Web-based application development. The core of Apache Cordova is a set of native APIs that allow a developer to access device features, such as the camera, the accelerometer, the filesystem, etc. These native APIs are implemented in JavaScript. 

                 

Cross-platform development. Apache Cordova has the ability to develop one application that will run on a number of mobile device platforms. It will run on Android, iOS, Blackberry, Windows Phone, etc.           

Integration of Cordova Framework with Joomla!                                   

Sorry to say it, but Cordova stopped supporting Joomla in 2014.

Cordova Webview Q&A 

You can use the Cordova WebView if you need to show web content in an Android app. Here are some frequently asked questions about the Cordova Webview with their answers.                                

Q: How to use the Cordova File plugin in iOS? 

A: The Cordova File plugin simplifies the reading and writing of files in an iOS app.                  


Q: Can I use a Cordova plugin in a web (HTML) app? 

A: No, you cannot use a Cordova plugin in a web (HTML) app.                  


Q: Is there a camera plugin for the Android app webview? 

A: Yes. The Cordova Camera plugin is used to capture pictures or videos from an Android device.                  


Q: Is there a Cordova Debug plugin? 

A: Yes. You can use the Cordova Debug plugin to debug your app, which is helpful when you need to work out errors in how your code is implemented.                


Q: What is the Cordova File plugin? 

A: The Cordova File plugin is a JavaScript library that provides an abstraction for accessing files, typically from the device's file system.      

     

Q: Does the Cordova Webview have a File plugin for Android? 

A: Yes; there is. The Cordova File plugin for Android allows you to read and write files on an Android device.                  


Q: Is there a Cordova File plugin for iOS? 

A: Yes. The Cordova File plugin for iOS allows you to read and write files on an iOS device.                 


Q: What about for a Windows phone? Does the Cordova File plugin support Windows phones? 

A: Yep! There is a cordova File plugin for Windows Phone and it allows you to read and write files on a Windows Phone device.                  


Is the Cordova Framework The Future of Mobile Application Development?

There are many options out there, so it’s a strong ‘maybe’.                 

In 5 years, the Cordova framework has grown in ways that were simply unimaginable when it was first released. With each release and advancement, the framework becomes more capable and more flexible. While it remains a very difficult framework to use, (especially for a novice developer) there is no denying that Cordova is here to stay. 

The flexibility of being able to develop applications in JavaScript and the ability to have access to all of the libraries and modules within our web browsers, means that Cordova has some very powerful options for development.                  

I would say that at this point in time, there are more than enough reasons to use Cordova as your choice for developing mobile applications. However, if you are looking for something with fewer limitations and marketability for your application then one of the native development platforms might be better suited.                  

We're already seeing some interesting things coming from the React Native community, with tools like Electron allowing you to develop in HTML5 and JavaScript, on top of cross platform native frameworks like React Native (and potentially others). While this isn't quite Cordova yet, it's still very exciting because it means developers will have access to even more options for building applications for multiple devices on one platform.

Join the Discussion