Designing for the Mobile Web Lesson 3: HTML5 Web Apps



Similar documents
Choosing a Mobile Strategy for Your Business

Developing Cross-platform Mobile and Web Apps

THE SAS OUTPUT DELIVERY SYSTEM: BOLDLY TAKE YOUR WEB PAGES WHERE THEY HAVE NEVER GONE BEFORE! CHEVELL PARKER, SAS INSTITUTE INC.

<Insert Picture Here>

Web Browser. Fetches/displays documents from web servers. Mosaic 1993

Mobile Web Applications using HTML5. L. Cotfas 14 Dec. 2011

Republic Polytechnic School of Infocomm C308 Web Framework. Module Curriculum

ios SDK possibilities & limitations

Article. One for All Apps in HTML5

Mobile Learning Basics + (Free) Mobile Learning Guide. Jason Haag and Marcus Birtwhistle

HTML5: Separating Fact and Fiction. #wipjam

Building a Simple Mobile optimized Web App/Site Using the jquery Mobile Framework

WEB, HYBRID, NATIVE EXPLAINED CRAIG ISAKSON. June 2013 MOBILE ENGINEERING LEAD / SOFTWARE ENGINEER

Designing for Mobile Devices

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

Enterprise Mobile Application Development: Native or Hybrid?

Smartphone Application Development using HTML5-based Cross- Platform Framework

research: technical implemenation

HTML5 the new. standard for Interactive Web

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

HYBRID APPLICATION DEVELOPMENT IN PHONEGAP USING UI TOOLKITS

SYST35300 Hybrid Mobile Application Development

A Beginners Guide To Responsive, Mobile & Native Websites 2013 Enhance.ie.All Rights Reserved.

the future of mobile web by startech.ro

Mobile Apps, Mobile Web, and Other Cool Tools. Thursday, November 9, :00pm 4:00pm Michael Hostad and Scott Owczarek

Sizmek Formats. IAB Mobile Pull. Build Guide

Quick Start Guide Mobile Entrée 4

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Retool your HTML/JavaScript to go Mobile

CROSS PLATFORM APP A COMPARATIVE STUDY

Mobile Application Development

Best practices building multi-platform apps. John Hasthorpe & Josh Venman

Mobile Enterprise Application Development - a Cross-Platform Framework

Cross-Platform Tools

ADF Mobile Overview and Frequently Asked Questions

Mobile App Design and Development

KonyOne Server Prerequisites _ MS SQL Server

Site Configuration Mobile Entrée 4

JTouch Mobile Extension for Joomla! User Guide

Building Responsive Websites with the Bootstrap 3 Framework

Responsive Web Design. birds of feather

Building native mobile apps for Digital Factory

Going Beyond SAP ITS Mobile Apps to a Responsive Design Mobile Apps. JK (JayaKumar Pedapudi) Principal Consultant NTT DATA, Inc.

Cross Platform Applications with IBM Worklight

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Personal Cloud. Support Guide for Mobile Apple Devices

Mobile Development Frameworks Overview. Understand the pros and cons of using different mobile development frameworks for mobile projects.

Developing Mobile Websites with Responsive Web Design and jquery Mobile

White Paper INTRODUCTION. In mobile development, there are three different types of applications: PRE-SMARTPHONE MOBILITY NATIVE MOBILE APPLICATIONS

Designing Mobile Applications for Official Statistics

Developing and deploying mobile apps

CiviMobile & CiviSync Mobile. Peter McAndrew Rohit Thakral

Responsive Web Design for Drupal

Responsive Design Best Practices

Step 1 Preparation and Planning

FAMILY. Reference Guide. Pogoplug Family. Reference Guide Cloud Engines, Inc. All Rights Reserved.

Native, web or hybrid mobile-app development

Building Apps for iphone and ipad. Presented by Ryan Hope, Sumeet Singh

Enterprise Mobile App Management Essentials. Presented by Ryan Hope and John Nielsen

Analysis of Current and Future Web Standards for Reducing the Gap between Native and Web Applications

Sage CRM. Sage CRM 2016 R1 Mobile Guide

Lab: Developing Mobile Web Apps. Adage Technologies adagetechnologies.com

max firt.mobi martes 26 de julio de 11

Mobile Communicator for Mobile Devices

Homework 3: Component & Interface Design

Draft Response for delivering DITA.xml.org DITAweb. Written by Mark Poston, Senior Technical Consultant, Mekon Ltd.

