building tomorrow's web with today's tools

81

Upload: james-pearce

Post on 02-Dec-2014

2.003 views

Category:

Technology


7 download

DESCRIPTION

Few have the chance to create web-based mobile services from scratch. After years of investment in existing platforms (such as content management systems), how can you re-use your content, your servers, and your knowledge and evolve them to meet the mobile challenge?

TRANSCRIPT

Page 1: Building tomorrow's web with today's tools
Page 2: Building tomorrow's web with today's tools

James Pearce Director, Developer Relations @ jamespearce [email protected]

Page 3: Building tomorrow's web with today's tools

BuildingTomorrow’s Web

With Today’s Tools

Page 4: Building tomorrow's web with today's tools

1941

Page 5: Building tomorrow's web with today's tools

An Experience Designed for the Medium

Page 6: Building tomorrow's web with today's tools

1995

Page 7: Building tomorrow's web with today's tools

An Experience Designed for the Medium

Page 8: Building tomorrow's web with today's tools

2007

Page 9: Building tomorrow's web with today's tools

An Experience Designed for the Medium

Page 10: Building tomorrow's web with today's tools

History has taught usto embrace change

Page 11: Building tomorrow's web with today's tools

History has taught usto question assumptions

Page 12: Building tomorrow's web with today's tools

History has taught usto have high expectations

Page 13: Building tomorrow's web with today's tools

How Mobileis Changing The Web

How The Webis Changing Mobile

Page 14: Building tomorrow's web with today's tools

2008

We must have aniPhone App!

Page 15: Building tomorrow's web with today's tools

2009

We must have anAndroid App!

Page 16: Building tomorrow's web with today's tools

2010

We must have aniPad App!

Page 17: Building tomorrow's web with today's tools

2011

We must have a...

Page 18: Building tomorrow's web with today's tools
Page 19: Building tomorrow's web with today's tools

omfg

Page 20: Building tomorrow's web with today's tools
Page 21: Building tomorrow's web with today's tools
Page 22: Building tomorrow's web with today's tools

PalmMicrosoft

Apple

Android

RIM RIMAndroidAppleMicrosoftPalm

Top U.S. Smartphone Platforms,3 Month Average Ending December 2010comScore MobiLens 2010

Java

J2ME

Air

C++

C#

Obj-C

JS

Page 23: Building tomorrow's web with today's tools

Cross-platformFamiliar skills & toolsDecentralizedEasily updatedIndexedWell-understood technologies

The Mobile Web

But what does this word even mean?

Page 24: Building tomorrow's web with today's tools

A perfect storm

Page 25: Building tomorrow's web with today's tools

ApplicationsDocuments

Programmatic DOMDeclarative HTML

JSON APIsThemes & templates

Arguments & signalsURLs

SynchronizationRequest/Response

Thick clientThin client

Page 26: Building tomorrow's web with today's tools
Page 27: Building tomorrow's web with today's tools

A New Web Stack

Worker Parallel

Processing

File SystemsDBs

App Cache

JavaScript

Semantic HTML

CSS Styling & Layout

WebFonts Video Audio Graphics

x-AppMessaging

Device Access

Camera

Location

Contacts

SMS

Orientation

Gyro

Server & Services

HTTP

AJAX

Events

Sockets

SSL

More...

Page 28: Building tomorrow's web with today's tools
Page 29: Building tomorrow's web with today's tools

Web technologiesare a

viable alternativeto native development

Page 30: Building tomorrow's web with today's tools

Apps vs Web technologybuilt with

Page 31: Building tomorrow's web with today's tools

ApplicationsDocuments

Programmatic DOMDeclarative HTML

JSON APIsThemes & templates

Arguments & signalsURLs

SynchronizationRequest/Response

Thick clientThin client

Mobile userSedentary user

This is what it means

Page 32: Building tomorrow's web with today's tools

Mobile isan adjective not a noun

Page 33: Building tomorrow's web with today's tools

@media screen and (max-w

idth: 480px) {

#logo {

background-image: ur

l(mobile.png);

}}

Page 34: Building tomorrow's web with today's tools

Mobile devices are di!erent

Phone

GPS device

Camera

Music player

Page 35: Building tomorrow's web with today's tools

Content-Type: applicatio

n/msword

Page 36: Building tomorrow's web with today's tools

The Mobile Webis not a

320px Web

Page 37: Building tomorrow's web with today's tools
Page 38: Building tomorrow's web with today's tools
Page 39: Building tomorrow's web with today's tools
Page 40: Building tomorrow's web with today's tools

How did those assortedtank tops work out for you?

Page 41: Building tomorrow's web with today's tools

Techniques

Page 42: Building tomorrow's web with today's tools

adaptationad·ap·ta·tion

noun /ˌadapˈtāSHəәn/  /ˌadəәp-/

1. The action or process of adapting

or being adapted

2. A movie, television drama, or stage play

that has been adapted from a written work

3. A change by which an organism or species

becomes better suited to its environment

Page 43: Building tomorrow's web with today's tools

Mobile adaptation

Presentational

Prioritizational

Permutational

Page 44: Building tomorrow's web with today's tools

Presentational adaptation

Layout

Page 45: Building tomorrow's web with today's tools

Prioritizational adaptation

