Slide 1

Slide 1 text

We’ve got a website for that HTML5 and the future of the mobile web

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

In the beginning, there was the web And the web was Good.

Slide 4

Slide 4 text

The Web Free Open Interoperable Accessible Unregulated Uncontrolled Co-operative

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

The web has transformed our lives. Now we need that stuff on the move.

Slide 7

Slide 7 text

1999: WAP . Seriously?

Slide 8

Slide 8 text

2001: BlackBerry. Now we’re talking. (except ironically we’re not talking because Blackberry wouldn’t add phone capabilities for another 3 years)

Slide 9

Slide 9 text

2007: iPhone. Cracked it.

Slide 10

Slide 10 text

2008: Apps arrive. Web largely forgotten.

Slide 11

Slide 11 text

Apps Paid Proprietary Platform specific Inaccessible Regulated Controlled Uncooperative

Slide 12

Slide 12 text

But wait, what exactly is an app, anyway?

Slide 13

Slide 13 text

Adaptive design •  Completely flexible viewport size •  Use ALL of the space on the screen •  Nothing partial, everything balanced •  Like it was designed to fit your screen

Slide 14

Slide 14 text

Adaptive interface •  Mouse and keyboard •  Touchscreen •  TV remote •  Games console controller •  3D motion capture •  Speech •  Thought

Slide 15

Slide 15 text

People built apps because their websites weren’t adaptive to the new touch interfaces

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

But an ‘app strategy’ is questionable

Slide 18

Slide 18 text

So, couldn’t we just make a website do all that app stuff?

Slide 19

Slide 19 text

Challenges •  Layout •  Navigation and interaction •  Offline use •  Rethink backend architecture

Slide 20

Slide 20 text

Flowed columns

Slide 21

Slide 21 text

Flowed columns

Slide 22

Slide 22 text

Flowed columns •  CSS columns not good enough •  We measure content and cut it into positioned containers using JavaScript – Deal with fixed elements first – Columnflow library to be open sourced soon

Slide 23

Slide 23 text

Content balancing

Slide 24

Slide 24 text

Classifying devices by resolution

Slide 25

Slide 25 text

Swiping between sections

Slide 26

Slide 26 text

Fastclick •  Touch is instant, but click requires ~300ms linger •  Some taps are shorter •  'Fastclick' layer to detect very brief taps, and convert to clicks •  Used for devices that fire touch events •  Used eg. for tapping through pages of an article •  Disables interactions like double tap to zoom •  Open-sourced by Assanka, assanka.net/fastclick

Slide 27

Slide 27 text

Offline use •  Launching the app offline •  Making text content available offline •  Storing content images offline •  Analytics

Slide 28

Slide 28 text

Booting •  Every page needs to be able to initialise using old code, then update itself •  Not all users will see the same thing – We still have some running 6 month old code! •  Don’t break the web – remember you have pages, not a monolithic single page app. – Avoid tedious start-up sequence on every real pageload.

Slide 29

Slide 29 text

Offline technologies •  Application cache (manifest) is: –  used for bootstrap page and static files –  seriously flakey. Use sparing. –  extremely annoying. Set a dynamic comment or auto- change manifest when resources change •  WebSQL / SQLite / IndexedDB is: –  used for indexed content, articles, images etc. –  slow. Consider local storage instead. •  Local storage is: –  used for key/val storage, app settings, config, prefs –  fast and relatively reliable

Slide 30

Slide 30 text

Rethink the backend •  Build an API framework •  Use the API from your JS application •  Multiple API requests per HTTP request •  Multiple ways of requesting a page: – Fully wrapped – Fragment – API request

Slide 31

Slide 31 text

Unresolved problems •  SSL/padlock: We tell you it's secure, and, er, you trust us. •  Social media integration: Twitter/FB SSO mechanism can't be integrated into a one-page app •  Offline adverts: No clicks, no live impression recording, no advanced targeting •  Automated QA: Many times more complex than desktop apps

Slide 32

Slide 32 text

Useful tools •  Charles – www.charlesproxy.com •  WeinRE – phonegap.github.com/weinre/ •  WebDriver for mobile browsers – http://code.google.com/p/selenium/wiki/ WebDriverForMobileBrowsers

Slide 33

Slide 33 text

In summary •  Ease of use is critical. Adapt, adapt, adapt. •  The web can do this •  Web approach retains all the benefits of the web that you give up when building native.

Slide 34

Slide 34 text

“Don’t build native apps, build web apps” -­‐  Tim  Berners-­‐Lee  

Slide 35

Slide 35 text

Questions? •  Andrew Betts •  [email protected] •  You should follow me on twitter here: – @triblondon •  Build this stuff: – assanka.net/jobs