Mobile app development using PhoneGap - A comprehensive walkthrough - Touch Tour Chennai


Published on

A quick rampup through the learning curve of PhoneGap, by way of walking through an App Development.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Any SDK, preferred is eclipse with ADT plugin The SDK and AVD need to be installed PhoneGap Lib (links code to Webview) and DroidGap (for creating and deploying, Ruby based) assets/ www folder android manifest  - global setting
  • Create the page blocks for each page (Switch to IDE to show Code each function wise) Home screen My Preferences List Meetups Register Run in emulator (Switch to Emulator) Run on device  About Distribution
  • Audience Interaction - Get to know what apart from the functionality would they expect to enjoy using an App as Users
  • Audience Interaction - Get to know what apart from the functionality would they expect to enjoy using an App as Users
  • Mobile app development using PhoneGap - A comprehensive walkthrough - Touch Tour Chennai

    1. 1. Mobile App Development using PhoneGap - A Comprehensive Walk-through Gomathi Viswanathan & Vijesh K V Unimity Solutions Chennai
    2. 2. Lets Checkout an App!
    3. 3. Lets Checkout an App! <ul><li>What do Apps typically accomplish? </li></ul>Images Courtesy various Internet Sources Present Information Transmit Data to remote servers Access device APIs Capture and Save Information Handle Notifications
    4. 4. A Sample App - Meetup Updater <ul><li>Here is an App that will help you be updated with the Meetups of your preferred groups in & around your place </li></ul><ul><ul><ul><li>It fetches Meetup Details from a remote server </li></ul></ul></ul><ul><ul><ul><li>Has a local data store for your preferences </li></ul></ul></ul><ul><ul><ul><li>Send Data to Server - Register for an Event </li></ul></ul></ul><ul><ul><ul><li>Encompasses the typical navigational and user interaction elements </li></ul></ul></ul>
    5. 5. What is behind the scenes?  PhoneGap
    6. 6.   PhoneGap <ul><li>Is a Cross Platform Native Mobile App development framework </li></ul><ul><li>Leverages HTML, CSS and Javascript </li></ul><ul><li>Supports – Android, iOS, Blackberry, Symbian, Windows, WebOS, Bada and Palm </li></ul><ul><li>Has APIs for sensors and data  </li></ul><ul><li>Was recently acquired by Adobe and the current code base is to be submitted to Apache Software Foundation </li></ul>
    7. 7. PhoneGap Build <ul><li>PhoneGap Build an Online service to compile code blocks in HTML, CSS, JS to native apps without the need for the developer to work with the respective APIs </li></ul><ul><li>Without PhoneGap build, you need to download and work using different SDKs and builds. </li></ul><ul><li>Beta is free </li></ul>
    8. 8. Want to know how to get all this done?
    9. 9. Gearing Up for Development <ul><ul><li>Since the App is compiled as a Native application, respective SDKs for each platform needs to be installed. </li></ul></ul>Mac 10.6 OS computer Xcode Windows (or) Mac computer Android SDK AVD Eclipse and ADT plugin Windows Computer Apache Ant Sun JDK BB WebWorks SDK
    10. 10. The Nuts & Bolts
    11. 11. Getting Started <ul><li>PhoneGap is open web-standards based, which means you can run and test and test your App on any Webkit based Browser (Chrome, Safari) </li></ul><ul><li>The application creation is very similar to that of web pages creation, except for the installation and deployment stages. HTML, CSS and Javascript is all that you need from a programming perspective. </li></ul><ul><li>You can use Browser based debugging tools that are available as addons. Eg. FireBug </li></ul>
    12. 12. The Add-Ons <ul><li>Use popular JS plugin like JQuery (mobile version), mobile specific like jQTouch, Sencha. </li></ul><ul><li>Use Webkit specific pre-release implementation of certain CSS properties. </li></ul><ul><li>Use Local Storages </li></ul><ul><ul><li>Cookies for session maintenance </li></ul></ul><ul><ul><li>PhoneGap API – Web SQL database </li></ul></ul><ul><ul><li>HTML5 local Storage API is a breeze </li></ul></ul><ul><ul><li>Indexed storage option Indexed DB is upcoming </li></ul></ul><ul><li>Structure App in a MVC model </li></ul>
    13. 14. Environment Views <ul><li>Switching to IDE view (will be removed from slides) </li></ul>
    14. 15. Looking Inward – PhoneGap API Images Courtesy various Internet Sources
    15. 16. Looking Inward – PhoneGap API <ul><li>Accelerometer – Device motion sensor </li></ul><ul><li>Geolocation – GPS Sensor </li></ul><ul><li>Compass </li></ul><ul><li>Capture – audio, video and image capture capabilities </li></ul><ul><li>Camera </li></ul><ul><li>Media- Allows Record and Playback of Audio </li></ul><ul><li>Contacts database </li></ul><ul><li>File </li></ul><ul><li>Connection type </li></ul><ul><li>Device </li></ul><ul><li>Notification – Audio Visual and Tactile </li></ul>
    16. 17. <ul><li>Deviceready </li></ul><ul><li>Pause and Resume </li></ul><ul><li>Online and Offline </li></ul><ul><li>Menubutton </li></ul><ul><li>Searchbutton </li></ul><ul><li>Startcallbutton and endcallbutton </li></ul><ul><li>Volumedownbutton and volumeupbutton </li></ul>Core Events
    17. 18. Looking Outward - Linking to Remote Servers <ul><li>PhoneGap Applications can communicate with Remote web servers </li></ul><ul><ul><li>Remote servers can be public (meetup, twitter etc) (or) proprietary, eg. Any business app say a CRM APP may contact a central proprietary web server of the company. </li></ul></ul><ul><ul><li>Services can be RESTful API based (or) SOAP based </li></ul></ul><ul><ul><li>The response can be XML (or) JSON </li></ul></ul><ul><ul><li>The client can use XHR (Ajax HTTP request) </li></ul></ul><ul><ul><li>WebSockets are an emerging trend </li></ul></ul>
    18. 19. The Demo
    19. 20. Flow of Building and Deploying Courtesy
    20. 21. Code Aside – The design elements, best practices and testing
    21. 22. Visual Design <ul><li>User experience is enhanced when the App is Consistent in design and behavior with Native device. Eg. The menu style, notifications style. </li></ul><ul><li>This means some of the core design components and their consistency need to be maintained.  </li></ul><ul><ul><li>Fonts and Sizes </li></ul></ul><ul><ul><li>Icon Styles </li></ul></ul><ul><ul><li>Device Sizes and Resolutions </li></ul></ul><ul><ul><li>Notifications </li></ul></ul><ul><ul><li>Screen Navigation </li></ul></ul>
    22. 23. <ul><li>Data display </li></ul><ul><ul><li>Running Text </li></ul></ul><ul><ul><li>Categorized Text  </li></ul></ul><ul><ul><li>Images and Media </li></ul></ul><ul><ul><li>Scroll - Slide, with Thumbnail </li></ul></ul>Design Elements Images Courtesy various Internet Sources
    23. 24. <ul><li>Data capture options </li></ul><ul><ul><li>Text Boxes </li></ul></ul><ul><ul><li>Select Fields </li></ul></ul><ul><ul><li>Multi-Select </li></ul></ul>Design Elements Images Courtesy various Internet Sources
    24. 25. Testing your App <ul><li>The features testing at a unit level, needs to be done not only on the emulator, also at the device level. </li></ul><ul><li>Apart from testing for the functionality, pre-market submission checklists need to be applied </li></ul><ul><li>Testing of the Installation Process, Upgrades Workflow and Application fire-up are also equally critical </li></ul><ul><li>The response to external events like incoming calls and application state maintenance is at the outset taken care of by PhoneGap </li></ul>
    25. 26. References <ul><li>Looking for Support </li></ul><ul><ul><li>IRC Channel for JS, JQuery </li></ul></ul><ul><ul><li>Google PhoneGap group </li></ul></ul><ul><ul><li>iOS, Android communities on Social Networking Sites </li></ul></ul><ul><li>References made in this presentations </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li>Images from various internet sources </li></ul></ul>
    26. 27. Thank you.