SlideShare uma empresa Scribd logo
1 de 53
Baixar para ler offline
Mobile App Development
   From a Web Developer’s Perspective
Chris Morrell
                  http://cmorrell.com/
                  @inxilpro



Who the heck am I?
 And what gives me the right to act as
though I know what I’m talking about?
PhillyNewMediaHub.com
Today’s Mobile Technology
Today’s Mobile Technology
     • High-speed    Internet
      • Edge/3G:     100 Kbps–1.5 Mbps
      • Wifi:   10+ Mbps
     • Significant   processor speeds
     • Significant   graphical capabilities
     • Touch    interfaces
Today’s Mobile Technology




              WebKit
Today’s Mobile Technology


    These guys use WebKit too!




                   WebKit
Web App vs. Native App
Web App vs. Native App

            • Easy   to develop
            • Don’t   require approval
            • Maintained   centrally
            • Not   on App Store
            • Limitedto HTML/CSS/
             JavaScript capabilities
Web App vs. Native App

            • Better UI
            • Easy to develop
            • More powerful
            • Don’t require approval
            • More control
            • Maintained centrally
            • Access to GPU
            • Not on App Store
            • Costly to develop
            • Limited to HTML/CSS/
              JavaScript capabilities
            • Requires approval
Web App vs. Native App

            • Better UI
            • Easy to develop
            • More powerful
            • Don’t require approval
            • More control
            • Maintained centrally
            • Access to GPU
            • Not on App Store
            • Costly to develop
            • Limited to HTML/CSS/
              JavaScript capabilities
            • Requires approval
Web App
 ...vs. Mobile Website




  • Mobile   & Smartphone Stylesheets
  • Viewport   Definition
  • Optimized   Graphics
Technologies
• Objective-C   & Cocoa Touch (iPhone-only)
• Java   (Blackberry, Android, Symbian)
• Palm   Mojo [HTML5, JS, CSS + Dojo-based framework] (Palm-only)
• Visual   C#/Visual Basic/.NET (Windows Mobile-only)
• C++   (Symbian, Windows Mobile)
• HTML5,    JavaScript and CSS
• PhoneGap

• Titanium    Mobile
• Rhomobile
                                          Cross-platform w/ single API
Technologies
• Objective-C   & Cocoa Touch (iPhone-only)
• Java   (Blackberry, Android, Symbian)
• Palm   Mojo [HTML5, JS, CSS + Dojo-based framework] (Palm-only)
• Visual   C#/Visual Basic/.NET (Windows Mobile-only)
• C++   (Symbian, Windows Mobile)
• HTML5,    JavaScript and CSS
• PhoneGap

• Titanium    Mobile
• Rhomobile
                                          Cross-platform w/ single API
HTML5, JavaScript & CSS
HTML5, JavaScript & CSS
                       The basics



•   CSS2     “Handheld” Media Stylesheets
•   CSS3     Media Queries
•   Apple*   Viewport


              * Supported by several browsers, including mobile Firefox
HTML5, JavaScript & CSS
                     Advanced

•   HTML5   Offline Caching
•   HTML5   SQLite-compatible Offline Storage
•   CSS3    CSS Animations
•   W3C API Geolocation
•   HTML5   Canvas
*
      Mobile JS/CSS Frameworks
IUI                             jQTouch
(Older) iPhone UI clone         jQuery plugin for iPhone UI
http://code.google.com/p/iui/   http://www.jqtouch.com/
XUI                             Safire
Mobile-focused framework        iPhone UI clone
http://xuijs.com/               http://code.google.com/p/safire/
CiUI                            iWebKit
CNET’s iPhone UI clone          Extensive iPhone UI clone
http://bit.ly/5p4tMY            http://iwebkit.net/
UiUIKit                         WebApp.Net
CSS-only iPhone UI clone        iPhone UI clone + framework
http://bit.ly/7Qtnhx            http://webapp-net.com/
Magic Framework                 Dashcode
iPhone UI clone                 Apple’s Dashboard Toolkit
http://bit.ly/6zJ4eK            http://bit.ly/7sntmM
                                                          Not an exhaustive list
                                                      *
PhoneGap
PhoneGap
• WebKit-wrapper    application
• Consistent   APIs for device functions
 • Geolocation

 • Vibration

 • Accelerometer

 • Etc

