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
- 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!
Got your own question you want to put to Lifehacker? Send it using our contact tab on the right.