SlideShare une entreprise Scribd logo
1  sur  90
Rails for mobile devices
Alberto Perdomo




                  Conferencia Rails 2011
Mobile devices
Blackberry
Nokia
Palm
Kindle
Windows Phone
Issues
User Interface
Screen

Different sizes and resolutions

Different orientations: portrait vs. landscape

Zooming
Touch interfaces
Touch interfaces
Small font size, little space between links

No hover

Gestures events vs. mouse events
The network
Heavy websites
Unsused assets
1 big asset vs. several smaller ones
Solutions
User Interface
Width
<!DOCTYPE html>
<html>
<head>
    <title>Hello world!</title>
</head>

<body>
<p>Hello world!</p>
</body>
Viewport meta tag


<meta name="viewport"
      content="width=device-width, initial-scale=1">




         Separated by commas, not semicolons!!!
Responsive Web Designs


     http://mediaqueri.es/
Fluid layouts and styles
depending on width & device
         capabilities
Simon Collison: http://colly.com/
Andersson-Wise Architects: http://www.anderssonwise.com/
Conferencia Rails by @mamuso: http://conferenciarails.org/
Media Queries
     W3C Candidate Recommendation
 http://www.w3.org/TR/css3-mediaqueries/
Examples
block for > 900px

@media screen and (min-width: 900px) {
  // styles for bigger displays
}


or separate CSS file

<link rel="stylesheet" media="screen and (max-width: 600px)" href="small.css" />


tablets

<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
Frameworks
http://www.sencha.com/products/touch/
   open source + commercial licenses
