Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Apache Cordova or best called PhoneGap

Apache Cordova or best called PhoneGap

Juan Felipe Alvarez Saldarriaga

September 25, 2013
Tweet

More Decks by Juan Felipe Alvarez Saldarriaga

Other Decks in Programming

Transcript

  1. OR BEST CALLED "PhoneGap is a free and open source

    framework that allows you to create mobile apps using standardized web APIs for the platforms you care about." – APACHE CORDOVA PHONEGAP http://phonegap.com
  2. HOW TO INSTALL IT? 1. You need install first. 2.

    Install via , this way: 3. Install Cordova's CLI: node.js PhoneGap's CLI NPM $ [sudo] npm install -g phonegap $ [sudo] npm install -g cordova
  3. OUR FIRST HELLO WORLD APP 1. "hello" is the folder

    where our first app is created. 2. "com.example.hello" our app's identifer. 3. "HelloWorld" our app's name. $ phonegap create hello com.example.hello HelloWorld $ cd hello $ phonegap run android
  4. "JavaScript® (often shortened to JS) is a lightweight, interpreted, object-oriented

    language with first-class functions, most known as the scripting language for Web pages, but used in many non- browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic, is type safe, and supports object- oriented, imperative, and functional programming styles." – JAVASCRIPT https://developer.mozilla.org
  5. INITIALIZE IT PhoneGap starts our application via www/index.html, inside this

    HTML file some JavaScript files where added to initialize the PhoneGap's framework, also, to start our app when the . PhoneGap development is pretty much a web application with phone capabilities. device is ready
  6. PROTOTYPAL INHERITANCE "JavaScript has strong object-oriented programming capabilities, even though

    some debates have taken place due to the differences in object-oriented JavaScript compared to other languages." – https://developer.mozilla.org
  7. HERENCIA PROTOTIPAL, O, OOP ALA JAVASCRIPT "La herencia prototipal consiste

    en que un objeto es el prototipo de otro. La herencia en JavaScript es simple, es como una cadena, un objeto hereda de otro a través de un atributo que posee el objeto Object, el atributo es prototype. A prototype le podemos asignar cualquier cosa, simplemente que solo funciona cuando le asignamos un objeto, si tratamos de asignarle un primitivo, por ejemplo un número entero, JavaScript solo lo ignora. A esto se le denomina prototype chain" – http://juan.im
  8. SUPPORTED FEATURES Basic device information ( API). Network and Battery

    . , , and . , playback and . Access files on device or network ( API). via dialog box or vibration. . . . Open new browser windows ( ). Debug console. Device Connection Events Accelerometer Compass Geolocation Camera Media Capture File Notification Contacts Globalization Splashscreen InAppBrowser
  9. HANDLING FEATURES $ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-cons $ phonegap

    local plugin list [phonegap] org.apache.cordova.core.console $ phonegap local plugin remove org.apache.cordova.core.console
  10. CUSTOMIZE EACH PLATFORM You can customize your application via merges

    folder, this folder can handle custom stuff for each platform. This folder is a mirror from www folder, you don't need to do something inside platforms folder, basically they're regularly replaced with the top- level www directory's cross-platform source.