Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
J V e now
5 & t fu
I work at Mozilla.
If you’re unsure about how much I love Mozilla then check out this beautiful chicken and leek
pie with extra Firefox goodness.
It was made by my talented girlfriend and it was delicious.
My official job title is Technical Evangelist but I prefer what it says on my business card.
Part of my job is to engage with developers and designers like you and I about cool new
technologies on the Web.
And for those of you with no idea of what a rawket is, I made a multiplayer game called
Rawkets in which players ﬂy around in little rockets and shoot each other in the face with the
latest Web technologies.
It’s actually quite fun!
Like Kerri-Anne I’m also a recent graduate, last May I ﬁnished my degree in Interactive Media
Production at Bournemouth University.
We should have enough time for questions at the end but also feel free to grab me in person
after this talk or on Twitter. I’m always happy to help.
These slides will go online after this talk and they’ll be available from my personal website.
I’ll put all the details up at the end.
Created by Phil Banks (@emirpprime)
Now, it’s no secret that I spend most of my time experimenting with HTML5 and other cool
If you’ve met me before then you probably already know about my slight addiction to HTML5
canvas, visual programming, and gaming.
5 & fuss
M at is all the
HT h W
u td or the fu
g o bf
din g the W e
At the heart of matters, HTML5 is basically just an incremental upgrade to HTML that
provides a few new features that are desperately needed.
It’s important not to look at HTML5 as an entirely new language, instead look at it as various
improvements to what already exists.
additions to the existing programming language to provide new features.
n o de
They are open technologies.
Anyone can get involved in their creation; through browser developers like Mozilla, or
through standards organisations like the W3C and WHATWG.
Not long ago I was in a W3C meeting to explore what is needed for making games with these
technologies. What was cool was that anyone was allowed to take part; which included
everyday developers, employees of major browsers, and games companies.
Also, these technologies are open in that anyone can view the resulting code that is used
within Web pages, which is a fantastic way of learning.
n o ith
e c h lop
e t de
They are free technologies.
Anyone can use these technologies without having to pay anything, both for using the
technology and developing with it.
This is unlike closed environments like Flash where you have to pay to use official code
editors and production environments.
They are technologies baked directly into the browser, which means no more plugins!
No longer do you have to rely on users having third-party software installed to use rich
e ra s
These technologies are built to work across platforms; whether that’s desktop, mobile, TV, or
This makes it great to develop this way because you can be sure that it will work the same
way on any platform that has support.
s u ed
se r up
ro w ares
ross ajor feat
As with any technology on the Web it’s important that you can use it across all the major
Fortunately the bigger and older features of HTML5 like video are supported by all the major
browsers, with some of the newer and smaller features getting better support as time goes
The situation isn’t perfect but we’re deﬁnitely in a position where these technologies can now
be used in production.
There’s a fantastic website called Can I Use which lets you know what browsers support each
y fa featur
that I could probably spend an entire day telling you about them.
I don’t have that luxury today, so I’m going to show you some of my favourites to help spike
c o eb
n d rn
tu re for
Some of the most useful additions with HTML5 are the structural and content elements.
I won’t be covering them all but I’d like to highlight a few of the most prominent.
<section> describes a generic section of website, allowing content to be grouped into logical
themes and areas.
<header> describes the header of a website or area of content, commonly things like a logo,
navigation, or header text in a body of content.
<footer> describes the footer of a website or area of content, commonly things like
copyright notices and supplemental navigation.
<nav> describes content that aids in the navigation of a website or content
<article> describes an area of content that is self-contained and could potentially be
distributed through multiple methods (like RSS), commonly things like blog posts and news
<aside> describes an area of content that is related to the content surrounding it but that
isn’t that important within itself, commonly things like pull-quotes.
<ﬁgure> describes content that annotates the surrounding content using something like an
image, video, or code.
<ﬁgcaption> describes the caption of <ﬁgure> content and should therefore be placed
within the <ﬁgure> element.
<mark> describes words and phrases that are considered important for the purpose of
referencing, like highlighting key words in a quote from another piece of content.
<time> describes date or time-related content
Forms are another area of HTML5 that got a big upgrade.
One of those areas is basic validation of inputted data on the client-side, that is the user’s
This type of validation can be easily worked around but it’s useful for providing hints to a
user when they enter incorrect information without having to send the data to a server or run
type=… email, tel, url
There are also whole bunch of new input types for forms, including…
Email, tel, and url, which cause the on-screen keyboard on mobile phones to change to
remove or add relevant keys. For example, only showing numbers for an input ﬁeld with a
type of “tel”.
Date, which makes it dead easy to let users select a date from a calendar.
Color, which is an interesting type that shows a colour palette to select colour values from.
Range, which limits the user to selecting a number within a deﬁned range.
Along with the added input types are brand new form elements.
<progress> describes part of a form that shows progression, like the status of a ﬁle that’s
<meter> describes part of a form that shows a measured outcome, like the ﬁnal grade out of
10 in an exam.
<output> describes part of a form that shows the results of a calculation performed by the
of the user.
This information is massively useful for websites that provide location-based services,
predominantly search-based services.
It’s also useful for automating the process of ﬁnding a users town or country and using that
data to pre-populate a form, saving the user some of their precious time.
Security and peace of mind is of paramount importance with the new features being
The Geolocation API is no exception and a browser will only be able to access your personal
information if you explicitly allow it to each and every time.
cal s ster
There are a variety of solutions available that each allow you to access and store data on a
They are IndexedDB, Local Storage as well as the various File and FileSystem APIs.
IndexedDB and Local Storage allow large quantities of data to be stored in a structural way
within a user’s browser, with IndexedDB even allowing ﬁles to be stored as well.
save and retrieve ﬁles much larger than would be permitted in any other solution.
o rk rs
b W othe
W g tasks to
the background without slowing down and interfering with the user’s browsing experience.
Their purpose is quite speciﬁc but they’re useful for creating applications that might need to
analyse a lot of data behind the scenes.
to ht way
This is exciting because is allows dynamic AJAX-type websites to continue loading content
without refreshing the page while not breaking the back and forward buttons within the
browser. Normally this wouldn’t be possible.
re e ul
The Full Screen API allows you to expand any HTML element to ﬁll the users screen, even if
the browser isn’t running full screen itself.
It’s a really simple API that is useful for immersive visual media like video and games.
As I mentioned at the beginning, canvas is easily one of my favourite new features.
canvas and manipulate it.
It’s quite amazingly what can be done with such simple drawing and image manipulation
Silk is a stunning example of what can be achieved by combining the simple drawing tools
available in canvas.
Close Pixelate is a canvas app that lets you manipulate images on–the-ﬂy to create a
You can even use canvas just for simple effects on a standard Web page.
David Desandro uses canvas to draw curved lines on his portfolio that indicate areas of focus.
Before canvas you’d have had to have used static images or complex techniques to achieve
Google Plus has a seriously cool feature that lets you take a screenshot of a page and
highlight areas of interest. It’s great as a user can highlight areas of a problem and submit
the screenshot for feedback.
I’m unsure if they are using canvas here, but it’s not impossible for canvas to be used in this
way and it’s a really innovative use of the technology.
WebGL brings the ability to provide advanced 3D graphics directly within the browser.
It’s great for gaming and visualisations.
HelloRacer is a little game that lets you drive a Formula One car around your browser. It’s a
beautiful example of WebGL in action.
Rome is a music video created with WebGL. It’s an amazing example of what the technology
can achieve in a real-world situation given a large and talented team.
Tinkercad is probably the most practical use of WebGL that I’ve seen in a production
It’s a Web app that allows you to create 3D objects in your browser using WebGL, then get
them printed and sent to your doorstep in just a few simple clicks. It’s seriously awesome.
This is a rather freaky example of how interesting WebGL is.
It’s a demo that shows just how realistic WebGL can render materials, like skin. This isn’t
much unlike the quality of modern games consoles!
HTML5 video is one of the biggest improvements with HTML5; no longer do you have to rely
on Flash to provide rich video on the Web.
SublimeVideo is a service that allows you to implement beautiful HTML5 video across all the
It’s main draw is the custom video controls that look really pretty.
Popcorn.js is quite simply one of the most interesting tools that exists for HTML5 video.
It allows you to tie-in video to content on the Web page, meaning that you can automatically
change the website content depending on what point of video is currently being played.
Along with HTML5 video comes HTML5 audio, which again means that there is now a
legitimate alternative to Flash.
This is something I made especially for the ASSEMBLY 2011 event in Finland.
It’s an audio visualiser that uses WebGL and the HTML5 Audio Data API.
W omm un
WebSockets are another technology at the top of my list.
It allows you to provide bi-directional real-time communication between a browser and a
This means you can push a user data instantly as soon as it becomes available.
WebSockets are commonly used in situations where speed is important; like in games, the
stock market, and chat.
Rawkets is the game I mentioned at the beginning that allows you to shoot your friends in the
face with WebSockets and canvas.
It’s still not really at a beta release level yet hence the bugs you might notice in this video,
but it’s a good demo of a game created using these technologies.
Pusher is a service that lets you push data to your users in real-time using WebSockets.
It’s a great example of how easy it is to use these technologies today in your project.
Device APIs is a catch-all term for the technologies that allow developers to access hardware
At Mozilla we’re working on the WebAPI effort which is our attempt at solving this problem.
In other camps it might be referred to as DAP, which is the Device APIs Working Group who
The approach we’re taking is to try and replicate the functionality of a mobile phone with
What APIs would you need to do that?
y f ait
There are so many Device APIs in the pipeline when you combine all the efforts by the various
Here are just a few of my favourites.
ia C m icro
The Media Capture API will let you access the camera and microphone on a device.
For example, instead of requiring a user to upload a proﬁle image you could take one using
the webcam and use that instead. Simple but effective.
You could also do things like using the microphone input for voice recognition in for input
areas. I know Google are already experimenting heavily in this area.
The WebNFC API is pretty cool.
It gives you the ability to transmit and receive data within distances no larger than a few
The idea is that it can be used in phones for things like payment (like the new Barclaycard),
travel (think Oyster Card), and ﬁle transfer.
SM f said
The WebSMS API isn’t the most glamorous, but the idea of sending text messages with
o n lls
p h ca
I can just imagine something like this being used to hook into a Web-based version of Siri
that answers your calls for you if you’re busy.
ra to ies
But my new favourite by far is the WebVibrator API, it just makes me laugh every time I hear
The major beneﬁt is that your code can run asynchronously, which means that you can do
multiple tasks at once without having to wait for previous ones to ﬁnish.
Another useful thing about Node is that the community have produced hundreds of free
modules for it to add extra functionality, which means that it saves you a tonne of time when
making your Web app.
M d on the
There are so many thing that I don’t have time to talk about.
There are loads of resources around to help you ﬁnd out more about these technologies if
Dive Into HTML5 - http://diveintohtml5.org
HTML5 Doctor - http://html5doctor.com
Mozilla Developer Network - https://developer.mozilla.org
thin s now
m The timei
So overall, I hope it’s obvious that we’re on the threshold of something awesome.
We can now create amazing websites, apps, visualisations, and even games all with the same
This is deﬁnitely a good time to be developing on the Web and I hope I’ve managed to peak
Personal website and blog
RECENT PROJECTS MORE COOL STUFF
Twitter sentiment analysis Rawket Scientist
Delving into your soul Technical Evangelist at Mozilla
HTML5 & WebSockets game Web development podcast
Get in touch with me on Twitter: @robhawkes
Follow my blog (Rawkes) to keep up to date with stuff that I’m working on: http://
I’ve recently worked on a project that analyses sentiment on Twitter: http://rawkes.com/
Foundation HTML5 Canvas
Paperback and digital formats
Become a canvas master
Learn how to animate
Make two cool space games
Foundation HTML5 Canvas is out now on Amazon and other reputable book stores.
Coming back this year
One hour every fortnight
ASKMDN Web development topics
@ASKMDN & #ASKMDN ON TWITTER
And lastly, I’d like to quickly mention Ask MDN which is a project that I’m working on at
The concept is simple. One hour every fortnight we gather a bunch of experts on Twitter to
answer your questions about a particular topic.
We’ve had 4 sessions to date and it’s going down really well. If you follow @AskMDN on
Twitter you’ll be sure not to miss the next session.
TH An R b
If you have any questions feel free to grab me on Twitter (@robhawkes) or email