Introduction to PhoneGap

Your end users expect mobile access to enterprise resources now. Unfortunately, our traditional remote access methods do not lend themselves easily to mobile form factors. So, we are left with the choice to use 3rd party apps, “mobilize” existing apps, or build our own. This article will address one of the players aimed at helping you build your own mobile apps with less effort.

Mobile Enterprise Apps – Virtualize, Buy, or Build?

When it comes to mobile enterprise applications, you basically have 3 choices:

  1. Virtualize what you have (via Citrix HDX, RDP, VMware PCoIP, etc.)
  2. Buy something from a 3rd party
  3. Build something yourself

There are use cases for each of these, but I’m going to focus on one way to build something yourself.  In this case, I’m going to cover PhoneGap.

 

What is PhoneGap?

PhoneGap is a framework for building mobile applications using only HTML, CSS, and Javascript.  This removes the complexity of using multiple programming languages for the various mobile platforms out there.  The PhoneGap framework gives developers access to almost all of the device’s features such as GPS, Camera, Accelerometer, Notifications, etc. via the included Javascript library.

The easiest way I think of it is like this – PhoneGap is a specialized web browser without a user interface.  There is a specialized web browser for each native platform – iOS, Android, Windows Phone, Blackberrry, etc.  This allows you to reuse your code across platforms; however, this does not allow you to use one IDE for all platforms.  Each PhoneGap app you build gets complied into this chrome-less browser and delivered just like any other native application.  The end result is an individual .ipa (for iOS), .apk (for Android), .xap (for Windows Phone), etc..  Therefore, you still have the ability to use all your EMM and MAM tools you may already have to manage these apps. Each time you build a new PhoneGap app, you get a new .ipa, .apk, .xap, etc. that includes the chrome-less browser and your HTML, CSS, JavaScript, etc.

PhoneGap

What’s needed to develop with PhoneGap?

You still need to use the various platform IDE’s to develop an app with PhoneGap.  For instance, I developed a simple app for iPhone and Android.  For iPhone, I used Xcode to create and compile the PhoneGap application.  For Android, I used Eclipse to create and compile the application.  I had to set up each IDE to use the PhoneGap framework, but that is all documented pretty well.

I started with Xcode and got things working liked I wanted for iPhone.  Then, I literally just copied and pasted my HTML, CSS, and images over to Eclipse and the Android app just worked.  My app is very simple, but here are the results:

What is the catch?

PhoneGap is free.  Even though Adobe acquired PhoneGap in 2011, the PhoneGap code was contributed to the Apache Software Foundation (ASF) under the name Apache Cordova and graduated to top-level project status in October 2012.

I have noticed that some PhoneGap apps seem to run a little sluggish when dealing with animations as compared to traditional apps.  I’m assuming this is due to the chrome-less browser nature of PhoneGap applications.  However, when dealing with enterprise applications, I do not see this as being a big issue.

The other issue I see for enterprises (and this is not unique to PhoneGap) is data access.  Your application is really just another front end for data.  You have to provide enterprise data access somehow.  This can be done via VPN, or using local device storage and sync strategies.  Like I said, this isn’t unique to PhoneGap, but it is something to think about.

Conclusion

PhoneGap lowers the bar of entry into “native” device applications because there are a lot of HTML, CSS, JavaScript developers out there.  Oftentimes, enterprises may already employ people with expertise in these areas.  If not, it is more budget-friendly to hire a Web developer as opposed to developers that specialize in Objective-C and/or Java and/or .Net languages.  You get the benefits of maintaining one code base across multiple devices.  All of your EMM/MAM products should work with PhoneGap applications.

On the contrast, you are not developing “real native” code and devices may come out with features faster than the PhoneGap framework can accommodate.  You still have a data problem.  If your app requires a lot of fancy animated graphics, then PhoneGap may or may not suit your needs.

So, there you go.  If you have experience with PhoneGap or just something to add, feel free to leave a comment below.

 

Author: Jason Conger

Hey there. Hope you like the site.

1 thought on “Introduction to PhoneGap”

Leave a Reply

Your email address will not be published. Required fields are marked *