#CreateTheWeb




PhoneGap / PhoneGap Build




  Mihai Corlan / Adobe Web Evangelist / @mcorlan
Mobile Development


    1. Native Apps
    2. Web Apps
    3. Hybrid Apps (eg. PhoneGap)




    #CreateTheWeb
                2
Why would you use PhoneGap?

   Write once, run everywhere
   Native Installers -> Application Stores
   Use standard web technologies




                               #CreateTheWeb
PhoneGap could be your best friend                if

    You want to target multiple mobile platforms
    You know HTML/JavaScript/CSS
    Extending existing in-browser apps with native features
    Data-centric apps, social networking, simple games




                               #CreateTheWeb
PhoneGap
                ?          Apache
                           Cordova




           #CreateTheWeb
                       5
Contributors

    Adobe – of course
    Microsoft – Windows Phone support
    RIM – BlackBerry support / Ripple Emulator
    IBM




                              #CreateTheWeb
PhoneGap supports 7 platforms




                      #CreateTheWeb
PhoneGap Plug-ins

   Extend the built-in functionality with custom plug-ins
   http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins
   Examples: https://github.com/phonegap/phonegap-plugins

   Delegate heavyweight data processing to native code
   Create background services




                             #CreateTheWeb
Who else is using PhoneGap?

    Facebook Mobile SDK
    SalesForce.com Mobile SDK
    IBM Worklight Platform
    SAP

 Some numbers:
  ~ 4% apps in iTunes Store use PhoneGap (Sep 2011)

  ~ 100,000 monthly downloads of PhoneGap SDK




                           #CreateTheWeb
Demo




#CreateTheWeb
Building PhoneGap Apps




      #CreateTheWeb
What can you use to build your app?




                       #CreateTheWeb
Build PhoneGap app as you’d build a regular web app




                       #CreateTheWeb
Creating the native installers

 There are 2 different methods:
  Using the target platform tool chain

  Using PhoneGap Build – a cloud service




                           #CreateTheWeb
Using the PhoneGap Build

   http://build.phonegap.com
   Supports: iOS, Android, BlackBerry, WebOS, Windows Phone 7, and
    Symbian
   It is in beta and it is free; it will always be free for Open Source projects
   You upload your files (index.html, CSS, JS, images)
   Or you provide a Git / SVN link




                                 #CreateTheWeb
PhoneGap Debug

   http://debug.phonegap.com




                            #CreateTheWeb
PhoneGap Emulate

   http://emulate.phonegap.com




                            #CreateTheWeb
Resources

   Source code: github.com/callback
   Docs: docs.phonegap.com
   Wiki: wiki.phonegap.com
   PhoneGap Build: build.phonegap.com
   PhoneGap Emulate: emulate.phonegap.com
   Plugins: github.com/phonegap/phonegap-plugins
   Support: groups.google.com/group/phonegap
   IRC: irc.freenode.net #phonegap
   Apps: phonegap.com/apps
   Bugs: issues.apache.org/jira/browse/CB




                            #CreateTheWeb
PhoneGap Day Europe – Amsterdam September 14th




http://pgday.phonegap.com/eu2012/
Questions & Answers!




 Thank you!

 Mihai Corlan
 @mcorlan
 http://corlan.org




                       #CreateTheWeb
How does PhoneGap work?

       PhoneGap App                          Mobile Device


 PhoneGap             PhoneGap
 JavaScript           Native
 Engine               Engine
                                 Access to
                                 native
                                 mobile
 Your Code                       features
 HTML/JavaScript/CSS/Images/
 Frameworks/Libraries




 Web View
 Renders the app UI

