SlideShare uma empresa Scribd logo
1 de 28
HTML 5 and the Mobile
        Web
  ILRT Staff Development Week, July, 2010

      Mike Jones (mike.a.jones@bris.ac.uk)
     & Damian Steer (d.steer@bristol.ac.uk)
Overview
•   Native applications vs Mobile Web

•   Current mobile support for Webkit

•   W3C recommendations for mobile websites

•   HTML 5 ... a very brief potted history

•   The video and audio tags

•   Offline storage and application cache

•   CSS 3 support

•   Support for gestures
Phone            SMS           Contacts


      GPS            Compass         Bluetooth


     Storage         Offline use       Video


Why bother with web applications?

      Audio          Graphics        Animation


       3D         Motion detection   Gestures


     Camera            Music         Calendar
Why bother with web applications?
Phone            SMS           Contacts


      GPS            Compass         Bluetooth


     Storage         Offline use       Video


Why bother with web applications?

      Audio          Graphics        Animation


       3D         Motion detection   Gestures


     Camera            Music         Calendar
Current mobile support
      for webkit
                                   Engine                  HTML 5 (*)
      Mobile Safari                Webkit                       Yes
        Android                    Webkit                       Yes
  Blackberry 6 Browser             Webkit                       Yes
       Symbian 3                   Webkit                       Yes
        MeeGo                Webkit (Chromium)                  Yes
    Internet Explorer         Internet Explorer 7               No
    WebOS Browser                  Webkit                       Yes
    Bada OS Browser                Webkit                      Yes?
     Opera Mobile             Opera Presto 2.2                  Yes
       Opera Mini             Opera Presto 2.2                  Yes
         Fennec                     Firefox                     Yes
Myriad (former Openwave)           Webkit                       No
     BOLT Browser                  Webkit                        ?

    (*)HTML support might not mean support for the whole specification.
Source: http://radar.oreilly.com/2010/05/mobile-operating-systems-and-b.html
W3C Recommendations
 for the Mobile Web
•   Mobile Best Practices (last updated 2008)
    http://www.w3.org/TR/mobile-bp/

•   One Web

•   Expected stuff: reduce network traffic, set
    caches, set character encoding, don’t use tables
    for layout, dump image maps etc.

•   mobileOK validator:
    http://validator.w3.org/mobile/
HTML 5 ... a very brief
      potted history
•   2004: Web Hypertext Application Technology Working
    Group (WHATWG) - Apple, Mozilla and Opera - started
    work on Web Applications 1.0

•   Meanwhile W3C is working on XHTML 2.0

•   2007: W3C drops XHTML and forms HTMLWG

•   2008: first draft of HTML 5 is published

•   WHATWG and W3C both maintain specification
    documents

•   Watching the process is entertaining, if not confusing:
    http://lastweekinhtml5.blogspot.com/
The video and audio tags

• video and audio tags are similar
• Strategies for dealing with browsers that
  don’t support the tag, or those that
  support the tag but specific codecs
• They are just elements - can be
  manipulated by CSS and JavaScript
Big Buck Bunny in Stages
On the iPhone
Working offline:
    the application cache

• <html manifest=”my.manifest”>
• text/cache-manifest
• Specify which resources can be cached,
  which are live
• Seems easy. Bit fiddly in practice.
Working offline:
       Persistence

• No more google gears or cookie hacks!
• Not one, but three options!
• Tread carefully, standards politics beast
  approaching...
Working offline:
       localStorage
• localStorage.setItem(key, value)
• localStorage.getItem(key)
• removeItem(key), clear()
• same domain origin scope
• Simple! Widely supported!
Working Offline:
  Web SQL Database
