Ask LH: Should I Use PhoneGap To Build Mobile Apps?


Dear Lifehacker, I am looking at writing an iPhone app mostly just for fun. I am currently a web developer and so I was looking at using PhoneGap to speed up the job, since I know how to develop websites and this would also save me the hassle of having to learn C (or a related language). The added advantage to PhoneGap is I could also release the app on multiple platforms like Android.

The app would mostly just be API calls to Foursquare. Does it make sense to use PhoneGap (or another web-based phone programming languages) or would it be smarter to start with C or a similar language? In which cases should you use each? Thanks, Curious Coder

Picture: PhoneGap

Dear CC,

The short answer: yes, using PhoneGap is fine, and will make it easy to build an app without needing to learn additional languages. PhoneGap (owned by Adobe since 2011) lets you develop apps using HTML5, CSS and JavaScript and port those apps to iOS, Android, BlackBerry, Windows Phone and other platforms, which makes it a solid choice if you already know web development. However, there are a few caveats you might want to consider:

  • PhoneGap is only free if you make your app’s source code available via GitHub, or if you only work on a single app. If you want to build more than one, you’ll need to pay a monthly fee to access the service.
  • Apple’s attitude to apps developed using frameworks has varied over time. PhoneGap is an approved framework, which means that apps built using it won’t be rejected purely because they were developed that way (which hasn’t always been the case in the past). It seems unlikely that Apple will revoke this support, but it’s a possibility. For apps built as a hobby, this doesn’t matter, but if app development becomes your main job, you might want to consider a different approach.
  • While you can deploy apps on multiple platforms, be aware that they won’t perform like native apps in every environment. For example, you won’t be able to easily use the Back key in an Android app and then port that functionality into iOS without additional effort. It’s usually obvious when an app has been ported from one platform to another without modification, and it can lead to less satisfied users.
  • This leads to your question about when to use a framework and when to use a native language. For simple content presentation apps, a framework like PhoneGap will often suffice and can save you a lot of hassle. If you want to maximise performance or take deep advantage of specific platform features, actually writing code will get better results. I could write a Lifehacker viewing app in PhoneGap, but if I wanted to write a content management system for our site, I’d need a real programming language, I suspect.

If using a framework gives you a taste for development, chances are you’ll want to dive in and actually learn to program with a full-blown language. But a framework like PhoneGap is a great way to dip your feet in the water. Good luck and happy programming!

Cheers
Lifehacker

Got your own question you want to put to Lifehacker? Send it using our contact tab on the right.


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


5 responses to “Ask LH: Should I Use PhoneGap To Build Mobile Apps?”

Leave a Reply