• Supports   many devices
PhoneGap Device Support
                iPhone Android Blackberry Windows Symbian Palm Maemo

 Geo Location


    Vibration



Accelerometer



       Sound


      Contacs

                                                         Data from Jan 22, 2010

 Unknown or experimental
Titanium Mobile
Titanium Mobile
• Accelerometer

• Database

• Filesystem
                        +
• Geolocation       Native UI
                   Components
• Mapping

• Media

• Networking
Titanium 0.9/1.0
• iPad
     & Blackberry
                       • New   APIs
 support
• Less                  • Animation
     reliance on web
 views (slow)           • Streaming    Audio
• Dynamic   APIs        • Proximity    Sensor
• More   extensible     • Low-level    Graphics
• 5x+ performance       • Network     Streaming
 increases
PhoneGap vs. Titanium
• Easier   to start   • Mobile&
                       desktop
• Supports    more
 platforms            • Native   UI
                      • Poor
                       documentation



Both fully open source!
PhoneGap vs. Titanium


       Both HTML


         Faux-Native
     True Native
PhoneGap
Use When:
• Using just web technologies
• Targeting many devices



Titanium
Use When:
• Need native UI/functionality
• Targeting iPhone & Android
Objective-C/Cocoa Touch
Objective C/Cocoa Touch
• 100%    Native Application
• Full   native performance
• Access   to entire iPhone SDK & UI Components
• Interface   Builder
• iPhone/iPad-only

• Mac    development-only*
                 * No matter what you need a Mac to compile for iPhone
DEMO
!
    HTML5 Offline Caching
CACHE MANIFEST
# version 1.0
index.html




                  !
application.js
theme.css
sprites.png      Ack!
                 Code Ahead
NETWORK:
/api

FALLBACK:
/images/avatars/ /images/default-avatar.png
!
Ack!
Code
       Ahea
              d




                  HTML5 Offline Caching
         CACHE MANIFEST
         # version 1.0
         index.html
         application.js
         theme.css
         sprites.png

         NETWORK:
         /api

         FALLBACK:
         /images/avatars/ /images/default-avatar.png
!
             Mobile Stylesheets
    <!-- Main Stylesheet -->
    <link type="text/css" rel="stylesheet" href="screen.css"
      media="screen">

    <!-- Smartphone Stylesheet-->
    <link type="text/css" rel="stylesheet" href="smartphone.css"
      media="only screen and (max-device-width: 480px)">

    <!-- Handheld Stylesheet -->
    <link type="text/css" rel="stylesheet" href="handheld.css"
      media="handheld">




    • To
       account for Windows Mobile, conditional
     comments are required (not shown).
!
             Mobile Stylesheets
    <!-- Main Stylesheet -->
    <link type="text/css" rel="stylesheet" href="screen.css"
      media="screen">

    <!-- Smartphone Stylesheet-->
    <link type="text/css" rel="stylesheet" href="smartphone.css"
      media="only screen and (max-device-width: 480px)">

    <!-- Handheld Stylesheet -->
    <link type="text/css" rel="stylesheet" href="handheld.css"
      media="handheld">




    • To
       account for Windows Mobile, conditional
     comments are required (not shown).
!
             Mobile Stylesheets
    <!-- Main Stylesheet -->
    <link type="text/css" rel="stylesheet" href="screen.css"
      media="screen">

    <!-- Smartphone Stylesheet-->
    <link type="text/css" rel="stylesheet" href="smartphone.css"
      media="only screen and (max-device-width: 480px)">

    <!-- Handheld Stylesheet -->
    <link type="text/css" rel="stylesheet" href="handheld.css"
      media="handheld">




    • To
       account for Windows Mobile, conditional
     comments are required (not shown).
!
             Mobile Stylesheets
    <!-- Main Stylesheet -->
    <link type="text/css" rel="stylesheet" href="screen.css"
      media="screen">

    <!-- Smartphone Stylesheet-->
    <link type="text/css" rel="stylesheet" href="smartphone.css"
      media="only screen and (max-device-width: 480px)">

    <!-- Handheld Stylesheet -->
    <link type="text/css" rel="stylesheet" href="handheld.css"
      media="handheld">




    • To
       account for Windows Mobile, conditional
     comments are required (not shown).
!
             Viewport Scaling
<meta name="viewport"
   content= "width=320, initial-scale=2.3, user-scalable=no" />