• Finally, SQL in your browser
• Transactions, prepared statements, joins...
• Synchronous and Asynchronous APIs
• Available in WebKit
• ][ chance of being a recommendation
• Firefox and IE won’t support it
Working Offline:
Indexed Database API
• Store objects with fields
• Create indexes over the object store
• Transactions, key ranges, cursors
• Synchronous and Asynchronous API
Working Offline:
Indexed Database API
connection = db.indexedDB.open("Fruits", "A Fruit Database!");

fruits = connection.createObjectStore("A Fruity Object Store", "fruit", true);
fruitIndexByColor = fruits.createIndex("A Fruity Index", "color", false);

fruits.put({ fruit: "Apple", color: "Red" });
fruits.put({ fruit: "Tangerine", color: "Orange" });
fruits.put({ fruit: "Grape", color: "Purple" });

var cursor = fruitIndexByColor.openCursor(undefined, db.IDBCursor.NEXT_NO_DUPLICATE);

assertEquals("Orange", cursor.key);
assertEquals("Tangerine", cursor.value);
cursor.continue();

assertEquals("Purple", cursor.key);
assertEquals("Grape", cursor.value);
cursor.continue();

assertEquals("Red", cursor.key);
assertEquals("Apple", cursor.value);
assertFalse(cursor.continue());
cursor.close();
Working Offline:
Indexed Database API
• No implementations currently
• Mozilla and Webkit working on it
• Much better chance of becoming a
  recommendation
• Suspect libraries will fill usability gap
CSS 3 Support
•   WWDC 2010 videos via iTunes (need a developer
    account - free)
    http://developer.apple.com/videos/wwdc/2010/

          •   Session 503 - CSS Effects, Part 1: UI
              Elements and Navigation

          •   Session 504 - CSS Effects, Part 2:
              Galleries and 3D Effects

•   Introduction to CSS 3 (Working Draft)
    http://www.w3.org/TR/2001/WD-css3-
A few features ...
• @font-face
• webkit-box-shadow
• -webkit-gradient (linear and radiant). These
  can be assigned to a background image.
• border-radius
• -webkit-box-reflect
• -webkit-transition
A pointless example in
       stages ...
A richer demo from
         WWDC 2010




No images or plug-ins are used - just HTML, CSS and
                     JavaScript.
Works on a phone ...




      Source code
Apple demo - transitions
     and JavaScript




        Source code
Support for gestures
•




                               http://commons.wikimedia.org/wiki/File:Gesture_raised_fist_with_index_and_pinky_lifted.jpg
    Touch screen devices
    emulate a mouse with
    buttons reasonable well

•   WebKit supports new
    event types for gestures

•   Also supports low-level
    touch events

•   Not standard!
Support for gestures:
         high level

• gesturestart, gesturechange, gestureend
• element.addEventListener(..., handler, false)
• event.scale, event.rotation
Support for gestures:
         low level
• touchstart, touchmove, touchend,
  touchcancel
• event.touches
• event.targetTouches
• event.changedTouches
• Handle cancel
Questions?

Mais conteúdo relacionado

Semelhante a HTML5 and the Mobile Web

Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App DevelopmentChris Morrell
 
HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?Reto Meier
 
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 Todaydavyjones
 
Best practices for delivering quality web experiences
Best practices for delivering quality web experiencesBest practices for delivering quality web experiences
Best practices for delivering quality web experiencesBen Mantooth
 
HTML5, PhoneGap and What's Next
HTML5, PhoneGap and What's NextHTML5, PhoneGap and What's Next
HTML5, PhoneGap and What's Nextm0bz
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011davyjones
 
HTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareRomin Irani
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High PerformanceAmjad Rafique
 
Smau milano 2012 arena social media emanuele-bolognesi
Smau milano 2012   arena social media emanuele-bolognesiSmau milano 2012   arena social media emanuele-bolognesi
Smau milano 2012 arena social media emanuele-bolognesiSMAU
 
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 Developerbalunasj
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Jeff Haynie
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumJeff Haynie
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...Yottaa
 
HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기JungHyuk Kwon
 

Semelhante a HTML5 and the Mobile Web (20)

DDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su LotusDDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su Lotus
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?
 
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
 
Best practices for delivering quality web experiences
Best practices for delivering quality web experiencesBest practices for delivering quality web experiences
Best practices for delivering quality web experiences
 
HTML5, PhoneGap and What's Next
HTML5, PhoneGap and What's NextHTML5, PhoneGap and What's Next
HTML5, PhoneGap and What's Next
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
Samsung
SamsungSamsung
Samsung
 
Html ppts
Html pptsHtml ppts
Html ppts
 
HTML
HTMLHTML
HTML
 
Unify - JSConf.EU 2010
Unify - JSConf.EU 2010Unify - JSConf.EU 2010
Unify - JSConf.EU 2010
 
HTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm Software
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High Performance
 
Smau milano 2012 arena social media emanuele-bolognesi
Smau milano 2012   arena social media emanuele-bolognesiSmau milano 2012   arena social media emanuele-bolognesi
Smau milano 2012 arena social media emanuele-bolognesi
 
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
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
 
HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기HTML5 로 iPhone App 만들기
HTML5 로 iPhone App 만들기
 

Mais de MrJ1971

KYBOTM poster for DHOxSS
KYBOTM poster for DHOxSSKYBOTM poster for DHOxSS
KYBOTM poster for DHOxSSMrJ1971
 
Map Your Bristol
Map Your BristolMap Your Bristol
Map Your BristolMrJ1971
 
Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)MrJ1971
 
