64
HTML5 BEYOND THE HYPE: LET’S MAKE IT WORK ? Christian Heilmann, Mozilla (@codepo8) Hungarian Web Development conference, Budapest, 8/11/13

Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

Embed Size (px)

DESCRIPTION

We're past the honeymoon period of HTML5 by now. The excitement of inflated promises is over and we start wondering what to do – use HTML5 or just build an iOS app instead? In this talk Chris Heilmann of Mozilla will show what HTML5 is really good for, what its problems are, what causes a lot of these problems and how new operating systems like Firefox OS work and conversion tools like PhoneGap work around these issues. You'll see the now of HTML5 and what is cooking in the kitchens of browser makers and standards bodies that will developing and deploying apps cross-platform much easier than it is now. We have a lot of tools at our disposal, we simply need to dare to use them.

Citation preview

Page 1: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

HTML5 BEYOND THE HYPE: LET’S MAKE IT WORK

?!Christian Heilmann, Mozilla (@codepo8) Hungarian Web Development conference, Budapest, 8/11/13

Page 2: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WHAT IS HTML5?

http://www.flickr.com/photos/37031529@N00/4468724263/

Page 3: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

PROMISES OF HTML5

Page 4: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

REALITIES OF HTML5

Page 5: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

"CAN HTML5 COMPETE WITH NATIVE?"

developereconomics.com/downloads/can-html5-compete-native/

Page 6: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

LACK OF APIS!

!

“63% of HTML5 mobile developers go direct to browser when developing a mobile website or app. The browser is the most popular route to the mobile market. Yet 61% of Android apps (US) cannot be implemented via the mobile browser due to lack of APIs.”

developereconomics.com/downloads/can-html5-compete-native/

Page 7: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

NO FIRST CLASS CITIZEN STATE

“37% of Android apps could be implemented using HTML5 via the Mobile browser, 49% via Phonegap, 63% via Appcelerator and 98% via Firefox OS.”

developereconomics.com/downloads/can-html5-compete-native/

Page 8: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

BROKEN COMPARISONS

http://www.flickr.com/photos/richardnorth/7037250865http://www.flickr.com/photos/orangeacid/212833788

Page 9: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

DIFFERENT GOALS…

NATIVE APPS WEB APPS / SITESProvide the best experience in a defined environment.

Reach the largest amount of users, regardless of location, technical environment or ability.

FIXED IN A CURRENT STATE.FIERCELY FLEXIBLE AND ADAPTING

Page 10: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

DIFFERENT APPROACHES…NATIVE ENVIRONMENTS THE WEB

Innovate with closed, patented technology and secret features to gain advantage over competitors.

Use browser maker innovation to agree on standards, stay backwards compatible and vendor independent.

QUICK RESULTS, NO VISIBILITY, CONSTANT REPLACEMENT

HIGH VISIBILITY, CONSENSUS AND MAINTAINABILITY.

Page 11: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

For an HTML5 solution to be as good as a native implementation, it would only have to work on one browser, on one operating system, on one defined piece of hardware in a fixed specification. !!

This is against everything the web stands for and not what HTML was invented for…

Page 12: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WORRYING TRENDS…

Page 13: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

GET OUR APP!We don’t care if you came from an email or entered a URL, this is about us, not you!

Page 14: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

CREATING A FIRST WORLD WEB…

Page 15: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

RE-INVENTING FLASH

“There comes a time in every URL’s life where it needs to decide whether it wants to be a powerpoint, a movie, or an actual website.”

"Scroll Hijacking" by Trent Waltonhttp://trentwalton.com/2013/10/23/scroll-hijacking/

Page 16: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

BENEFITS OF THE WEB…

Page 17: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

MILLIONS OF DEVELOPERS

Page 18: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

INCREDIBLE REACH

Page 19: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

CUSTOMISABLE EXPERIENCES

Page 20: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

ATOMIC UPDATES

Page 21: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

APP STORE INDEPENDENCE

Page 22: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

TACKLING HTML5 ISSUES…

Page 23: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

SOME FACTS…★ Released in eight countries: Spain, Poland, Venezuela,

Peru, Colombia, Brazil, Mexico, Germany

★ 18 mobile operator partners, 7 hardware partners

★ Hardware options: Alcatel One Touch Fire, ZTE Open, Geeksphone Keon, Geeksphone Peak, LG Fireweb

★ Aimed at emerging markets/low end market

★ Aimed to be an alternative to feature phones and unavailable closed environments.

★ Open source - it is all on GitHub

Page 24: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

SECURITY

Page 25: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

APPLICATION MANIFEST{ "version": "1.0", "name": "MozillaBall", "description": "Exciting Open Web development action!", "icons": { "16": "/img/icon-16.png", "48": "/img/icon-48.png", "128": "/img/icon-128.png" }, "developer": { "name": "Mozilla Labs", "url": "http://mozillalabs.com" }, "installs_allowed_from": ["*"], "appcache_path": "/cache.manifest", "locales": { "es": { "description": "¡Acción abierta emocionante del desarrollo del Web!", "developer": { "url": "http://es.mozillalabs.com/" } } }, "default_locale": "en" }