• width

• height
                                  Tip:
• initial-scale                   When setting the width/height
                                  you can use “device-width” and
• minimum-scale                   “device-height” to match the
                                  size of the user’s device.

• maximum-scale

• user-scalable
!
           HTML5 SQLite Storage
 1   var db = openDatabase("Demo", "1.0");
 2   if (db) {
 3     db.transaction(function(tx) {
 4       tx.executeSql("SELECT * FROM demo", [], function(result) {
 5         // “result” contains all rows in “demo” table
 6       }, function(tx, error) {
 7            var sql = "CREATE TABLE demo (id INTEGER, demo TEXT)";
 8            tx.executeSql(sql, [], function(result) {
 9              // database created, now do something
10            });
11       });
12     });
13   } else {
14     alert("Unable to open database!");
15   }


                                                          Ack!
!
             CSS3 Transitions
div {
  opacity: 1;
  -webkit-transition-property: opacity;
  -webkit-transition-duration: 1s;
  -webkit-transition-timing-function: ease-in-out;
}
div:hover {
  opacity: 0;
}


• Properties:   none, all, <property>
• Timing:   ease, ease-in, ease-out, ease-in-out,
    cubic-bezier(x1, y1, x2, y2)
!
             Geolocation API
var options = {
   maximumAge: 60000
};

function gotPosition(p) {
  var lat = p.coords.latitude;
  var lon = p.coords.longitude;
}

function positionError(e) {
  var code = e.code;
}

navigator.geolocation.getCurrentPosition(gotPosition,
                                         positionError,
                                         options);
!
             Geolocation API
var options = {
   maximumAge: 60000
};

function gotPosition(p) {
  var lat = p.coords.latitude;
  var lon = p.coords.longitude;
}

function positionError(e) {
  var code = e.code;
}

navigator.geolocation.getCurrentPosition(gotPosition,
                                         positionError,
                                         options);
!
             Geolocation API
var options = {
   maximumAge: 60000
};

function gotPosition(p) {
  var lat = p.coords.latitude;
  var lon = p.coords.longitude;
}

function positionError(e) {
  var code = e.code;
}

navigator.geolocation.getCurrentPosition(gotPosition,
                                         positionError,
                                         options);
!
             Geolocation API
var options = {
   maximumAge: 60000
};

function gotPosition(p) {
  var lat = p.coords.latitude;
  var lon = p.coords.longitude;
}

function positionError(e) {
  var code = e.code;
}

navigator.geolocation.getCurrentPosition(gotPosition,
                                         positionError,
                                         options);
!
             Geolocation API
var options = {
   maximumAge: 60000
};

function gotPosition(p) {
  var lat = p.coords.latitude;
  var lon = p.coords.longitude;
}

function positionError(e) {
  var code = e.code;
}

navigator.geolocation.getCurrentPosition(gotPosition,
                                         positionError,
                                         options);
!
           Phone-Specific Tags


• apple-mobile-web-app-capable   (yes/no)
• apple-mobile-web-app-status-bar-style   (default,
    black, black-translucent)
• format-detection   (telephone=no)
PhillyNewMediaHub Mobile
!
             IUI Code Example
    <!-- Toolbar -->
    <div class="toolbar">
      <h1 id="pageTitle"></h1>
      <a id="backButton" class="button" href="#"></a>
    </div>

    <!-- Main Menu -->
    <ul id="home" title="Home" selected="true">
      <li><a href="#calendars">Calendars</a></li>
      <li><a href="#blogs">Blogs</a></li>
      <li><a href="#mailinglists">Mailing Lists</a></li>
      <li><a href="/iphone/about">About</a></li>
    </ul>

    <!-- Calendars -->
    <ul id="calendars" title="Calendars">
    </ul>
!
             IUI Code Example
    <!-- Toolbar -->
    <div class="toolbar">
      <h1 id="pageTitle"></h1>
      <a id="backButton" class="button" href="#"></a>
    </div>

    <!-- Main Menu -->
    <ul id="home" title="Home" selected="true">
      <li><a href="#calendars">Calendars</a></li>
      <li><a href="#blogs">Blogs</a></li>
      <li><a href="#mailinglists">Mailing Lists</a></li>
      <li><a href="/iphone/about">About</a></li>
    </ul>

    <!-- Calendars -->
    <ul id="calendars" title="Calendars">
    </ul>
