Getting started with phonegap

presented by Giorgio Natili


KISAF - Android and Blackberry
(all together now!)

Rome, 28 may 2013

what is phonegap?


  • It's a cross platform mobile development framework

  • It's a solution to create native apps using web standards

  • It's an open source project under the Apache umbrella


Giorgio Natili | me@codeinvaders.net

which are the supported platforms?


  • Android

  • Blackberry 

  • iOS

  • Windows Phone

  • Many others (tizen, osx, windows, firefox os, etc.)
Giorgio Natili | me@codeinvaders.net

How it works?


  • It renders the app user interface with the device  WebView  

  • It accesses the device's APIs using JavaScript (asynchronous non blocking!)

  • It uses JavaScript to access native custom code (plugman!)


Giorgio Natili | me@codeinvaders.net

What offers?


  • Capabilities to interact with the device contacts  

  • Access to devices' sensors (accelerometer, compass, gps)

  • Device storage (File System, SQLite and IndexedDB)

  • Multimedia capabilities (camera and capture)

  • Connection, device, file, notification, events APIs
Giorgio Natili | me@codeinvaders.net

What Else?




Everything you want
using custom native code 
and JavaScript!!!

ARCHITECTURE

Giorgio Natili | me@codeinvaders.net

advantages


  • Web developers can start to be productive on mobile in a very short time

  • The business logic implementation of a web app can be used on mobile  (i.e. code reuse)

  • The debug it's straightforward because it starts in the browser 


Giorgio Natili | me@codeinvaders.net

disadvantages


  • The release cycle is continuos (i.e. rolling release) and focused on bugs 

  • It's a community driven framework, each release is based upon members ideas and willing

  • It's evolving very fast as well as the mobile market and devices 


Giorgio Natili | me@codeinvaders.net

development and deploy


  • It's enough using a text editor (Sublime Text, Notepad, Brakets, etc.) and a browser extension Ripple

  • The usage of the cli is helpful but not mandatory
       
  • Deploy can happen on the clouds or on your dev environment using the target platform SDK and the PhoneGap utilities (cordova-cli and plugman)

 
Giorgio Natili | me@codeinvaders.net

resources


Giorgio Natili | me@codeinvaders.net



demo

(on real devices)





Giorgio Natili | me@codeinvaders.net



Thanks!

(phonegap rocks!)





Giorgio Natili | me@codeinvaders.net