Start learning with our library of video tutorials taught by experts. Get started

HTML5 Power Workshop
Illustration by

Setting the scene


From:

HTML5 Power Workshop

with Andy Olsen

Video: Setting the scene

Hello. My name's Andy Olson and welcome to the course. In this course, we're going to look at the variety of new HTML5 features that are very powerful, and allow you to create sophisticated web applications. I've got some examples that I'm going to go through in this lesson just to give you an idea of what to expect. I'm not going to go into the code in this lesson, because obviously we'll do that later. Also, I'm not going to attempt to give you a comprehensive insight into all the features, because obviously we'll be doing that later on, as well.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
HTML5 Power Workshop
3h 9m Intermediate May 31, 2012

Viewers: in countries Watching now:

In this course, part of his series of titles on HTML5 and CSS3, author and expert Andy Olsen looks at advanced topics like geolocation, mobile development, web sockets, Web SQL, and web workers. You'll also learn how to communicate between pages downloaded from different servers and how to use the new Ajax features in XMLHttpRequest Level 2. After completing this workshop, developers be well equipped to start utilizing the powerful features of HTML5.

Topics include:
  • Using the Communications API
  • Understanding geolocation
  • Getting and watching the current position
  • Using web workers and WebSockets
  • Implementing mobile web user interfaces
  • Managing data in a mobile web application
  • Working offline
  • Using Web SQL
  • Using drag-and-drop
Subjects:
Developer Web Web Design Web Development video2brain
Software:
HTML
Author:
Andy Olsen

Setting the scene

Hello. My name's Andy Olson and welcome to the course. In this course, we're going to look at the variety of new HTML5 features that are very powerful, and allow you to create sophisticated web applications. I've got some examples that I'm going to go through in this lesson just to give you an idea of what to expect. I'm not going to go into the code in this lesson, because obviously we'll do that later. Also, I'm not going to attempt to give you a comprehensive insight into all the features, because obviously we'll be doing that later on, as well.

I just wanted here to give you a flavor of what to expect. So, we have examples on geoIocation. Wait and find out where you're located. Noble development. Websockets, which is a bit like client server communication between the browser and the server. WebSQL, which allows you to use SQL syntax to store data in the database in the browser. And web workers, which is multi-threading. Now some of these examples require you to run the application through a web server.

So what I've done on my machine is to copy all of these examples onto the Web Publisher folder for Microsoft IIS. So that's a folder called Inetpubwwroot. And you can see here, I've copied each of those folders into here. And I've run each of the examples through local host. So they've been served up through the web server. I've already opened the files in Chrome, other browsers would work as well, and I'll just lead you through these examples in this lesson.

So first up, we have a key location example for getting current position for HTML. This geolocation has an API, which allows you to find out where you are longitude and latitude. Either as a one off request, or as a continual request to tell me every time I move around geographically. This simple example, when I Click the button, makes a one off geolocation request, and it tells me my latitude, 51 degrees north of the equator, and my longitude, which is four degrees, west of Greenwich.

So, do you know where I am? I'm in Swansea. It also tells me a time stamp. So it's the 15th of March and summer is on the way. So that's an example of geolocation. Next example is Web workers. This is multi-threading, an HTML file can reference JavaScript files and run that code in a separate thread. So when I click this button, start Worker. It creates a web worker that sends a message.

Code executes in a background thread. And when the code is finished, it sends me back a response, and in this simple example it's just an uppercase version of the text that I sent in. A web page can start any number of web workers. So if I Click the Start Worker Button several times. I now have several workers running in parallel. So you can achieve multi-threading, and you can keep the user interface responsive, while doing something in the background. You can also cancel a background worker if you want to, because the user might not want to complete an operation, for example.

Okay, next example is Web Sockets. Web Sockets support sophisticated communication between a web browser and a server. For example, a web browser can connect to a web server and send a message. And then the server can send back responses any time it wants to. The connection can remain open. To allow two way communication at any time between the browser and the server. So it's actually very sophisticated. Obviously, this requires a server. In the lesson where we look at this in detail, I'll explain how to set this up. But in brief, I'm using node JS as my web server.

And this is how you start in node JS to run my example server application. So when I do that, it starts listening on port 8888, as a random port number that I chose. If I got back into the browser and I just Press F5 to refresh the view, when the page loads, immediately it opens a web socket connection to the server. And the server knows how many clients it connected. So at the moment there's one client connected.

The client can send a message to the server at anytime. So for example, I can Type in Super Swans. And I Press Send to server and if I just scroll down a little. You can see that the server bounces the same message straight back to me. Like so. Also, we can have multiple clients talking to the same server. So, I'll just take the URL here and Open a new Tab and then Paste the URL in, Press Enter.

So now, there were two clients connected to the same server. If I close this window, it disconnects. Back in my original tab, if I scroll down a little, then it realizes now there's just one client connected again. There were two, but now there's just one. So that's Web Sockets. Next example is Mobile Application Development. There are several mobile HTML libraries that you can use.

In the lesson where we look at this in detail, I'm going to show you how to use jQuery mobile to create a web application like this that's designed to look good on a mobile device. So it's a list of training courses that you might want to attend. I can Click on a link to open up a new page. And it looked kind of good in a mobile device. I can go back. I can create a new course. Let's say we wanted to have a course on C++. That's going to be five days, and we're going to get certified after it.

And I'll Click Save. And there's the new item there. So, jQuery Mobile, great, we'll have a look at that later in the course. Last example I want to show you just now, is WebSQL. Web SQL allows you to use SQL syntax to store data in a database built into the browser. It's based on local storage, and the example I've got here allows me to enter courses and duration and store them in a database. So let's say we wanted to have a course on C++.

That was going to be five days Add Course. So it stores that in my Client Save Database. Let's say we also wanted to have a course on WPF. And let's say that course is going to be four days. Add Course. So we now have two rows. Select courses, tells me all the details. I can delete the course and I've just deleted the WPF course. That's no longer there.

So that's just a quick run through. The capabilities of HTML5 that we look at here in the course. Lots more details to come obviously, but it gives you an idea of where we're headed. We're going to have look at key location, multi-threading, Web sockets, mobile development, web SQL databases. And much more besides.

There are currently no FAQs about HTML5 Power Workshop.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed HTML5 Power Workshop.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.