PhoneGap/PhoneGap Build - Amsterdam Adobe Camp

  • 1.
    #CreateTheWeb PhoneGap / PhoneGapBuild Mihai Corlan / Adobe Web Evangelist / @mcorlan
  • 2.
    Mobile Development 1. Native Apps 2. Web Apps 3. Hybrid Apps (eg. PhoneGap) #CreateTheWeb 2
  • 3.
    Why would youuse PhoneGap?  Write once, run everywhere  Native Installers -> Application Stores  Use standard web technologies #CreateTheWeb
  • 4.
    PhoneGap could beyour best friend if  You want to target multiple mobile platforms  You know HTML/JavaScript/CSS  Extending existing in-browser apps with native features  Data-centric apps, social networking, simple games #CreateTheWeb
  • 5.
    PhoneGap ? Apache Cordova #CreateTheWeb 5
  • 6.
    Contributors  Adobe – of course  Microsoft – Windows Phone support  RIM – BlackBerry support / Ripple Emulator  IBM #CreateTheWeb
  • 7.
    PhoneGap supports 7platforms #CreateTheWeb
  • 8.
    PhoneGap Plug-ins  Extend the built-in functionality with custom plug-ins  http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins  Examples: https://github.com/phonegap/phonegap-plugins  Delegate heavyweight data processing to native code  Create background services #CreateTheWeb
  • 9.
    Who else isusing PhoneGap?  Facebook Mobile SDK  SalesForce.com Mobile SDK  IBM Worklight Platform  SAP Some numbers:  ~ 4% apps in iTunes Store use PhoneGap (Sep 2011)  ~ 100,000 monthly downloads of PhoneGap SDK #CreateTheWeb
  • 10.
  • 11.
  • 12.
    What can youuse to build your app? #CreateTheWeb
  • 13.
    Build PhoneGap appas you’d build a regular web app #CreateTheWeb
  • 14.
    Creating the nativeinstallers There are 2 different methods:  Using the target platform tool chain  Using PhoneGap Build – a cloud service #CreateTheWeb
  • 15.
    Using the PhoneGapBuild  http://build.phonegap.com  Supports: iOS, Android, BlackBerry, WebOS, Windows Phone 7, and Symbian  It is in beta and it is free; it will always be free for Open Source projects  You upload your files (index.html, CSS, JS, images)  Or you provide a Git / SVN link #CreateTheWeb
  • 16.
    PhoneGap Debug  http://debug.phonegap.com #CreateTheWeb
  • 17.
    PhoneGap Emulate  http://emulate.phonegap.com #CreateTheWeb
  • 18.
    Resources  Source code: github.com/callback  Docs: docs.phonegap.com  Wiki: wiki.phonegap.com  PhoneGap Build: build.phonegap.com  PhoneGap Emulate: emulate.phonegap.com  Plugins: github.com/phonegap/phonegap-plugins  Support: groups.google.com/group/phonegap  IRC: irc.freenode.net #phonegap  Apps: phonegap.com/apps  Bugs: issues.apache.org/jira/browse/CB #CreateTheWeb
  • 19.
    PhoneGap Day Europe– Amsterdam September 14th http://pgday.phonegap.com/eu2012/
  • 20.
    Questions & Answers! Thank you! Mihai Corlan @mcorlan http://corlan.org #CreateTheWeb
  • 21.
    How does PhoneGapwork? PhoneGap App Mobile Device PhoneGap PhoneGap JavaScript Native Engine Engine Access to native mobile Your Code features HTML/JavaScript/CSS/Images/ Frameworks/Libraries Web View Renders the app UI

Editor's Notes

  • #2 Sorry guys. Thereismoreme in themenu :DWhois a mobile developer?Who knowswhatPhoneGapis?Who hascreated a PhoneGapapplication?
  • #4 PhoneGap answers another issue many companies / customers / developers have: the ability of distributing web apps through application stores.
  • #5 PhoneGap could be the default option for many application types especially if you want to target multiple platforms, you know web technologies, and you have an existing REST API that you could reuse with your PhoneGap app.
  • #6 Atthispoint I shouldstopandquicklyexplainwhatistherelationbetweenPhoneGapand Apache Cordova.PhoneGap was developedby a smallcompanycalledNitobi. When Adobe boughtthiscompany last year, wereleasedthesourcecodeas an open sourceprojectunder Apache Foundation. Andthenameofthisproject was changedfromPhoneGaptoCordova. Ofcourse Adobe continuestobeoneofthemaincontributorstogetherwithothercompanieslike IBM, RIM, or Microsoft.Today PhoneGapisthenameofAdobe‘sCordovadistribution.
  • #7 What platforms does PhoneGap support?It is the only open source framework that supports 7 platforms AFAIK. From iOS and Android to Windows Phone and BlackBerryHere is a list of built-in out of the box device APIs supported by PhoneGap. It supports accelerometer, all sort of notifications, storage, contacts and file APIs and so forth. Where you see an X the reason is that the device doesn’t have the capability most of times and not a PhoneGap issue. For example there is no accelerometer on on older iPhones.
  • #8 You can write plugins in order to expose additional native features to JavaScript. A plugin has two parts: a native part that exposes the native feature and JavaScript part that provides the API that will be used by the developers who want to consume your plugin.
  • #9 Next let me show you some PhoneGap applications to see for yourself what is possible to build using this platform.WikipediaUntappdPhoneGap API2011 Census ?
  • #10 PhoneGap doesn’t provide any UI out of the box. This means that you are free to use whatever you want.You can use whatever JavaScript frameworks or libraries you like. Eg. jQuery, jQuery Mobile, Sencha, Backbone, Liquid, Mustache, Bootrstrap, and so onPay attention to performance (mobile vs. desktop)Pay attention to mobile browser features or lack of them (I am talking about SVG)
  • #11 Most of the time you’ll be building your PhoneGap app the same way you build web apps.- Using your favorite editors (Eclipse, vim, Dreamweaver, Visual Studio)- Test and debug the app using your desktop browser- Test and debug the app using mobile simulators/emulators and the physical devices
  • #12 PhoneGap Build is
  • #14 The PhoneGap Emulator allows you to test your PhoneGap application from your desktop browser. PhoneGap's JavaScript APIs are avaialble using Ripple, so you can subscribe to deviceready and even stub responses for your custom plugins.
  • #15 So how does PhoneGap work? Most mobile platforms offer something called WebView – which is a chromless browser. A full screen browser without location bar, history buttons, without any UI.And using native code this WebView can be extended by exposing device APIs or capabilities to the JavaScript code that runs in this WebView.In this diagram you can see that there is the PhoneGap Native Engine that exposes the native capabilities through a PhoneGap JavaScript API to the application JavaScript. And the application UI is created with HTML/JavaScript/CSS and runs inside the WebViewWebView – chromless browser full screenNative Layer– PhoneGap native engine – PhoneGapJavaScrip APIApplication Files – HTML / JavaScript / CSS