Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Phonegap for Native Application development [closed]

I recently came across Phonegap. Have anyone of you tried it. Its an incredible tool which claims that developers can use HTML 5 based framework like Sencha touch and Jquery at the same time having access to native features on phone. Also the code is portable from Android to Iphone with some effort. Before I plunge into it I want to know what is forum's experience with Phonegap. What are the pain points and is it really scalable for enterprise level application development.

like image 588
SaKet Avatar asked Mar 01 '11 22:03

SaKet


People also ask

Why was PhoneGap discontinued?

Since 2008, the industry and market has evolved and PhoneGap usage has declined. “In the context of these developments and declining PhoneGap usage, Adobe is focusing on providing a platform that enables developers to build, extend, customize and integrate with Adobe products,” the company wrote in a post.

Can I still use PhoneGap?

Can I continue using PhoneGap after Adobe discontinues its support? PhoneGap will remain free and open sourced, however it will not be actively developed. Gradually, as iOS and Android operating system updates are released, the PhoneGap tooling will become incompatible with the latest version of Apache Cordova.

What are PhoneGap limitations?

PhoneGap APIs are built using JavaScript which is not multi-threaded and hence do not support background processing. Access advanced native functionality: A number of native APIs are not yet supported by PhoneGap's APIs. Complex Business Logic: A number of applications such as enterprise applications are quite complex.


1 Answers

I've built a couple of applications using PhoneGap, and for what it provides, it's great. There are a couple of quick notes I would like to point out, which might help you.

Disable device-based features you're not using The accelerometer, geolocation features are by default turned on. If you're not using them, I would turn them off, as your app will load faster (initialize) and run smoother.

onDeviceReady - This is the method that's called once phonegap has loaded and is ready. $(document).ready or whatever you're used to, doesn't really apply here - unless you're only doing interface/hard-coded HTML stuff. If you're interacting with iPhone features, like GeoLocation, you will need to do everything after onDeviceReady has been called.

Pick a UI/library There are a ton of options for the interface/libraries, jquery-mobile, sencha touch, jqtouch, etc.. These each offer a unique approach, and feature-set. Do some research and use one, but avoid combining. You can read about some more options, tools here: http://www.phonegap.com/tool (link updated)

Also, more on just mobile development in general, with PhoneGap If you're looking to build apps, that are distributed through the Android market and iPhone App Store, I would read through their exhaustive lists for guidelines on how to develop your app. For example, in the tools link above, there is a "tool/plugin" called Easy APNS - while this is useful for Android - and technically doable on the iPhone, it violates the development agreement, as it states you must use the Apple notification network, etc.. This is just an example, but reading up on that stuff will save you a lot of headaches, if that's your end goal.

All in all, it's great for lightweight apps, especially if you come from a web development background. LocalStorage, GeoLocation, etc.. works really well. I hope this helps a little... and feel to ask questions.

Additional Edit:

I really think it comes down to what you want to do, and what you know how to do. Matt pointed out that developing native apps, for iOS is better, etc.. Yeah, if you have the time and knowledge to learn that - of course native will be better. But PhoneGap is made for web developers that can take their existing skillset and build apps. Also, PhoneGap allows you to build apps quickly, for iOS, Android, Symbian, Palm, Blackberry. With minor adjustments to your codebase for each.

like image 53
TNC Avatar answered Sep 21 '22 00:09

TNC