Bibliographic management on mobile devices


Bibliographic management on mobile devices

Bibliographic management on mobile devices


Bibliographic management on mobile devices

MrJ1971
 
MyMobileBristol and Nature Locator @ osjmob11
MyMobileBristol and Nature Locator @ osjmob11MyMobileBristol and Nature Locator @ osjmob11
MyMobileBristol and Nature Locator @ osjmob11MrJ1971
 
MCA and MyMobileBristol @ osjmob11
MCA and MyMobileBristol @ osjmob11MCA and MyMobileBristol @ osjmob11
MCA and MyMobileBristol @ osjmob11MrJ1971
 
Nature Locator @ Dev8D
Nature Locator @ Dev8DNature Locator @ Dev8D
Nature Locator @ Dev8DMrJ1971
 
MyMobileBristol @ Dev8D
MyMobileBristol @ Dev8DMyMobileBristol @ Dev8D
MyMobileBristol @ Dev8DMrJ1971
 
Mobile Campus Assistant - Dev8D Lightening Talk
Mobile Campus Assistant - Dev8D Lightening TalkMobile Campus Assistant - Dev8D Lightening Talk
Mobile Campus Assistant - Dev8D Lightening TalkMrJ1971
 

Mais de MrJ1971 (9)

KYBOTM poster for DHOxSS
KYBOTM poster for DHOxSSKYBOTM poster for DHOxSS
KYBOTM poster for DHOxSS
 
Map Your Bristol
Map Your BristolMap Your Bristol
Map Your Bristol
 
Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)
 
Bibliographic management on mobile devices


Bibliographic management on mobile devices

Bibliographic management on mobile devices


Bibliographic management on mobile devices


 
MyMobileBristol and Nature Locator @ osjmob11
MyMobileBristol and Nature Locator @ osjmob11MyMobileBristol and Nature Locator @ osjmob11
MyMobileBristol and Nature Locator @ osjmob11
 
MCA and MyMobileBristol @ osjmob11
MCA and MyMobileBristol @ osjmob11MCA and MyMobileBristol @ osjmob11
MCA and MyMobileBristol @ osjmob11
 
Nature Locator @ Dev8D
Nature Locator @ Dev8DNature Locator @ Dev8D
Nature Locator @ Dev8D
 
MyMobileBristol @ Dev8D
MyMobileBristol @ Dev8DMyMobileBristol @ Dev8D
MyMobileBristol @ Dev8D
 
Mobile Campus Assistant - Dev8D Lightening Talk
Mobile Campus Assistant - Dev8D Lightening TalkMobile Campus Assistant - Dev8D Lightening Talk
Mobile Campus Assistant - Dev8D Lightening Talk
 

