Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance Impacts of Cordova/PhoneGap?

Recently, I have got to know about Apache Cordova and PhoneGap and how beautifully then can package native Android and Ios Apps from HTML5 Apps.

However, I am trying to understand, How does this impact performance, security or any other concerns. I am sure, that using Cordova and PhoneGap, won't provide the security and performance of Native Apps, as they may be using Callback hooks to the OS over packaged apps ?

Am I correct, if yes, then how exactly Cordova/Phonegap bridges the gap ?

like image 495
Love Hasija Avatar asked Feb 03 '14 11:02

Love Hasija


1 Answers

Cordova puts the entire HTML5 app in a webview, so performance depends mainly on the underlying javascript and CSS performance. There are clever tricks (e.g. using -webkit-translate and -webkit animations) to improve performance but definitely not everything can run as smooth as in a native app. Depending on the type of application this may or may not be an issue. A big role lies with the javascript/css library you use for generating the UI (or your own JS coding skills if you don't use any). There are no standard UI components you can use besides what HTML/CSS offers (<a>, <img>, css: border-radius etcetera). What is of course nice is that the webviews run on WebKit so you can use the latest & greatest CSS3 features.

As for security: imho there are no major impacts on security, everything is still packaged inside a native app which can be unzipped just the same as a native app. Only thing is that your JS code is visible instead of the native compiled code, but hey: security by obscurity was never a good security measure anyways.

like image 197
Jan Misker Avatar answered Oct 02 '22 23:10

Jan Misker