Page 26: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

Privileged Web App

More access, more responsibility

Web Content

Regular web content

APPLICATIONS

Installed Web App

A regular web app

Certified Web App

Device-critical applications

Page 27: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

PERMISSIONS

"permissions": { "contacts": { "description": "Required for autocompletion in the share screen", "access": "readcreate" }, "alarms": { "description": "Required to schedule notifications" } }

Page 28: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

HARDWARE ACCESS

Page 29: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WEB APISVibration API, Screen Orientation, Geolocation API, Mouse Lock

API, Open WebApps, Network Information API, Battery Status API,

Alarm API, Push Notifications API, WebFM API / FMRadio,

WebPayment, IndexedDB, Ambient light sensor, Proximity sensor,

Notification, Device Storage API, Browser API, TCP Socket API,

Contacts API, systemXHR, WebTelephony, WebSMS, Idle API,

Settings API, Power Management API, Mobile Connection API,

WiFi Information API, WebBluetooth, Permissions API, Network

Stats API, Camera API, Time/Clock API, Attention screen, Voicemail

https://wiki.mozilla.org/WebAPI

Page 30: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

BATTERY STATUS API

Page 31: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

BATTERY STATUS API

var battery = navigator.battery; if (battery) { var batteryLevel = Math.round(battery.level * 100) + "%", charging = (battery.charging)? "" : "not ", chargingTime = parseInt(battery.chargingTime / 60, 10), dischargingTime = parseInt(battery.dischargingTime / 60, 10); // Set events battery.addEventListener("levelchange", setStatus, false); battery.addEventListener("chargingchange", setStatus, false); battery.addEventListener("chargingtimechange", setStatus, false); battery.addEventListener("dischargingtimechange", setStatus, false); }

Page 32: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

VIBRATION API

Page 33: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

VIBRATION API

// Vibrate for one second navigator.vibrate(1000); // Vibration pattern [vibrationTime, pause,…] navigator.vibrate([200, 100, 200, 100]); // Vibrate for 5 seconds navigator.vibrate(5000); // Turn off vibration navigator.vibrate(0);

Page 34: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

NETWORK INFORMATION API

Page 35: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

NETWORK INFORMATION API

var connection = window.navigator.mozConnection, online = connection.bandwidth > 0, metered = connection.metered;

Page 36: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

PAGE VISIBILITY

Page 37: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

PAGE VISIBILITY

document.addEventListener("visibilitychange", function () { if (document.hidden) { console.log("App is hidden"); } else { console.log("App has focus"); } });

Page 38: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WEB ACTIVITIES

Page 39: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

GET A PHOTO?

Page 40: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!
Page 41: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

APP DISTRIBUTION

Page 42: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

FIREFOX OS MARKETPLACE

https://marketplace.firefox.com/

Page 43: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

FXOS, ANDROID, WINDOWS, OSX, LINUX

https://hacks.mozilla.org/2013/10/progress-report-on-cross-platform-open-web-apps/

Page 44: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

INSTALL FROM THE WEB…

Page 45: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

TOOLING

Page 46: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

DEVELOPER ENVIRONMENT

Page 47: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

GOOGLE WEBDESIGNER

https://www.google.com/webdesigner

Page 48: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

ADOBE EDGE SUITE

http://html.adobe.com/edge/

Page 49: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

SENCHA

http://www.sencha.com/products/touch/

Page 50: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

RE-USE WITH PHONEGAP

https://build.phonegap.com/

Page 51: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WHAT’S COOKING?

Page 52: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WEBCOMPONENTS

http://customelements.io

Page 53: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WEBCOMPONENTS

http://www.polymer-project.org/

Page 54: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

MOZILLA BRICK

http://mozilla.github.io/brick/

Page 55: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WEBRTC

http://www.google.com/hangouts/

Page 56: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

WEBRTC

https://togetherjs.com/

Page 57: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

ASM.JS / EMSCRIPTEN

https://blog.mozilla.org/blog/2013/03/27/mozilla-is-unlocking-the-power-of-the-web-as-a-platform-for-gaming

Page 58: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

USING HTML5 NOW

Page 59: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

STAY UP TO DATE

Page 60: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

MOBILE AND OFFLINE FIRST

Page 61: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

FLEXIBILITY IS THE SUPERPOWER

Page 62: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

BE FEARLESS…

Page 63: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

FIREFOX OS APP WORKSHOP!Saturday, November 23rd Budapest, Hungary.

• Port your app with our experts • Get a phone to deploy and test your

app on! • Food + Drinks is sorted - you need to

sort out travel and hotel • Talk to the local Mozillians outside!

https://mozhacks.wufoo.com/forms/r81kw881ft7mgd/

Page 64: Hungarian Web Conference: HTML5 beyond the hype - let's make it work!

THANKS! CHRIS HEILMANN @CODEPO8