Último

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Último (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

HTML5 and the Mobile Web

  • 1. HTML 5 and the Mobile Web ILRT Staff Development Week, July, 2010 Mike Jones (mike.a.jones@bris.ac.uk) & Damian Steer (d.steer@bristol.ac.uk)
  • 2. Overview • Native applications vs Mobile Web • Current mobile support for Webkit • W3C recommendations for mobile websites • HTML 5 ... a very brief potted history • The video and audio tags • Offline storage and application cache • CSS 3 support • Support for gestures
  • 3. Phone SMS Contacts GPS Compass Bluetooth Storage Offline use Video Why bother with web applications? Audio Graphics Animation 3D Motion detection Gestures Camera Music Calendar
  • 4. Why bother with web applications?
  • 5. Phone SMS Contacts GPS Compass Bluetooth Storage Offline use Video Why bother with web applications? Audio Graphics Animation 3D Motion detection Gestures Camera Music Calendar
  • 6. Current mobile support for webkit Engine HTML 5 (*) Mobile Safari Webkit Yes Android Webkit Yes Blackberry 6 Browser Webkit Yes Symbian 3 Webkit Yes MeeGo Webkit (Chromium) Yes Internet Explorer Internet Explorer 7 No WebOS Browser Webkit Yes Bada OS Browser Webkit Yes? Opera Mobile Opera Presto 2.2 Yes Opera Mini Opera Presto 2.2 Yes Fennec Firefox Yes Myriad (former Openwave) Webkit No BOLT Browser Webkit ? (*)HTML support might not mean support for the whole specification. Source: http://radar.oreilly.com/2010/05/mobile-operating-systems-and-b.html
  • 7. W3C Recommendations for the Mobile Web • Mobile Best Practices (last updated 2008) http://www.w3.org/TR/mobile-bp/ • One Web • Expected stuff: reduce network traffic, set caches, set character encoding, don’t use tables for layout, dump image maps etc. • mobileOK validator: http://validator.w3.org/mobile/
  • 8. HTML 5 ... a very brief potted history • 2004: Web Hypertext Application Technology Working Group (WHATWG) - Apple, Mozilla and Opera - started work on Web Applications 1.0 • Meanwhile W3C is working on XHTML 2.0 • 2007: W3C drops XHTML and forms HTMLWG • 2008: first draft of HTML 5 is published • WHATWG and W3C both maintain specification documents • Watching the process is entertaining, if not confusing: http://lastweekinhtml5.blogspot.com/
  • 9. The video and audio tags • video and audio tags are similar • Strategies for dealing with browsers that don’t support the tag, or those that support the tag but specific codecs • They are just elements - can be manipulated by CSS and JavaScript
  • 10. Big Buck Bunny in Stages
  • 12. Working offline: the application cache • <html manifest=”my.manifest”> • text/cache-manifest • Specify which resources can be cached, which are live • Seems easy. Bit fiddly in practice.
  • 13. Working offline: Persistence • No more google gears or cookie hacks! • Not one, but three options! • Tread carefully, standards politics beast approaching...
  • 14. Working offline: localStorage • localStorage.setItem(key, value) • localStorage.getItem(key) • removeItem(key), clear() • same domain origin scope • Simple! Widely supported!
  • 15. Working Offline: Web SQL Database • Finally, SQL in your browser • Transactions, prepared statements, joins... • Synchronous and Asynchronous APIs • Available in WebKit • ][ chance of being a recommendation • Firefox and IE won’t support it
  • 16. Working Offline: Indexed Database API • Store objects with fields • Create indexes over the object store • Transactions, key ranges, cursors • Synchronous and Asynchronous API
  • 17. Working Offline: Indexed Database API connection = db.indexedDB.open("Fruits", "A Fruit Database!"); fruits = connection.createObjectStore("A Fruity Object Store", "fruit", true); fruitIndexByColor = fruits.createIndex("A Fruity Index", "color", false); fruits.put({ fruit: "Apple", color: "Red" }); fruits.put({ fruit: "Tangerine", color: "Orange" }); fruits.put({ fruit: "Grape", color: "Purple" }); var cursor = fruitIndexByColor.openCursor(undefined, db.IDBCursor.NEXT_NO_DUPLICATE); assertEquals("Orange", cursor.key); assertEquals("Tangerine", cursor.value); cursor.continue(); assertEquals("Purple", cursor.key); assertEquals("Grape", cursor.value); cursor.continue(); assertEquals("Red", cursor.key); assertEquals("Apple", cursor.value); assertFalse(cursor.continue()); cursor.close();
  • 18. Working Offline: Indexed Database API • No implementations currently • Mozilla and Webkit working on it • Much better chance of becoming a recommendation • Suspect libraries will fill usability gap
  • 19. CSS 3 Support • WWDC 2010 videos via iTunes (need a developer account - free) http://developer.apple.com/videos/wwdc/2010/ • Session 503 - CSS Effects, Part 1: UI Elements and Navigation • Session 504 - CSS Effects, Part 2: Galleries and 3D Effects • Introduction to CSS 3 (Working Draft) http://www.w3.org/TR/2001/WD-css3-
  • 20. A few features ... • @font-face • webkit-box-shadow • -webkit-gradient (linear and radiant). These can be assigned to a background image. • border-radius • -webkit-box-reflect • -webkit-transition
  • 21. A pointless example in stages ...
  • 22. A richer demo from WWDC 2010 No images or plug-ins are used - just HTML, CSS and JavaScript.
  • 23. Works on a phone ... Source code
  • 24. Apple demo - transitions and JavaScript Source code
  • 25. Support for gestures • http://commons.wikimedia.org/wiki/File:Gesture_raised_fist_with_index_and_pinky_lifted.jpg Touch screen devices emulate a mouse with buttons reasonable well • WebKit supports new event types for gestures • Also supports low-level touch events • Not standard!
  • 26. Support for gestures: high level • gesturestart, gesturechange, gestureend • element.addEventListener(..., handler, false) • event.scale, event.rotation
  • 27. Support for gestures: low level • touchstart, touchmove, touchend, touchcancel • event.touches • event.targetTouches • event.changedTouches • Handle cancel

Notas do Editor

  1. Ok, but suppose I want to take advantage of these features?
  2. Even if you want to cover only ~80% of market that&apos;s quite a few systems. We will return to this
  3. And many web clients can do a surprising amount. _Apple_ only introduced apps in second major version of iPhone OS. -- Web was way to go. -- Note (neglected) showcase. I will show how in a little while.