INFORMATION TECHNOLOGY STANDARD

How To Use Titanium Studio

My Stuff Everywhere Your Content On Any Screen

HTML5 : carrier grade

Airangel s WiFi Portal Best Practice Guidelines Get the most out of your WiFi infrastructure

Cross-Platform Phone Apps & Sites with jquery Mobile

ios App for Mobile Website! Documentation!

separate the content technology display or delivery technology

Cross-Platform Development

Developing Applications for ios

Taylor & Francis Online Mobile FAQs

WompMobile Technical FAQ

Administering Jive Mobile Apps

Cross Platform App Development

Designing for Mobile. Jonathan Wallace

Sage CRM. Sage CRM 7.3 Mobile Guide

Adobe Flash Player and Adobe AIR security

CMS, CRM, shopping carts, Web applications

MENDIX FOR MOBILE APP DEVELOPMENT WHITE PAPER

Transcription:

Designing for the Mobile Web Lesson 3: HTML5 Web Apps Michael Slater, CEO Andrew DesChenes, Dir. Services course-support@webvanta.com 888.670.6793 www.webvanta.com

Welcome! Four sessions 1: The Mobile Landscape 2: Device Constraints and Opportunities 3: HTML5 Web Apps 4: Native Apps 2

Questions Ask questions via chat during the live course Ask in the discussion group Email us Please use the discussion group for non-private questions Course Portal www.online-web-courses.com Michael Slater Cofounder & CEO Andrew DesChenes Director of Services 3

Topics for This Lesson (Sort of) a cross-platform solution Responsive design Using jquery Mobile to quickly build app-like sites HTML5 web app features Geolocation, camera access, and more 4

HTML5 Web Apps There is a (partial) way out of the multi-platform nightmare! Choose the web as the platform HTML5, CSS3, JavaScript Limited access to devices and sensors Deliver through browser, or use PhoneGap to turn it into a "native" app No icon on phone, unless user creates one 5

Only a Partial Way Out... ios devices are very consistent and frequently updated Android devices are diverse Users can install their own browsers, and they often don't get updated Can't reliably predict what features the browser will have Default browser is buggy Need to deal with variety of screen resolutions and pixel densities 6

Responsive Design Scale to any screen size Use CSS media queries and JavaScript to adapt to different screen sizes Examples: www.bostonglobe.com http://mediaqueri.es Responsive Web Design from A Book Apart www.abookapart.com/products/responsive-web-design 7

Responsive Design Basics One HTML page serves all devices Use percentage widths for grid and images Flexible grid scales to screen Browser scales images Use media queries to deliver different CSS depending on screen width, to selectively hide or change elements Frameworks available to help you get started http://www.getskeleton.com http://stuffandnonsense.co.uk/projects/320andup/ 8

Media Queries Use within your CSS files @media only screen and (max-device-width: 480px) { (css rules here to be used for phones only) } Use to selectively load CSS files <link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="phone.css" /> 9

Responsive Design Code Example Download the code files for this lesson Folder "responsive" responsive.html is the HTML file responsive.css is the basic CSS for the page media-queries.css has the media queries Start with a browser at least 1000 px wide, and gradually reduce the width to see the changes 10

The Alternative: Separate Pages Detect Device Type Desktop site pages Mobile site pages CMS and Database Same body of content can serve both sites 11

Detecting Mobile Devices Responsive design allows a single set of pages to serve all devices If you are using separate pages, then you need a way to direct mobile devices to different pages (and maybe a different server) Server-side detection can use request headers to detect mobile devices and serve different pages to them JavaScript can examine the User Agent string to detect mobile devices See http://detectmobilebrowsers.com/ Note: reliably separating phones from tablets is challenging See http://www.webvanta.com/post/789079 12

Building Mobile Web Pages They're just web pages Use all the usual HTML, CSS and JavaScript A few mobile-specific issues Viewports, as discussed last lesson Can depend on advanced HTML5 and CSS3 features Mobile web frameworks provide mobile-optimized, app-like interactions without having to design and code everything yourself 13

jquery Mobile Framework Builds on top of regular jquery library Not just interactive effects, but a complete framework including CSS and images Uses HTML5 data attributes to annotate markup JavaScript runs after HTML is loaded and transforms it into a mobile page Polished visual design, easily customized within limits http://jquerymobile.com/themeroller/ 14

