HTML5 and Javascript

VIInternet και Εφαρμογές Web

11 Οκτ 2011 (πριν από 6 χρόνια και 9 μήνες)

703 εμφανίσεις

Awesome Technology on the Web Rob Hawkes

Awesome Technology on the Web
Rob Hawkes
Hi, I’m Rob Hawkes and I’m here to talk a little about HTML5 & JavaScript to show you some
of the awesome things that you can do with them.
If you don’t already know, I work at Mozilla.
My official job title is Technical Evangelist, but I prefer Rawket Scientist, which is what it says
on my business card.
Part of my job is to engage with developers and related communities about cool new
technologies on the Web.
And for those of you with no idea of what Rawket means, I made a multiplayer game called
Rawkets in which players fly around in little rockets and shoot each other in the face with the
latest Web technologies. It’s quite addictive!
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 and visual programming.
Also, please don’t hesitate to ask a question as we go along.
All I ask is that you raise your hand and I’ll get to you as soon as I can.
It’s worth noting that these slides will be online on my blog very soon if you want to see them
again or want to check out the notes.
It’s worth mentioning that I’m in jet-lag and travel-confusion mode at the moment.
I flew back from the US last week only to then travel to Poland for a HTML5 gaming
conference a couple days later.
I only got back from there this past Saturday evening to find myself jumping on a train from
Bournemouth at 6am today to come see you guys.
It’s a lot of travelling and it can be massively confusing, especially when you sleep through
the entire flight to Poland and realise that you could be in any city in the world right now,
although it did turn out to be Warsaw which *is* in Poland and luckily the right city.
I am in England now, right?
HTML5 & JavaScript
What is all the fuss about?
I mentioned that this talk is all about HTML5 & JavaScript, but why are they important? What’s
all the fuss about?
Open technologies
Anyone can view the source code
They are open technologies.
Anyone can get involved in their creation; through browser developers like Mozilla, or
through standards organisations like the W3C.
Just a few days 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.
Free technologies
Free to use. Free to develop with
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.
No more reliance on third-party software
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
They are built to work across platforms
These technologies are built to work across platforms; whether that’s desktop, mobile, TV, or
anything else!
This makes it great to develop this way because you can be sure that it will work on any
platform that has support.
Cross-browser support
Most major features are supported
As with any technology on the Web it’s important that you can use it across all the major
Fortunately the bigger 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 on.
The situation isn’t perfect but we’re definitely 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
technology -
My favourites
Highlighting some the best new features
There are so many new features that HTML5 & JavaScript bring to the table. So many in fact
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
your imagination.
2D graphics platform
As I mentioned at the beginning, canvas is easily one of my favourite new features.
Canvas is a 2D graphics platform that uses both HTML5 and JavaScript.
You use HTML5 to place a canvas on a Web page, and you use JavaScript to draw on to that
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-fly to create a
pixelated effect.
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.
3D graphics platform
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 team.
Tinkercad is probably the best use of WebGL that I’ve seen in a production situation.
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!
The reliance on Flash is over
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
major browsers.
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.
More Flash reliance vaporisation
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.
Bi-directional real-time communication
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.
Run JavaScript on the server
Node isn’t technically part of the new HTML5 & JavaScript technologies, but it’s too cool to
miss out.
Effectively what Node allows you to do is to run JavaScript code on the server, which has
many benefits.
The major benefit 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 finish.
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.
Many more
Much has changed on the Web
There are so many thing that I don’t have time to talk about.
Things like CSS3, HTML5 Forms, Web Fonts, File APIs, Web Apps and much, much more!
There are loads of resources around to help you find out more about these technologies if
you’re interested:
Dive Into HTML5 -
HTML5 Doctor -
Mozilla Developer Network -
The future
We are only at the beginning
As well as the current technologies that exist in HTML5 & JavaScript there are also some
important one coming in the near-future.
Things like Web APIs to provide a basic phone experience on the Web.
Or WebRTC to provide real-time audio/visual communication, like Skype.
And I’m sure there’s even more amazing stuff on the horizon.
Threshold of something cool
The time is now
So overall, the time is now; we’re on the threshold of something awesome.
We can now create amazing apps, visualisations, and games with nothing more than the
technologies normally use to build a website.
This is definitely a good time to be developing on the Web and I hope I’ve managed to peak
your interest in the platform.
Rob Hawkes
HTML5 & WebSockets game
Twitter sentiment analysis
Delving into your soul
Personal website and blog
Web development podcast
Rawket Scientist
Technical Evangelist at Mozilla
Twitter - @robhawkes
Rawkes -
Become a canvas master
Out now
Paperback and digital formats
Learn how to animate
Make two cool space games
Foundation HTML5 Canvas
Foundation HTML5 Canvas is out now on Amazon and other reputable book stores.
Hand-picked experts
One hour every fortnight
Web development topics
Great discussions
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.
Any questions?
Rob Hawkes
Thank you.
If you have any questions feel free to grab me on Twitter (@robhawkes), or email