!
             IUI Code Example
    <!-- Toolbar -->
    <div class="toolbar">
      <h1 id="pageTitle"></h1>
      <a id="backButton" class="button" href="#"></a>
    </div>

    <!-- Main Menu -->
    <ul id="home" title="Home" selected="true">
      <li><a href="#calendars">Calendars</a></li>
      <li><a href="#blogs">Blogs</a></li>
      <li><a href="#mailinglists">Mailing Lists</a></li>
      <li><a href="/iphone/about">About</a></li>
    </ul>

    <!-- Calendars -->
    <ul id="calendars" title="Calendars">
    </ul>
!
             IUI Code Example
    <!-- Toolbar -->
    <div class="toolbar">
      <h1 id="pageTitle"></h1>
      <a id="backButton" class="button" href="#"></a>
    </div>

    <!-- Main Menu -->
    <ul id="home" title="Home" selected="true">
      <li><a href="#calendars">Calendars</a></li>
      <li><a href="#blogs">Blogs</a></li>
      <li><a href="#mailinglists">Mailing Lists</a></li>
      <li><a href="/iphone/about">About</a></li>
    </ul>

    <!-- Calendars -->
    <ul id="calendars" title="Calendars">
    </ul>
Questions?
        Chris Morrell
          http://cmorrell.com/
          @inxilpro
Resources
•   Safari Mobile Web Programming: http://bit.ly/4Fkdnp
•   Viewport Meta Element: http://www.w3.org/TR/2010/CR-
    mwabp-20100211/#bp-viewport
•   CSS3 Media Queries: http://www.w3.org/TR/css3-mediaqueries/
•   PhoneGap: http://phonegap.com/
•   Titanium Mobile: http://www.appcelerator.com/
•   Apple iPhone Dev Center: http://developer.apple.com/iphone/
•   W3C Geolocation API: http://dev.w3.org/geo/api/spec-
    source.html
•   Offline Storage & Caching: http://bit.ly/bvlVJ8
•   CSS3 Transitions: http://webkit.org/blog/138/css-animation/

Mais conteúdo relacionado

Mais procurados

Mobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligenceMobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligence
Mobileapptelligence
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)
Ahsanul Karim
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
shikishiji
 

Mais procurados (20)

Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...
Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...
Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...
 
Mobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligenceMobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligence
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 
Android presantation
Android presantationAndroid presantation
Android presantation
 
mobile Os
mobile Osmobile Os
mobile Os
 
Android Operating System (Androrid OS)
Android Operating System (Androrid OS)Android Operating System (Androrid OS)
Android Operating System (Androrid OS)
 
Introduction to Mobile Development
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile Development
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)
 
Mobile Application Testing Training Presentation
Mobile Application Testing Training PresentationMobile Application Testing Training Presentation
Mobile Application Testing Training Presentation
 
Android vs iOS
Android vs iOSAndroid vs iOS
Android vs iOS
 
History of mobile apps
History of mobile appsHistory of mobile apps
History of mobile apps
 
Hybrid Mobile App
Hybrid Mobile AppHybrid Mobile App
Hybrid Mobile App
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Tk2323 lecture 1 introduction to mobile application
Tk2323 lecture 1   introduction to mobile applicationTk2323 lecture 1   introduction to mobile application
Tk2323 lecture 1 introduction to mobile application
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
 
Mobile application development React Native - Tidepool Labs
Mobile application development React Native - Tidepool LabsMobile application development React Native - Tidepool Labs
Mobile application development React Native - Tidepool Labs
 
Android ppt
Android pptAndroid ppt
Android ppt
 

Destaque

Introduction to Computer Applications
Introduction to Computer ApplicationsIntroduction to Computer Applications
Introduction to Computer Applications
Najma Alam
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android application
Atibur Rahman
 

Destaque (20)

Mobile technologies in libraries matt borg - sheffield hallam
Mobile technologies in libraries   matt borg - sheffield hallamMobile technologies in libraries   matt borg - sheffield hallam
Mobile technologies in libraries matt borg - sheffield hallam
 
Mobile applications chapter 5
Mobile applications chapter 5Mobile applications chapter 5
Mobile applications chapter 5
 
Designing & Developing for the Future of Mobile
Designing & Developing for the Future of MobileDesigning & Developing for the Future of Mobile
Designing & Developing for the Future of Mobile
 
HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기
 
Mobile Web Interface
Mobile Web InterfaceMobile Web Interface
Mobile Web Interface
 
Panel IUI by DR SHASHWAT JANI ( Optimizing Success in Intrauterine Inseminati...
Panel IUI by DR SHASHWAT JANI ( Optimizing Success in Intrauterine Inseminati...Panel IUI by DR SHASHWAT JANI ( Optimizing Success in Intrauterine Inseminati...
Panel IUI by DR SHASHWAT JANI ( Optimizing Success in Intrauterine Inseminati...
 
Mobile Application Design & Development
Mobile Application Design & DevelopmentMobile Application Design & Development
Mobile Application Design & Development
 
Introduction to Computer Applications
Introduction to Computer ApplicationsIntroduction to Computer Applications
Introduction to Computer Applications
 
HiQ v Linkedin
HiQ v LinkedinHiQ v Linkedin
HiQ v Linkedin
 
Wipro Infrastructure Engineering Company Presentation - July, 2015
Wipro Infrastructure Engineering Company Presentation -  July, 2015Wipro Infrastructure Engineering Company Presentation -  July, 2015
Wipro Infrastructure Engineering Company Presentation - July, 2015
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android application
 
Mobile apps marketing
Mobile apps marketingMobile apps marketing
Mobile apps marketing
 
Understand front end developer
Understand front end developerUnderstand front end developer
Understand front end developer
 
Dictionary to Cloud, Buzz and more EN>SE
Dictionary to Cloud, Buzz and more EN>SEDictionary to Cloud, Buzz and more EN>SE
Dictionary to Cloud, Buzz and more EN>SE
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in Magento
 
Eng Semcon Brains Folder 2010
Eng Semcon Brains Folder 2010Eng Semcon Brains Folder 2010
Eng Semcon Brains Folder 2010
 
IoT Analytics company presentation
IoT Analytics company presentationIoT Analytics company presentation
IoT Analytics company presentation
 
Operating system
Operating system Operating system
Operating system
 
Module 2
Module 2Module 2
Module 2
 
Module 3
Module 3Module 3
Module 3
 

Semelhante a Mobile App Development

Best Mobile App Development Services in India
Best Mobile App Development Services in IndiaBest Mobile App Development Services in India
Best Mobile App Development Services in India
Steve Verma
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
Mihail Mateev
 
Creating mobile apps without native code
Creating mobile apps without native codeCreating mobile apps without native code
Creating mobile apps without native code
Joakim Kemeny
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
davyjones
 
Hybrid mobile application with Ionic
Hybrid mobile application with IonicHybrid mobile application with Ionic
Hybrid mobile application with Ionic
Maulik Bamania
 

Semelhante a Mobile App Development (20)

The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developer
 
Best Mobile App Development Services in India
Best Mobile App Development Services in IndiaBest Mobile App Development Services in India
Best Mobile App Development Services in India
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Web app
Web appWeb app
Web app
 
Web app
Web appWeb app
Web app
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
移动端Web app开发
移动端Web app开发移动端Web app开发
移动端Web app开发
 
Creating mobile apps without native code
Creating mobile apps without native codeCreating mobile apps without native code
Creating mobile apps without native code
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
HTML5 and the Mobile Web
HTML5 and the Mobile WebHTML5 and the Mobile Web
HTML5 and the Mobile Web
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High Performance
 
Mobile Web Apps Overview
Mobile Web Apps OverviewMobile Web Apps Overview
Mobile Web Apps Overview
 
Hybrid mobile application with Ionic
Hybrid mobile application with IonicHybrid mobile application with Ionic
Hybrid mobile application with Ionic
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
CM WebClient CA Expo Mannheim Germany
CM WebClient CA Expo Mannheim Germany CM WebClient CA Expo Mannheim Germany
CM WebClient CA Expo Mannheim Germany
 
chapter2
chapter2chapter2
chapter2
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Mobile App Development

  • 1. Mobile App Development From a Web Developer’s Perspective
  • 2. Chris Morrell http://cmorrell.com/ @inxilpro Who the heck am I? And what gives me the right to act as though I know what I’m talking about?
  • 3.
  • 6. Today’s Mobile Technology • High-speed Internet • Edge/3G: 100 Kbps–1.5 Mbps • Wifi: 10+ Mbps • Significant processor speeds • Significant graphical capabilities • Touch interfaces
  • 8. Today’s Mobile Technology These guys use WebKit too! WebKit
  • 9. Web App vs. Native App
  • 10. Web App vs. Native App • Easy to develop • Don’t require approval • Maintained centrally • Not on App Store • Limitedto HTML/CSS/ JavaScript capabilities
  • 11. Web App vs. Native App • Better UI • Easy to develop • More powerful • Don’t require approval • More control • Maintained centrally • Access to GPU • Not on App Store • Costly to develop • Limited to HTML/CSS/ JavaScript capabilities • Requires approval
  • 12. Web App vs. Native App • Better UI • Easy to develop • More powerful • Don’t require approval • More control • Maintained centrally • Access to GPU • Not on App Store • Costly to develop • Limited to HTML/CSS/ JavaScript capabilities • Requires approval
  • 13. Web App ...vs. Mobile Website • Mobile & Smartphone Stylesheets • Viewport Definition • Optimized Graphics
  • 14. Technologies • Objective-C & Cocoa Touch (iPhone-only) • Java (Blackberry, Android, Symbian) • Palm Mojo [HTML5, JS, CSS + Dojo-based framework] (Palm-only) • Visual C#/Visual Basic/.NET (Windows Mobile-only) • C++ (Symbian, Windows Mobile) • HTML5, JavaScript and CSS • PhoneGap • Titanium Mobile • Rhomobile Cross-platform w/ single API
  • 15. Technologies • Objective-C & Cocoa Touch (iPhone-only) • Java (Blackberry, Android, Symbian) • Palm Mojo [HTML5, JS, CSS + Dojo-based framework] (Palm-only) • Visual C#/Visual Basic/.NET (Windows Mobile-only) • C++ (Symbian, Windows Mobile) • HTML5, JavaScript and CSS • PhoneGap • Titanium Mobile • Rhomobile Cross-platform w/ single API
  • 17. HTML5, JavaScript & CSS The basics • CSS2 “Handheld” Media Stylesheets • CSS3 Media Queries • Apple* Viewport * Supported by several browsers, including mobile Firefox
  • 18. HTML5, JavaScript & CSS Advanced • HTML5 Offline Caching • HTML5 SQLite-compatible Offline Storage • CSS3 CSS Animations • W3C API Geolocation • HTML5 Canvas
  • 19. * Mobile JS/CSS Frameworks IUI jQTouch (Older) iPhone UI clone jQuery plugin for iPhone UI http://code.google.com/p/iui/ http://www.jqtouch.com/ XUI Safire Mobile-focused framework iPhone UI clone http://xuijs.com/ http://code.google.com/p/safire/ CiUI iWebKit CNET’s iPhone UI clone Extensive iPhone UI clone http://bit.ly/5p4tMY http://iwebkit.net/ UiUIKit WebApp.Net CSS-only iPhone UI clone iPhone UI clone + framework http://bit.ly/7Qtnhx http://webapp-net.com/ Magic Framework Dashcode iPhone UI clone Apple’s Dashboard Toolkit http://bit.ly/6zJ4eK http://bit.ly/7sntmM Not an exhaustive list *
  • 21. PhoneGap • WebKit-wrapper application • Consistent APIs for device functions • Geolocation • Vibration • Accelerometer • Etc • Supports many devices
  • 22. PhoneGap Device Support iPhone Android Blackberry Windows Symbian Palm Maemo Geo Location Vibration Accelerometer Sound Contacs Data from Jan 22, 2010 Unknown or experimental
  • 24. Titanium Mobile • Accelerometer • Database • Filesystem + • Geolocation Native UI Components • Mapping • Media • Networking
  • 25. Titanium 0.9/1.0 • iPad & Blackberry • New APIs support • Less • Animation reliance on web views (slow) • Streaming Audio • Dynamic APIs • Proximity Sensor • More extensible • Low-level Graphics • 5x+ performance • Network Streaming increases
  • 26. PhoneGap vs. Titanium • Easier to start • Mobile& desktop • Supports more platforms • Native UI • Poor documentation Both fully open source!
  • 27. PhoneGap vs. Titanium Both HTML Faux-Native True Native
  • 28. PhoneGap Use When: • Using just web technologies • Targeting many devices Titanium Use When: • Need native UI/functionality • Targeting iPhone & Android
  • 30. Objective C/Cocoa Touch • 100% Native Application • Full native performance • Access to entire iPhone SDK & UI Components • Interface Builder • iPhone/iPad-only • Mac development-only* * No matter what you need a Mac to compile for iPhone
  • 31. DEMO
  • 32. ! HTML5 Offline Caching CACHE MANIFEST # version 1.0 index.html ! application.js theme.css sprites.png Ack! Code Ahead NETWORK: /api FALLBACK: /images/avatars/ /images/default-avatar.png
  • 33. ! Ack! Code Ahea d HTML5 Offline Caching CACHE MANIFEST # version 1.0 index.html application.js theme.css sprites.png NETWORK: /api FALLBACK: /images/avatars/ /images/default-avatar.png
  • 34. ! Mobile Stylesheets <!-- Main Stylesheet --> <link type="text/css" rel="stylesheet" href="screen.css" media="screen"> <!-- Smartphone Stylesheet--> <link type="text/css" rel="stylesheet" href="smartphone.css" media="only screen and (max-device-width: 480px)"> <!-- Handheld Stylesheet --> <link type="text/css" rel="stylesheet" href="handheld.css" media="handheld"> • To account for Windows Mobile, conditional comments are required (not shown).
  • 35. ! Mobile Stylesheets <!-- Main Stylesheet --> <link type="text/css" rel="stylesheet" href="screen.css" media="screen"> <!-- Smartphone Stylesheet--> <link type="text/css" rel="stylesheet" href="smartphone.css" media="only screen and (max-device-width: 480px)"> <!-- Handheld Stylesheet --> <link type="text/css" rel="stylesheet" href="handheld.css" media="handheld"> • To account for Windows Mobile, conditional comments are required (not shown).
  • 36. ! Mobile Stylesheets <!-- Main Stylesheet --> <link type="text/css" rel="stylesheet" href="screen.css" media="screen"> <!-- Smartphone Stylesheet--> <link type="text/css" rel="stylesheet" href="smartphone.css" media="only screen and (max-device-width: 480px)"> <!-- Handheld Stylesheet --> <link type="text/css" rel="stylesheet" href="handheld.css" media="handheld"> • To account for Windows Mobile, conditional comments are required (not shown).
  • 37. ! Mobile Stylesheets <!-- Main Stylesheet --> <link type="text/css" rel="stylesheet" href="screen.css" media="screen"> <!-- Smartphone Stylesheet--> <link type="text/css" rel="stylesheet" href="smartphone.css" media="only screen and (max-device-width: 480px)"> <!-- Handheld Stylesheet --> <link type="text/css" rel="stylesheet" href="handheld.css" media="handheld"> • To account for Windows Mobile, conditional comments are required (not shown).
  • 38. ! Viewport Scaling <meta name="viewport" content= "width=320, initial-scale=2.3, user-scalable=no" /> • width • height Tip: • initial-scale When setting the width/height you can use “device-width” and • minimum-scale “device-height” to match the size of the user’s device. • maximum-scale • user-scalable
  • 39. ! HTML5 SQLite Storage 1 var db = openDatabase("Demo", "1.0"); 2 if (db) { 3 db.transaction(function(tx) { 4 tx.executeSql("SELECT * FROM demo", [], function(result) { 5 // “result” contains all rows in “demo” table 6 }, function(tx, error) { 7 var sql = "CREATE TABLE demo (id INTEGER, demo TEXT)"; 8 tx.executeSql(sql, [], function(result) { 9 // database created, now do something 10 }); 11 }); 12 }); 13 } else { 14 alert("Unable to open database!"); 15 } Ack!
  • 40. ! CSS3 Transitions div { opacity: 1; -webkit-transition-property: opacity; -webkit-transition-duration: 1s; -webkit-transition-timing-function: ease-in-out; } div:hover { opacity: 0; } • Properties: none, all, <property> • Timing: ease, ease-in, ease-out, ease-in-out, cubic-bezier(x1, y1, x2, y2)
  • 41. ! Geolocation API var options = { maximumAge: 60000 }; function gotPosition(p) { var lat = p.coords.latitude; var lon = p.coords.longitude; } function positionError(e) { var code = e.code; } navigator.geolocation.getCurrentPosition(gotPosition, positionError, options);
  • 42. ! Geolocation API var options = { maximumAge: 60000 }; function gotPosition(p) { var lat = p.coords.latitude; var lon = p.coords.longitude; } function positionError(e) { var code = e.code; } navigator.geolocation.getCurrentPosition(gotPosition, positionError, options);
  • 43. ! Geolocation API var options = { maximumAge: 60000 }; function gotPosition(p) { var lat = p.coords.latitude; var lon = p.coords.longitude; } function positionError(e) { var code = e.code; } navigator.geolocation.getCurrentPosition(gotPosition, positionError, options);
  • 44. ! Geolocation API var options = { maximumAge: 60000 }; function gotPosition(p) { var lat = p.coords.latitude; var lon = p.coords.longitude; } function positionError(e) { var code = e.code; } navigator.geolocation.getCurrentPosition(gotPosition, positionError, options);
  • 45. ! Geolocation API var options = { maximumAge: 60000 }; function gotPosition(p) { var lat = p.coords.latitude; var lon = p.coords.longitude; } function positionError(e) { var code = e.code; } navigator.geolocation.getCurrentPosition(gotPosition, positionError, options);
  • 46. ! Phone-Specific Tags • apple-mobile-web-app-capable (yes/no) • apple-mobile-web-app-status-bar-style (default, black, black-translucent) • format-detection (telephone=no)
  • 48. ! IUI Code Example <!-- Toolbar --> <div class="toolbar"> <h1 id="pageTitle"></h1> <a id="backButton" class="button" href="#"></a> </div> <!-- Main Menu --> <ul id="home" title="Home" selected="true"> <li><a href="#calendars">Calendars</a></li> <li><a href="#blogs">Blogs</a></li> <li><a href="#mailinglists">Mailing Lists</a></li> <li><a href="/iphone/about">About</a></li> </ul> <!-- Calendars --> <ul id="calendars" title="Calendars"> </ul>
  • 49. ! IUI Code Example <!-- Toolbar --> <div class="toolbar"> <h1 id="pageTitle"></h1> <a id="backButton" class="button" href="#"></a> </div> <!-- Main Menu --> <ul id="home" title="Home" selected="true"> <li><a href="#calendars">Calendars</a></li> <li><a href="#blogs">Blogs</a></li> <li><a href="#mailinglists">Mailing Lists</a></li> <li><a href="/iphone/about">About</a></li> </ul> <!-- Calendars --> <ul id="calendars" title="Calendars"> </ul>
  • 50. ! IUI Code Example <!-- Toolbar --> <div class="toolbar"> <h1 id="pageTitle"></h1> <a id="backButton" class="button" href="#"></a> </div> <!-- Main Menu --> <ul id="home" title="Home" selected="true"> <li><a href="#calendars">Calendars</a></li> <li><a href="#blogs">Blogs</a></li> <li><a href="#mailinglists">Mailing Lists</a></li> <li><a href="/iphone/about">About</a></li> </ul> <!-- Calendars --> <ul id="calendars" title="Calendars"> </ul>
  • 51. ! IUI Code Example <!-- Toolbar --> <div class="toolbar"> <h1 id="pageTitle"></h1> <a id="backButton" class="button" href="#"></a> </div> <!-- Main Menu --> <ul id="home" title="Home" selected="true"> <li><a href="#calendars">Calendars</a></li> <li><a href="#blogs">Blogs</a></li> <li><a href="#mailinglists">Mailing Lists</a></li> <li><a href="/iphone/about">About</a></li> </ul> <!-- Calendars --> <ul id="calendars" title="Calendars"> </ul>
  • 52. Questions? Chris Morrell http://cmorrell.com/ @inxilpro
  • 53. Resources • Safari Mobile Web Programming: http://bit.ly/4Fkdnp • Viewport Meta Element: http://www.w3.org/TR/2010/CR- mwabp-20100211/#bp-viewport • CSS3 Media Queries: http://www.w3.org/TR/css3-mediaqueries/ • PhoneGap: http://phonegap.com/ • Titanium Mobile: http://www.appcelerator.com/ • Apple iPhone Dev Center: http://developer.apple.com/iphone/ • W3C Geolocation API: http://dev.w3.org/geo/api/spec- source.html • Offline Storage & Caching: http://bit.ly/bvlVJ8 • CSS3 Transitions: http://webkit.org/blog/138/css-animation/