Displaying a Page with JQM Web page with HTML5 markup jquery Mobile processes the page Web page transformed into mobile markup jquery core jquery mobile jquery Mobile CSS Theme CSS 15

jquery Mobile vs. HTML/CSS jquery Mobile Advantages Enables quick creation of polished sites Interactions are mobile-optimized without additional effort and have app-like behavior jquery Mobile Disadvantages New paradigms take some getting used to Harder to provide a completely customized visual design than with standard HTML/CSS 16

jquery Mobile Docs www.jquerymobile.com Books tend to be either out-of-date or not-yet-released Our free webinar on jquery Mobile www.webvanta.com/jqm-webinar Our list of references www.webvanta.com/jquery-mobile 17

A Page is Not Always a Page HTML Page head data- role="page" data- role="page" data- role="page" One HTML document can include multiple conceptual pages A "page" is just an HTML element with data-role="page" When a page link is followed, new page elements added to DOM 18

The Simplest Page <div data-role="page">! <div data-role="header">! <h1>my Title</h1>! </div>! <section data-role="content">!! <p>hello world</p>!!! </section> </div> 19

jquery Mobile Code Example Download the code files for this lesson Folder "jquery-mobile" Home page is jqm-demo.html Libraries are loaded from CDNs Uses default theme A few CSS overrides in jqm-overrides.css Note: main page runs fine locally, but loads of map and contact page will fail because Ajax requests aren't allowed on local files 20

Other Mobile Frameworks Sencha Touch www.sencha.com/products/touch jqtouch www.jqtouch.com jqmobi iui http://jqmobi.com http://code.google.com/p/iui Zepto.js (smaller replacement for jquery) www.zeptojs.com 21

HTML5 Features for Mobile Web Apps Local Storage Store string data easily Web SQL Database Local database in the browser Application Cache Allows semi-permanent app storage in browser Geo-location API Get the visitor's geographic location 22

HTML5 Local Storage Provides local storage as key/value pairs Allows up to 5 Mbytes of storage, vs. 4K for cookies Simple JavaScript API localstorage.setitem("thisclass", "Design for Mobile"); localstorage.getitem("thisclass"); sessionstorage is similar but data goes away when browser is closed Stores strings only, but you can convert binary data to strings easily 23

HTML5 Web SQL Database SQLite implemented in the browser Great for being able to search data locally Works even if offline May be dropped from HTML5 spec, and not widely supported on desktop Available on all recent ios devices Available in default Android browser, even old ones May not be available in other Android browsers 24

HTML5 Offline Mode Application Cache stores files in browser cache, more permanently than normal cache Manifest file, provided by server along with normal site, provides list of all assets to be stored offline Cache is updated whenever the manifest changes (assuming connectivity, of course) Limited to 5 Mbytes normally For Google App Store (Play), size can be overridden 25

Geolocation API Simple JavaScript API available in all recent SmartPhones getcurrentposition() watchposition() User is asked for permission before position is provided Underlying mechanism is up to the device GPS, cell tower triangulation, WiFi 26

Accessing other Devices Device Motion API provided by Mobile Safari ios 4.2 and later Vibration API spec in development but not yet implemented Camera access not yet possible from browser 27

Triggering Other Apps Use URL scheme for handing off to other apps A link to maps.google.com will open the Maps app A link to youtube.com will open the YouTube app mailto: opens the email client, as you'd expect tel: asks user if they want to dial the phone number sms: launches the messaging app other apps can define their own URL scheme e.g., href="fb://feed" opens the Facebook app to the news feed 28

Distributing Web Apps They are just web sites! Use "save to home screen" prompt as described in previous lesson Google provides HTML5 Web App store for Android http://openappmkt.com/ Lacks Apple's App Store restrictions Also lacks quality control 29

Mobile Emulators Testing mobile apps on a range of devices a real challenge Emulators are helpful but not the full solution ios simulator (iphone and ipad) Included in XCode, free download for Mac users (not available for Windows) Available in App Store; requires recent Mac OS Android emulator http://developer.android.com/sdk/installing.html Slow, relatively technical to install, but available on all platforms Windows Phone emulator http://msdn.microsoft.com/en-us/library/ff402530(v=vs.92).aspx 30

Homework Create a simple website with jquery Mobile Explore the listview, buttons, collapsibles, header, and footer options Build a simple web page using responsive design Create separate phone, tablet, and desktop optimized views 31