Navigation and IA

Page 46: Building tomorrow's web with today's tools

Permutational adaptation

Functionality

Page 47: Building tomorrow's web with today's tools

The topology of adaptation

Client Proxy Server

Page 48: Building tomorrow's web with today's tools

Permutational

Prioritizational

Presentational

Client Proxy Server

Page 49: Building tomorrow's web with today's tools

‘Passive’ client adaptation

<a href="tel:/

/555">555</a>

Page 50: Building tomorrow's web with today's tools

Proxy adaptation

There’s a bad sort

There’s a good sort

Page 51: Building tomorrow's web with today's tools

HTML, CSS...

Models

Controllers

Views

Server adaptation

Page 52: Building tomorrow's web with today's tools

Models

Controllers

Mobile

DesktopSw

itch

er HTML, CSS...

Server adaptation

Page 53: Building tomorrow's web with today's tools

WordPress Mobile Packhttp://wordpress.org/extend/plugins/wordpress-mobile-pack

Device detection with plugins

WPTouchhttp://wordpress.org/extend/plugins/wptouch

Drupal Mobile Pluginhttp://drupal.org/project/mobileplugin

Page 54: Building tomorrow's web with today's tools

Brand consistency

Page 55: Building tomorrow's web with today's tools

if (isset($_SERVER['HTTP_X_WAP_PROFILE']) { ...

if (in_array(substr($user_agent, 0, 4), $prefixes)) { ...

if (strpos($accept, 'wap') !== false) { ...

if (preg_match("/(" . $keywords . ")/i", $user_agent)) { ...

https://github.com/jamesgpearce/mobiledetect

Device detection with PHP

Page 56: Building tomorrow's web with today's tools

class ApplicationController < ActionController::Base has_mobile_fuend

*.mobile.erb

is_mobile_device?in_mobile_view?

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

Device detection with Rails

Page 57: Building tomorrow's web with today's tools

var Connect = require("connect"), Monomi = require("monomi");

Connect.createServer(

Monomi.detectBrowserType(),

function(request, response, next) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.write('Hello World: '); response.end('you are using a ' + request.monomi.browserType); }

).listen(8080);

https://github.com/jamesgpearce/monomi

Device detection with node.js

Page 58: Building tomorrow's web with today's tools

Detection & user choice“Switch to our desktop site”

Page 59: Building tomorrow's web with today's tools
Page 60: Building tomorrow's web with today's tools

Thematic consistency

w3c-speak

http://mysite.com/posts/123

http://m.mysite.com/posts/123

Page 61: Building tomorrow's web with today's tools

Using di!erent URLscan preserve

the integrity of‘One Web’

Page 62: Building tomorrow's web with today's tools

Can I Use?http://caniuse.com

Modernizrhttp://modernizr.com

DeviceAtlashttp://deviceatlas.com

Device diversity

Page 63: Building tomorrow's web with today's tools

Permutational

Prioritizational

Presentational

Client Proxy Server

Passive client adaptation

Responsive Web Design

Proxy adaptation

Device detection

Mobile site

Page 64: Building tomorrow's web with today's tools

Permutational

Prioritizational

Presentational

Client Proxy Server

Passive client adaptation

Responsive Web Design

Proxy adaptation

Device detection

Mobile site

Page 65: Building tomorrow's web with today's tools

A dedicated mobile app

JSON

Models

Controllers

Mobile

DesktopSw

itch

ers

RESTonce

Page 66: Building tomorrow's web with today's tools

The stack of the present

Storage

Business logic

User interfacereq/res

Rendering

Page 67: Building tomorrow's web with today's tools

The stack of the future

Storage

Security Business logic

User interfacesync

Storage

The return of the thick client

Page 68: Building tomorrow's web with today's tools
Page 69: Building tomorrow's web with today's tools

Do we have time for some code?

Page 70: Building tomorrow's web with today's tools

Progressive enhancement

Page 71: Building tomorrow's web with today's tools

JSCS

S

apppr

ogre

ssiv

een

hanc

emen

t

HTM

L

doc

assu

mpt

ion

vs

HTM

LJS

CSS

app

assu

mpt

ion

+/- featuredetection

Page 72: Building tomorrow's web with today's tools

Thick client, thin server

The shortfall in the cloud

Page 73: Building tomorrow's web with today's tools

http://mysite.com/myimage.png

http://i.tinysrc.mobi/http://mysite.com/myimage.png

Page 74: Building tomorrow's web with today's tools

Permutational

Prioritizational

Presentational

Client Proxy Server

Mobile app

Passive client adaptation

Responsive Web Design

Proxy adaptation

Device detection

Mobile site

Cloud support

Page 75: Building tomorrow's web with today's tools
Page 76: Building tomorrow's web with today's tools

Mobile isan adjective not a noun

Page 77: Building tomorrow's web with today's tools

The Mobile Webis not a

320px Web

Page 78: Building tomorrow's web with today's tools

History has taught usto embrace change

Page 79: Building tomorrow's web with today's tools

History has taught usto question assumptions

Page 80: Building tomorrow's web with today's tools

History has taught usto have high expectations

Page 81: Building tomorrow's web with today's tools

James Pearce Director, Developer Relations @ jamespearce [email protected]