PhoneGap/Cordova

I have written a number of posts about a development framework called PhoneGap ( also known as Cordova.  ) so I thought I should give a bit of informatiScreenshot 2014-05-15 14.40.57on about what it is.

Firstly in regards to PhoneGap vs Cordova, they are basically the same.
Cordova is an open source Apache project.
PhoneGap is the downstream distribution produced by Adobe.

Think of it as Webkit being part of Safari and Chrome. Cordova would be Webkit, and Safari would be PhoneGap.

They did this to allow PhoneGap to provide more end user features that may not apply to the core Cordova goals. However at the time of writing, they are basically identical apart from the name.

PhoneGap allows for rapid development of cross platform phone applications.
This is especially useful for anyone coming from a Web Development background.

PhoneGap itself is a application shell, containing JavaScript hooks into internal phone functions.

To develop an application you start by creating a new project. This gives you an application with basically a Web Browser, and an index.html page.

From here you can go and add all your pages. You can use AJAX to get external content, or package up all the content into the application itself. This step is similar to what you would do for any other website.

JQuery and JQuery UI are important to use with PhoneGap to get the right mobile phone look.

If you need to access any internal functions of the phone, such as take a photo, it is a simple JavaScript function call.

The awesome thing about this framework is the ability to extend the framework, and application further. You can easily add in iOS Objective-C functions, or Android Java functions, then call these from JavaScript.

Once you are done adding all your content, package it up for the destination platform, and deploy it.

eclipsePhoneGap is great for a quick development cycle especially when targeting multiple platforms.

I should point out the few issues I have with it before I end though.

  • It is often very slow on some devices. I have noticed this particularly with a number of Android devices.
  • The touch sensing on the slower Android devices is often off. You push one thing, it highlights, but something else is selected instead. I am not sure what causes this.
  • It is a relatively new framework which has caused a number of major changes. I have had issues where a new version is released causing numerous code changes in what I have already developed. However as the product is maturing this issue seems to have slowed down.

If you are developing a simple informational application which needs a bit more than a mobile website, then I recommend giving PhoneGap a look.