65
AUGUST 14 2010 Developing for the Mobile Web SocialDevCamp Chicago We craft engaging interactive experiences on open & sustainable platforms — Scott Robbin [email protected]

Developing for the Mobile Web

Embed Size (px)

DESCRIPTION

Mobile WebKit has quickly become the handheld browser of choice. And, while it does allow users to view the "real web," surfing the full-sized Internet on a half-sized device isn't always practical. In this session, we'll take a look at some of the techniques used to create mobile websites for a smaller screen size and slower network connection, including minification, offline caching and local storage.

Citation preview

Page 1: Developing for the Mobile Web

AUGUST 14 2010

Developing for the Mobile WebSocialDevCamp Chicago

We craft engaging interactive experiences on open & sustainable platforms

— Scott Robbin— [email protected]

Page 2: Developing for the Mobile Web
Page 3: Developing for the Mobile Web
Page 4: Developing for the Mobile Web

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

AgendaApp or Mobile Website?

Walkthrough of a simple site

Questions

01

02

03

Page 5: Developing for the Mobile Web

Who?

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 6: Developing for the Mobile Web

Who?• Have an understanding of HTML, CSS and how websites

are delivered.

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 7: Developing for the Mobile Web

Who?• Have an understanding of HTML, CSS and how websites

are delivered.

• Have experience with JavaScript.

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 8: Developing for the Mobile Web

Who?• Have an understanding of HTML, CSS and how websites

are delivered.

• Have experience with JavaScript.

• Know how to use FTP and ability to edit .htaccess or Apache config files.

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 9: Developing for the Mobile Web

HTML5

Page 10: Developing for the Mobile Web

App or Mobile Website?

01

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 11: Developing for the Mobile Web

Should I build an app or mobile website?01

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 12: Developing for the Mobile Web

Should I build an app or mobile website?01

• Will my product require the use of a camera, microphone or other device-specific hardware?

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 13: Developing for the Mobile Web

Should I build an app or mobile website?01

• Will my product require the use of a camera, microphone or other device-specific hardware?

• Will it access the address book, media library or common user data?

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 14: Developing for the Mobile Web

Should I build an app or mobile website?01

• Will my product require the use of a camera, microphone or other device-specific hardware?

• Will it access the address book, media library or common user data?

• Will I charge for my product using an app store as the payment processor?

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 15: Developing for the Mobile Web

Should I build an app or mobile website?01

• Will my product require the use of a camera, microphone or other device-specific hardware?

• Will it access the address book, media library or common user data?

• Will I charge for my product using an app store as the payment processor?

• Will I send push notifications or need background processes?

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 16: Developing for the Mobile Web

Mobile websites:01

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 17: Developing for the Mobile Web

Mobile websites:01

• Can access geolocation info.

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 18: Developing for the Mobile Web

Mobile websites:01

• Can access geolocation info.

• Provide offline caching and storage.

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 19: Developing for the Mobile Web

Mobile websites:01

• Can access geolocation info.

• Provide offline caching and storage.

• Handle touch and gesture events.

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 20: Developing for the Mobile Web

Mobile websites:01

• Can access geolocation info.

• Provide offline caching and storage.

• Handle touch and gesture events.

• Are easily deployed (new versions and bug fixes).

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 21: Developing for the Mobile Web

Mobile websites:01

• Can access geolocation info.

• Provide offline caching and storage.

• Handle touch and gesture events.

• Are easily deployed (new versions and bug fixes).

• Are cross-platform (Android, iPhone, webOS, etc.).

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 22: Developing for the Mobile Web

Other things to consider01

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 23: Developing for the Mobile Web

Other things to consider01

• Are you building this site from scratch?

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 24: Developing for the Mobile Web

Other things to consider01

• Are you building this site from scratch?

• User-Agent sniffing

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 25: Developing for the Mobile Web

Other things to consider01

• Are you building this site from scratch?

• User-Agent sniffing

• Subdomain or .mobi

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 26: Developing for the Mobile Web

Walkthrough of a simple site

02

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 27: Developing for the Mobile Web

Walkthrough of a simple site02

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Walkthrough of a simple site02

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 28: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Walkthrough of a simple site02

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 29: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Aaron Gustafson, A List Aparthttp://www.alistapart.com/articles/understandingprogressiveenhancement/

Page 30: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 31: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 32: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 33: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 34: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 35: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 36: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 37: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 38: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 39: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 40: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 41: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Sam Stephenson, 37signalshttp://37signals.com/svn/posts/2407-device-scale-user-interface-elements-in-ios-mobile-safari

Page 42: Developing for the Mobile Web

Walkthrough of a simple site02

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Ethan Marcotte, A List Aparthttp://www.alistapart.com/articles/responsive-web-design/

Page 43: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 44: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 45: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Steve Souders, Googlehttp://www.stevesouders.com/blog/2010/07/12/mobile-cache-file-sizes/

Page 46: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Steve Souders, Googlehttp://www.stevesouders.com/blog/2010/07/12/mobile-cache-file-sizes/

Page 47: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Intercept Click Events and Make AJAX Requests(e.g. jQuery.history plugin)

Page 48: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

PHP minifyhttp://code.google.com/p/minify/

Page 49: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

SpriteMe.org

Page 50: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Base64 Encodinghttp://www.motobit.com/util/base64-decoder-encoder.asp

Page 51: Developing for the Mobile Web

Walkthrough of a simple site02

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 52: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

03 — Make Small, Few Requests

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 53: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

03 — Make Small, Few Requests

04 — Offline Caching

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 54: Developing for the Mobile Web

Walkthrough of a simple site02

04 — Offline Caching

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

W3C: Offline Web Applicationshttp://www.w3.org/TR/offline-webapps/

Page 55: Developing for the Mobile Web

Walkthrough of a simple site02

04 — Offline Caching

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

W3C: Offline Web Applicationshttp://www.w3.org/TR/offline-webapps/

Page 56: Developing for the Mobile Web

Walkthrough of a simple site02

04 — Offline Caching

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

W3C: Offline Web Applicationshttp://www.w3.org/TR/offline-webapps/

Page 57: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

03 — Make Small, Few Requests

04 — Offline Caching

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 58: Developing for the Mobile Web

Walkthrough of a simple site02

01 — Progressive Enhancement

02 — Responsive Web Design

03 — Make Small, Few Requests

04 — Offline Caching

05 — Local Storage

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 59: Developing for the Mobile Web

Walkthrough of a simple site02

05 — Local Storage

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

W3C: Offline Web Applicationshttp://www.w3.org/TR/offline-webapps/

Page 60: Developing for the Mobile Web

Walkthrough of a simple site02

05 — Local Storage

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Lawnchair, Brian Lerouxhttp://blog.westcoastlogic.com/lawnchair/

Page 61: Developing for the Mobile Web

Walkthrough of a simple site02

05 — Local Storage

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Lawnchair, Brian Lerouxhttp://blog.westcoastlogic.com/lawnchair/

Page 62: Developing for the Mobile Web

Walkthrough of a simple site02

05 — Local Storage

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

jQuery Offline, Yehuda Katzhttp://github.com/wycats/jquery-offline

Page 63: Developing for the Mobile Web

Walkthrough of a simple site02

05 — Local Storage

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 64: Developing for the Mobile Web

Questions

03

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO

Page 65: Developing for the Mobile Web

Thank you.

SCOTT ROBBINTwitter: @srobbinE-mail: [email protected]: srobbin.com

Developing for the Mobile Web SOCIALDEVCAMP CHICAGO