After all PhoneGap (Apache Cordova) actually compiles applications in PURE native code?

7
Does PhoneGap (Apache Cordova) actually compile applications into PURO native code or does it act as a layer between a browser and the OS of the mobile phone? Which of the two options below is the most correct?

I've heard that it's just a browser with its application, all encapsulated (compiled) in a native application that will just open that "mini-browser" with your HTML5 + CSS + JavaScript application, is this true?

Or does PhoneGap actually transform the code (HTML5 + CSS + JavaScript) produced in it into native code for each S.O. (accessing the API without intermediaries)?

    
asked by anonymous 04.01.2014 / 11:16

2 answers

8

PhoneGap produces a static application composed of a native webview and code to expose the functionality of each system to a javascript API. Your HTML / CSS / JS code will be packaged without significant changes along with the native PhoneGap system and will run like any other web page, but offline and with access to native functions. The engine that will actually run your JavaScript depends on each platform.

Overview section of the documentation: / p>

  

The application itself is implemented as a web page, named index.html by default, that references any CSS, JavaScript, images, media files, or other resources are necessary for it to run. The app executes as a WebView within the native application wrapper, which you distribute to app stores. For the web app to interact with various device features the native apps do, it should also refer to cordova.js file, which provides API bindings.

Free translation:

  

The application is implemented as a web page, named index.html by default, which references any CSS, JavaScript, image, multimedia, or any other resource needed for it to work. The app runs as a WebView within the native application package, which you distribute to app stores. For the web application to interact with the various functionality of the device in the same way that native applications do, it should also refer to the cordova.js file, which provides connections to the API.

    
04.01.2014 / 13:21
2

The application will continue to be an application made with HTML + CSS + JS , which after build will be encapsulated in an app, but running as a webview , depending on the device / platform that, with the cordova, will make available the resources to access some native features.

    
31.01.2014 / 01:59