Cordova – Intro

Sometimes you want to build a mobile app. This could be because you have an idea you want to put to use on your phone or it could be because your boss said it’s time to make an app. If your focus has been on web technologies like we have discussed in the past using a platform like the Apache foundations Cordova framework opens the door to cross-platform app development with things you already are familiar with.

Installation

To install Cordova we will use npm to install it globally with the command:

npm install -g cordova

This will add the basic tools needed for Cordova and we will be able to access them from the command line.

Create A Project

Next we will use the Cordova command create to create a new project. To do this navigate the command line to the directory you would like the project to be created in and type”

cordova create introproject

This will create a new project call Cordova project with some defaults that we may not necessarily want. If you open the config.xml that was just created in your introproject directory you will see a few things.

Now I can use the command cordova run browser to see the defaults Cordova assets we mentioned earlier as the sample app in the browser window.

Now we have the basic Cordova app running start customizing the app so it does more that tell us the device is ready.

Conclusion

We installed the tools necessary to create and run a sample Cordova app in the local browser. Next time, in Cordova – Build Android, we will setup for building the same app to Android. Let me know what you think so far by leaving a comment bellow or, if you want be discreet, send an email to me at brett@wipdeveloper.com.