demos.Forms = new Ext.TabPanel({
    items: [{
        title: 'Basic',
        xtype: 'form',
        id: 'basicform',
        scroll: 'vertical',
        items: [{
            xtype: 'fieldset',
            title: 'Personal Info',
            instructions: 'Please enter the information above.',
            defaults: {
                 // labelAlign: 'right'
                 labelWidth: '35%'
            },
            items: [{
                 xtype: 'textfield',
                 name: 'name',
                 label: 'Name',
                 placeHolder: 'Tom Roy',
                 autoCapitalize : true,
                 required: true,
                 useClearIcon: true
            }, {
                 // ...
Javascript

        DOM

Unified User Interface
Clean semantic markup
          +
      Javascript

Unified User Interface
Features
jQuery                    Progressive
                          enhancement
Cross-platform
                          Accessibility
Lightweight (~12K comp)

HTML5
Crossbrowser Experience
<!DOCTYPE html>
<html>
  <head>
  <title>Page Title</title>
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
  <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
  <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
</head>
<body>

...

</body>
</html>
Anatomy of a page

<div data-role="page">
  <div data-role="header">...</div>
  <div data-role="content">...</div>
  <div data-role="footer">...</div>
</div>
Example: Single Page
<body>

<div data-role="page">

  <div data-role="header">
    <h1>Page Title</h1>
  </div><!-- /header -->

  <div data-role="content">
    <p>Page content goes here.</p>
  </div><!-- /content -->

  <div data-role="footer">
    <h4>Page Footer</h4>
  </div><!-- /footer -->
</div><!-- /page -->
Example: local linked pages
 <div data-role="page" id="foo" >

   <div data-role="header">
     <h1>Foo</h1>
   </div><!-- /header -->

   <div data-role="content">                                          When loading the HTML page
     <p>I'm first in the source order so I'm shown as the page.</p>   the first page is autom. shown
     <p>View internal page called <a href="#bar">bar</a></p>
   </div><!-- /content -->                                            and the rest hidden
   <div data-role="footer">
     <h4>Page Footer</h4>
   </div><!-- /footer -->

 </div>



 <div data-role="page" id="bar" >
                                                                      When following a link to a local
    ...                                                               linked page, there is an animated
 </div>                                                               transition
Other stuff
Components: Lists, Buttons, Dialogs, Grid, ...

Hijax / Ajax

Page transitions / Animations

Theming

Dual license: MIT or GPL version 2
The Network
Pa! I:   "e manifest
At its simplest, an offline web application is a
list of URLs — HTML, CSS, JavaScript, images,
           or any other kind of resource.




                                 http://diveintohtml5.org/offline.html#divingin
Support

IE   Firefox   Safari   Chrome   Opera   iPhone   Android



-     3.5+     4.0+      5.0+    10.6+    2.1+     2.0+
Basic example
/index.html

<!DOCTYPE HTML>
<html manifest="/offline.appcache" >
<body>
...

/offline.appcache         Content type: text/cache-manifest !!!

CACHE MANIFEST
/screen.css
/application.js
/logo.png
Anatomy of a manifest
  <name>.appcache

   CACHE MANIFEST


   CACHE
   /css/screen.css
   /css/offline.css                       List of files to cache
   /images/logo.png
   http://example.com/code.js


   FALLBACK
                                          List of files to fall back
   / /offline.html
                                          in case not available
   /images/avatars/ /offline_avatar.png


   NETWORK                                Online whitelist, never
   /track.cgi                             cached
Cache what?

                           Place        All pages must be included
 Read         Browse
                          purchase
messages      articles
                           orders
                                        Reference to manifest in each
                                        of them
                           Send
Read news
                          messages      The page that triggers the
                                        download of the manifest file
    Offline & online       Online only   does not to be included
A more complex example
                 All pages



    CACHE MANIFEST

                             Fallback for offline
    FALLBACK
    / /offline.html          pages


    NETWORK
                             Allow to browse
    *                        other pages when
                             online
Manifest: Status
 status (returns boolean)
 navigator.onLine



 callbacks
 ononline
 onoffline
Manifest: DOM & Events
object                        events
window.applicationCache       checking
                              downloading
                              progress
                              cached
                              noupdate
                              updateready


reload new cache after updateready

window.applicationCache.swapCache()
Manifest: DOM & Events
                                                          manifest
                                                           attr in
                                                            <html>


                                                               Event: checking

Event:                                                                                         Event:
progress                                                                                       progress

                           yes                   no                  yes
           Download                                        first
                                    changed?                                       Download
                                                           time?
                      Event:                                         Event:
                      downloading                                    downloading
      Event:                                                                            Event: cached
                                    no   Event: noupdate
 updateready




                                               Finished
Rack Offline
              by
          Yehuda Katz



https://github.com/wycats/rack-offline
Automated
Mobile::Application.routes.draw do
  match "/application.manifest" => Rails::Offline


Automatically caches all JS, CSS & HTML in public

In development: include SHA based on timestamp to force
reload

In production: include SHA based on underlying assets
Custom manifest

Mobile::Application.routes.draw do
  offline = Rack::Offline.configure do
    cache [ "http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css",
            "http://code.jquery.com/mobile/1.0b1/images/icons-18-white.png",
            "http://code.jquery.com/mobile/1.0b1/images/ajax-loader.png",
            "http://code.jquery.com/jquery-1.6.1.min.js",
            "http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js",
            "favicon.ico"]
    network "*"
  end

  match "/offline.appcache" => offline
  # ...
Debugging
Part II: Storage
Local Storage
Implemented natively in the browsers

Key/Value store

Persistence

Never sent to server (unlike cookies)

Supported in common browsers, even IE > 8.0
Details
5MB by default

acessible through localStorage object

key: String, value: Any JS supported type

Use parseInt, parseFloat, ... to retrieve objects

Synchronous API
Examples
Read/Write
var foo = localStorage["bar"];

localStorage["bar"] = foo;

Clear key
localStorage.removeItem("bar");


Empty storage
localStorage.clear();
Competitors: WebSQL
SQL database in the browser

SQLite

Implemented by some browsers: Safari, Chrome, Webkit

Asynchronous API

Requires more code but is also more powerful
Competitors: IndexedDB

   No standard Query Language

   Access through API functions

   Very early stage, not yet usable
Toolbox
Detect requests from mobile devices in your Rails app

      https://github.com/brendanlim/mobile-fu

    https://github.com/shenoudab/active_device
Rails helpers for jQuery Mobile

https://github.com/Consoci8/jqmobile_helpers

https://github.com/wakeless/rails-jquery-mobile
Manifest

https://github.com/wycats/rack-offline
Modernizr

http://modernizr.com/
Examples
Google




http://mail.google.com
Wanderlust Stories




  http://wanderluststories.com/
Testflight




https://testflightapp.com/
PieGuy




http://mrgan.com/pieguy
Movie Times




http://andrew.harrison.org/movies/
Harmonious




http://harmoniousapp.com/app/
Conclusions
Native apps vs. Web apps
Benefits of Native Apps
Performance

User Experience

Installation

Monetization options

Distribution & Market visibility
Benefits of Web Apps
Interoperability & cross platform

Installation & deployment options

URLs

Shorter Time to Market

Deploy instantly, no approval process

Your skills
Resources
Dive Into HTML5
            by

       Mark Pilgrim

  http://diveintohtml5.org
Introducing HTML5
              by

 Bruce Lawson and Remy Sharp

  http://introducinghtml5.com/
HTML5 Demos
               by

           Remy Sharp

      http://html5demos.com

https://github.com/remy/html5demos
Mobilizer
               from

            SpringBox

http://www.springbox.com/mobilizer/
Thanks.


@albertoperdomo
alberto.perdomo @aentos.com
Questions.
Creative Commons
                                     Title                                                  Author                             URL

iPad vs iPhone                                                                 Julien GONG Min         http://www.flickr.com/photos/bfishadow/4604166391/


No worries                                                                                             http://www.flickr.com/photos/uggboy/5382476400/

Just Care Baby
                                                                               John Martinez Pavliga   http://www.flickr.com/photos/virtualsugar/4590816785/

godzilla-anatomy
                                                                               Joe Wu                  http://www.flickr.com/photos/ozzywu1974/5143458938/

Manifest of Alien Passengers SS Ultonia Southampton(Apr.22, 1913) - Quebec
                                                                               Brent                   http://www.flickr.com/photos/stupiddingo/3728417282/
(May 8, 1913) 1 of 2

Pain                                                                           Nathan Phillips         http://www.flickr.com/photos/npphoto/4383990220/

                                                                                                       http://www.flickr.com/photos/kalleboo/3277120428/
Storage                                                                        Karl Baron

Jocelyn Foye - Sumo - Face Off - Gateway Japan @ Torrance Art Museum (small)                           http://www.flickr.com/photos/lifeontheedge/5565245900/


box wrenches                                                                   S. Diddy                http://www.flickr.com/photos/spence_sir/2292721218/

Contenu connexe

Tendances

An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOSKevin Decker
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
State And Ajax Zend Con
State And Ajax   Zend ConState And Ajax   Zend Con
State And Ajax Zend ConZendCon
 
JavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsJavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsBen Combee
 
Extreme Ria Using Dnn
Extreme Ria Using DnnExtreme Ria Using Dnn
Extreme Ria Using Dnnschafer_brad
 
Front-end optimisation & jQuery Internals (Pycon)
Front-end optimisation & jQuery Internals (Pycon)Front-end optimisation & jQuery Internals (Pycon)
Front-end optimisation & jQuery Internals (Pycon)Artur Cistov
 
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Baruch Sadogursky
 
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011Patrick Lauke
 
Crossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocialCrossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocialBastian Hofmann
 
Optaros Surf Code Camp Lab 3
Optaros Surf Code Camp Lab 3Optaros Surf Code Camp Lab 3
Optaros Surf Code Camp Lab 3Jeff Potts
 
QuickConnect
QuickConnectQuickConnect
QuickConnectAnnu G
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSFITC
 
Optaros Surf Code Camp Lab 2
Optaros Surf Code Camp Lab 2Optaros Surf Code Camp Lab 2
Optaros Surf Code Camp Lab 2Jeff Potts
 
Optaros Surf Code Camp Introduction
Optaros Surf Code Camp IntroductionOptaros Surf Code Camp Introduction
Optaros Surf Code Camp IntroductionJeff Potts
 
Optaros Surf Code Camp Lab 4
Optaros Surf Code Camp Lab 4Optaros Surf Code Camp Lab 4
Optaros Surf Code Camp Lab 4Jeff Potts
 

Tendances (20)

An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
ICEfaces and JSF 2.0 on GlassFish
ICEfaces and JSF 2.0 on GlassFishICEfaces and JSF 2.0 on GlassFish
ICEfaces and JSF 2.0 on GlassFish
 
State And Ajax Zend Con
State And Ajax   Zend ConState And Ajax   Zend Con
State And Ajax Zend Con
 
Jsf2 html5-jazoon
Jsf2 html5-jazoonJsf2 html5-jazoon
Jsf2 html5-jazoon
 
JavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsJavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.js
 
Extreme Ria Using Dnn
Extreme Ria Using DnnExtreme Ria Using Dnn
Extreme Ria Using Dnn
 
Always on! ... or not?
Always on! ... or not?Always on! ... or not?
Always on! ... or not?
 
Front-end optimisation & jQuery Internals (Pycon)
Front-end optimisation & jQuery Internals (Pycon)Front-end optimisation & jQuery Internals (Pycon)
Front-end optimisation & jQuery Internals (Pycon)
 
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
 
Echo HTML5
Echo HTML5Echo HTML5
Echo HTML5
 
Crossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocialCrossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocial
 
Optaros Surf Code Camp Lab 3
Optaros Surf Code Camp Lab 3Optaros Surf Code Camp Lab 3
Optaros Surf Code Camp Lab 3
 
QuickConnect
QuickConnectQuickConnect
QuickConnect
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
 
Optaros Surf Code Camp Lab 2
Optaros Surf Code Camp Lab 2Optaros Surf Code Camp Lab 2
Optaros Surf Code Camp Lab 2
 
Optaros Surf Code Camp Introduction
Optaros Surf Code Camp IntroductionOptaros Surf Code Camp Introduction
Optaros Surf Code Camp Introduction
 
Optaros Surf Code Camp Lab 4
Optaros Surf Code Camp Lab 4Optaros Surf Code Camp Lab 4
Optaros Surf Code Camp Lab 4
 

En vedette

Curso TDD Ruby on Rails #02: Test Driven Development
Curso TDD Ruby on Rails #02: Test Driven DevelopmentCurso TDD Ruby on Rails #02: Test Driven Development
Curso TDD Ruby on Rails #02: Test Driven DevelopmentAlberto Perdomo
 
Curso TDD Ruby on Rails #01: Introducción al testing
Curso TDD Ruby on Rails #01: Introducción al testingCurso TDD Ruby on Rails #01: Introducción al testing
Curso TDD Ruby on Rails #01: Introducción al testingAlberto Perdomo
 
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Alberto Perdomo
 
API REST conceptos (Rails-api)
API REST conceptos (Rails-api)API REST conceptos (Rails-api)
API REST conceptos (Rails-api)Daryl Moreno
 
Curso TDD Ruby on Rails #03: Tests unitarios
Curso TDD Ruby on Rails #03: Tests unitariosCurso TDD Ruby on Rails #03: Tests unitarios
Curso TDD Ruby on Rails #03: Tests unitariosAlberto Perdomo
 

En vedette (6)

Curso TDD Ruby on Rails #02: Test Driven Development
Curso TDD Ruby on Rails #02: Test Driven DevelopmentCurso TDD Ruby on Rails #02: Test Driven Development
Curso TDD Ruby on Rails #02: Test Driven Development
 
El pequeño se hace mayor
El pequeño se hace mayor El pequeño se hace mayor
El pequeño se hace mayor
 
Curso TDD Ruby on Rails #01: Introducción al testing
Curso TDD Ruby on Rails #01: Introducción al testingCurso TDD Ruby on Rails #01: Introducción al testing
Curso TDD Ruby on Rails #01: Introducción al testing
 
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
 
API REST conceptos (Rails-api)
API REST conceptos (Rails-api)API REST conceptos (Rails-api)
API REST conceptos (Rails-api)
 
Curso TDD Ruby on Rails #03: Tests unitarios
Curso TDD Ruby on Rails #03: Tests unitariosCurso TDD Ruby on Rails #03: Tests unitarios
Curso TDD Ruby on Rails #03: Tests unitarios
 

Similaire à Rails for Mobile Devices @ Conferencia Rails 2011

Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
Real World Seaside Applications
Real World Seaside ApplicationsReal World Seaside Applications
Real World Seaside ApplicationsESUG
 
Using html5 to build offline applications
Using html5 to build offline applicationsUsing html5 to build offline applications
Using html5 to build offline applicationsWoody Pewitt
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User ExperienceMahbubur Rahman
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Arun Gupta
 
Taking Web Applications Offline
Taking Web Applications OfflineTaking Web Applications Offline
Taking Web Applications OfflineMatt Casto
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsFastly
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on labNAVER D2
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKBrendan Lim
 
Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flexdanielwanja
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Frameworkvhazrati
 
OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016Stephen Fink
 

Similaire à Rails for Mobile Devices @ Conferencia Rails 2011 (20)

Web app and more
Web app and moreWeb app and more
Web app and more
 
Real World Seaside Applications
Real World Seaside ApplicationsReal World Seaside Applications
Real World Seaside Applications
 
Using html5 to build offline applications
Using html5 to build offline applicationsUsing html5 to build offline applications
Using html5 to build offline applications
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User Experience
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
Taking Web Applications Offline
Taking Web Applications OfflineTaking Web Applications Offline
Taking Web Applications Offline
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on lab
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Local storage
Local storageLocal storage
Local storage
 
Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flex
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Framework
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016
 

Plus de Alberto Perdomo

Primeros pasos con la base de datos de grafos Neo4j
Primeros pasos con la base de datos de grafos Neo4jPrimeros pasos con la base de datos de grafos Neo4j
Primeros pasos con la base de datos de grafos Neo4jAlberto Perdomo
 
Leveraging relations at scale with Neo4j
Leveraging relations at scale with Neo4jLeveraging relations at scale with Neo4j
Leveraging relations at scale with Neo4jAlberto Perdomo
 
Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...
Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...
Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...Alberto Perdomo
 
Boost your productivity!: Productivity tips for rails developers - Lightning ...
Boost your productivity!: Productivity tips for rails developers - Lightning ...Boost your productivity!: Productivity tips for rails developers - Lightning ...
Boost your productivity!: Productivity tips for rails developers - Lightning ...Alberto Perdomo
 
Curso TDD Ruby on Rails #08: Buenas prácticas
Curso TDD Ruby on Rails #08: Buenas prácticasCurso TDD Ruby on Rails #08: Buenas prácticas
Curso TDD Ruby on Rails #08: Buenas prácticasAlberto Perdomo
 
Curso TDD Ruby on Rails #02: Test Driven Development
Curso TDD  Ruby on Rails #02: Test Driven DevelopmentCurso TDD  Ruby on Rails #02: Test Driven Development
Curso TDD Ruby on Rails #02: Test Driven DevelopmentAlberto Perdomo
 
Curso TDD Ruby on Rails #06: Mocks y stubs
Curso TDD Ruby on Rails #06: Mocks y stubsCurso TDD Ruby on Rails #06: Mocks y stubs
Curso TDD Ruby on Rails #06: Mocks y stubsAlberto Perdomo
 
Curso TDD Ruby on Rails #05: Shoulda
Curso TDD Ruby on Rails #05: ShouldaCurso TDD Ruby on Rails #05: Shoulda
Curso TDD Ruby on Rails #05: ShouldaAlberto Perdomo
 
Curso TDD Ruby on Rails #04: Factorías de objetos
Curso TDD Ruby on Rails #04: Factorías de objetosCurso TDD Ruby on Rails #04: Factorías de objetos
Curso TDD Ruby on Rails #04: Factorías de objetosAlberto Perdomo
 
Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...
Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...
Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...Alberto Perdomo
 

Plus de Alberto Perdomo (10)

Primeros pasos con la base de datos de grafos Neo4j
Primeros pasos con la base de datos de grafos Neo4jPrimeros pasos con la base de datos de grafos Neo4j
Primeros pasos con la base de datos de grafos Neo4j
 
Leveraging relations at scale with Neo4j
Leveraging relations at scale with Neo4jLeveraging relations at scale with Neo4j
Leveraging relations at scale with Neo4j
 
Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...
Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...
Squire: A polyglot application combining Neo4j, MongoDB, Ruby and Scala @ FOS...
 
Boost your productivity!: Productivity tips for rails developers - Lightning ...
Boost your productivity!: Productivity tips for rails developers - Lightning ...Boost your productivity!: Productivity tips for rails developers - Lightning ...
Boost your productivity!: Productivity tips for rails developers - Lightning ...
 
Curso TDD Ruby on Rails #08: Buenas prácticas
Curso TDD Ruby on Rails #08: Buenas prácticasCurso TDD Ruby on Rails #08: Buenas prácticas
Curso TDD Ruby on Rails #08: Buenas prácticas
 
Curso TDD Ruby on Rails #02: Test Driven Development
Curso TDD  Ruby on Rails #02: Test Driven DevelopmentCurso TDD  Ruby on Rails #02: Test Driven Development
Curso TDD Ruby on Rails #02: Test Driven Development
 
Curso TDD Ruby on Rails #06: Mocks y stubs
Curso TDD Ruby on Rails #06: Mocks y stubsCurso TDD Ruby on Rails #06: Mocks y stubs
Curso TDD Ruby on Rails #06: Mocks y stubs
 
Curso TDD Ruby on Rails #05: Shoulda
Curso TDD Ruby on Rails #05: ShouldaCurso TDD Ruby on Rails #05: Shoulda
Curso TDD Ruby on Rails #05: Shoulda
 
Curso TDD Ruby on Rails #04: Factorías de objetos
Curso TDD Ruby on Rails #04: Factorías de objetosCurso TDD Ruby on Rails #04: Factorías de objetos
Curso TDD Ruby on Rails #04: Factorías de objetos
 
Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...
Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...
Plugins de autenticación en Rails - Lightning talk Las Palmas On Rails 09/02/...
 

Dernier

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.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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 RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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 MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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 SolutionsEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Rails for Mobile Devices @ Conferencia Rails 2011

  • 1. Rails for mobile devices Alberto Perdomo Conferencia Rails 2011
  • 2.
  • 4.
  • 6.
  • 7.
  • 10. Screen Different sizes and resolutions Different orientations: portrait vs. landscape Zooming
  • 12. Touch interfaces Small font size, little space between links No hover Gestures events vs. mouse events
  • 16. 1 big asset vs. several smaller ones
  • 18.
  • 20. Width
  • 21. <!DOCTYPE html> <html> <head> <title>Hello world!</title> </head> <body> <p>Hello world!</p> </body>
  • 22. Viewport meta tag <meta name="viewport" content="width=device-width, initial-scale=1"> Separated by commas, not semicolons!!!
  • 23. Responsive Web Designs http://mediaqueri.es/
  • 24. Fluid layouts and styles depending on width & device capabilities
  • 27. Conferencia Rails by @mamuso: http://conferenciarails.org/
  • 28. Media Queries W3C Candidate Recommendation http://www.w3.org/TR/css3-mediaqueries/
  • 29. Examples block for > 900px @media screen and (min-width: 900px) { // styles for bigger displays } or separate CSS file <link rel="stylesheet" media="screen and (max-width: 600px)" href="small.css" /> tablets <link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
  • 31. http://www.sencha.com/products/touch/ open source + commercial licenses
  • 32. demos.Forms = new Ext.TabPanel({ items: [{ title: 'Basic', xtype: 'form', id: 'basicform', scroll: 'vertical', items: [{ xtype: 'fieldset', title: 'Personal Info', instructions: 'Please enter the information above.', defaults: { // labelAlign: 'right' labelWidth: '35%' }, items: [{ xtype: 'textfield', name: 'name', label: 'Name', placeHolder: 'Tom Roy', autoCapitalize : true, required: true, useClearIcon: true }, { // ...
  • 33. Javascript DOM Unified User Interface
  • 34.
  • 35. Clean semantic markup + Javascript Unified User Interface
  • 36. Features jQuery Progressive enhancement Cross-platform Accessibility Lightweight (~12K comp) HTML5
  • 38. <!DOCTYPE html> <html> <head> <title>Page Title</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script> </head> <body> ... </body> </html>
  • 39. Anatomy of a page <div data-role="page"> <div data-role="header">...</div> <div data-role="content">...</div> <div data-role="footer">...</div> </div>
  • 40. Example: Single Page <body> <div data-role="page"> <div data-role="header"> <h1>Page Title</h1> </div><!-- /header --> <div data-role="content"> <p>Page content goes here.</p> </div><!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div><!-- /footer --> </div><!-- /page -->
  • 41. Example: local linked pages <div data-role="page" id="foo" > <div data-role="header"> <h1>Foo</h1> </div><!-- /header --> <div data-role="content"> When loading the HTML page <p>I'm first in the source order so I'm shown as the page.</p> the first page is autom. shown <p>View internal page called <a href="#bar">bar</a></p> </div><!-- /content --> and the rest hidden <div data-role="footer"> <h4>Page Footer</h4> </div><!-- /footer --> </div> <div data-role="page" id="bar" > When following a link to a local ... linked page, there is an animated </div> transition
  • 42. Other stuff Components: Lists, Buttons, Dialogs, Grid, ... Hijax / Ajax Page transitions / Animations Theming Dual license: MIT or GPL version 2
  • 44. Pa! I: "e manifest
  • 45. At its simplest, an offline web application is a list of URLs — HTML, CSS, JavaScript, images, or any other kind of resource. http://diveintohtml5.org/offline.html#divingin
  • 46. Support IE Firefox Safari Chrome Opera iPhone Android - 3.5+ 4.0+ 5.0+ 10.6+ 2.1+ 2.0+
  • 47. Basic example /index.html <!DOCTYPE HTML> <html manifest="/offline.appcache" > <body> ... /offline.appcache Content type: text/cache-manifest !!! CACHE MANIFEST /screen.css /application.js /logo.png
  • 48. Anatomy of a manifest <name>.appcache CACHE MANIFEST CACHE /css/screen.css /css/offline.css List of files to cache /images/logo.png http://example.com/code.js FALLBACK List of files to fall back / /offline.html in case not available /images/avatars/ /offline_avatar.png NETWORK Online whitelist, never /track.cgi cached
  • 49. Cache what? Place All pages must be included Read Browse purchase messages articles orders Reference to manifest in each of them Send Read news messages The page that triggers the download of the manifest file Offline & online Online only does not to be included
  • 50. A more complex example All pages CACHE MANIFEST Fallback for offline FALLBACK / /offline.html pages NETWORK Allow to browse * other pages when online
  • 51. Manifest: Status status (returns boolean) navigator.onLine callbacks ononline onoffline
  • 52. Manifest: DOM & Events object events window.applicationCache checking downloading progress cached noupdate updateready reload new cache after updateready window.applicationCache.swapCache()
  • 53. Manifest: DOM & Events manifest attr in <html> Event: checking Event: Event: progress progress yes no yes Download first changed? Download time? Event: Event: downloading downloading Event: Event: cached no Event: noupdate updateready Finished
  • 54. Rack Offline by Yehuda Katz https://github.com/wycats/rack-offline
  • 55. Automated Mobile::Application.routes.draw do match "/application.manifest" => Rails::Offline Automatically caches all JS, CSS & HTML in public In development: include SHA based on timestamp to force reload In production: include SHA based on underlying assets
  • 56. Custom manifest Mobile::Application.routes.draw do offline = Rack::Offline.configure do cache [ "http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css", "http://code.jquery.com/mobile/1.0b1/images/icons-18-white.png", "http://code.jquery.com/mobile/1.0b1/images/ajax-loader.png", "http://code.jquery.com/jquery-1.6.1.min.js", "http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js", "favicon.ico"] network "*" end match "/offline.appcache" => offline # ...
  • 58.
  • 60. Local Storage Implemented natively in the browsers Key/Value store Persistence Never sent to server (unlike cookies) Supported in common browsers, even IE > 8.0
  • 61. Details 5MB by default acessible through localStorage object key: String, value: Any JS supported type Use parseInt, parseFloat, ... to retrieve objects Synchronous API
  • 62. Examples Read/Write var foo = localStorage["bar"]; localStorage["bar"] = foo; Clear key localStorage.removeItem("bar"); Empty storage localStorage.clear();
  • 63. Competitors: WebSQL SQL database in the browser SQLite Implemented by some browsers: Safari, Chrome, Webkit Asynchronous API Requires more code but is also more powerful
  • 64. Competitors: IndexedDB No standard Query Language Access through API functions Very early stage, not yet usable
  • 66. Detect requests from mobile devices in your Rails app https://github.com/brendanlim/mobile-fu https://github.com/shenoudab/active_device
  • 67. Rails helpers for jQuery Mobile https://github.com/Consoci8/jqmobile_helpers https://github.com/wakeless/rails-jquery-mobile
  • 72. Wanderlust Stories http://wanderluststories.com/
  • 78. Native apps vs. Web apps
  • 79.
  • 80.
  • 81. Benefits of Native Apps Performance User Experience Installation Monetization options Distribution & Market visibility
  • 82. Benefits of Web Apps Interoperability & cross platform Installation & deployment options URLs Shorter Time to Market Deploy instantly, no approval process Your skills
  • 84. Dive Into HTML5 by Mark Pilgrim http://diveintohtml5.org
  • 85. Introducing HTML5 by Bruce Lawson and Remy Sharp http://introducinghtml5.com/
  • 86. HTML5 Demos by Remy Sharp http://html5demos.com https://github.com/remy/html5demos
  • 87. Mobilizer from SpringBox http://www.springbox.com/mobilizer/
  • 90. Creative Commons Title Author URL iPad vs iPhone Julien GONG Min http://www.flickr.com/photos/bfishadow/4604166391/ No worries http://www.flickr.com/photos/uggboy/5382476400/ Just Care Baby John Martinez Pavliga http://www.flickr.com/photos/virtualsugar/4590816785/ godzilla-anatomy Joe Wu http://www.flickr.com/photos/ozzywu1974/5143458938/ Manifest of Alien Passengers SS Ultonia Southampton(Apr.22, 1913) - Quebec Brent http://www.flickr.com/photos/stupiddingo/3728417282/ (May 8, 1913) 1 of 2 Pain Nathan Phillips http://www.flickr.com/photos/npphoto/4383990220/ http://www.flickr.com/photos/kalleboo/3277120428/ Storage Karl Baron Jocelyn Foye - Sumo - Face Off - Gateway Japan @ Torrance Art Museum (small) http://www.flickr.com/photos/lifeontheedge/5565245900/ box wrenches S. Diddy http://www.flickr.com/photos/spence_sir/2292721218/