Explanation of PhoneGap using layman’s language

PhoneGap allows you to build your mobile app with the same skills a web designer possesses. The process goes something like this. You’ll first create your app with HTML, CSS, and Javascript using your favorite tools, but designing for the small screen. You’ll test your work in a browser as you normally would. This is the code you’ll use across devices. If you don’t possess website-creation skills, then you’ll need to start with the basics of HTML and CSS before learning to use PhoneGap. If you don’t know any Javascript, the learning curve may get steeper because you may have a hard time debugging your code or adding extra features.

You’ll then download the SDK (“software development kit”) for the device you want to build apps for. Each mobile device (Android, Apple, Blackberry, etc.) will have its own SDK, such as Xcode for Apple and Eclipse for Android, that you’ll need to learn to use. The learning curve gets steeper the more devices you want to incorporate.

You’ll insert your project into an SDK’s folder with other PhoneGap project files. (For instance, in Eclipse for Android, your files will go into an /assets/www/ folder.) There is a different set of PhoneGap files for each device, so it is not quite a one-size-fits-all solution. By incorporating pre-built “plugins,” you access a mobile phone’s capabilities from within your app, such as its camera.

The plugin code, in the case of Apple devices, will require you to understand something of Xcode’s programming language, Objective-C, in order to edit a few Xcode files to interface with the device’s features.

If you are building an app for the iPhone devices, then you’ll need to download Xcode from Apple’s web site to a Mac, install all your project files (HTML, CSS, Javascript, certain PhoneGap files, and plugins), make any updates to the native Xcode files where necessary, and compile it within Xcode. You’ll need to run it on an Apple mobile device to test it and if it’s fine, you pay Apple for a developer account, upload it to Apple, and it goes on iTunes when accepted. (This is a simplified version of the process. Some steps have been ommitted.)

The basic thing about PhoneGap is that it allows you to take the same HTML/CSS/JS project and incorporate it into each of the different devices it supports. It does not support every single capability of every single device, but it supports a lot of their features. You would not use PhoneGap to build a web site, because the web site will not have access to a smartphone device’s capability. If you do not need to interface with a phone’s features, then PhoneGap is just a painless way to get your index.html page on the small screen with a minimum of fuss.

PhoneGap is a work in progress. Occasionally its code will change and you may need to update your project and debug to make sure everything still works, especially when a plugin hasn’t been updated yet to work with the latest version.

You cannot use PhoneGap to code a web app to access a phone’s camera or any other mobile phone features like geolocation. The phone features must be coded in the SDK for each device, then output by the SDK as a file to to be uploaded to the device, either synced through iTunes in the case of Apple devices, or as a file upload for Android devices.

If you are not comfortable with programming, there are alternatives to using Xcode, but they are sometimes limited in functionality. Also, many “mobile frameworks” have been created, such as Jquery Mobile and iWebkit, that have the GUI (Graphical User Interface) elements like buttons and lists already configured for your use – free! See my iPhone Crib Sheet links for all these resources.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s