Two Laptop Bag*
The moose likes HTML, CSS and JavaScript and the fly likes HTML5 Headfirst Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML5 Headfirst" Watch "HTML5 Headfirst" New topic
Author

HTML5 Headfirst

Barry Eckert
Greenhorn

Joined: Jul 26, 2011
Posts: 5

I've read the listing for this book on Amazon, and the top-rated review says it is especially good for newcomers particularly in regard to the Javascript sections. Good news for me; I've just completed my HTML sequence in school, and it didn't cover HTML5, and gave little coverage to Javascript.

My question is whether HTML5 is covered in such a way as to be useful for the upcoming Windows 8. I understand that Metro-style apps will use a great deal of HTML5. While personally the idea of a Windows Phone environment on the desktop is appalling, I will need to know how to code them.


The last good thing written in C was Franz Schubert's Symphony Number 9. -- Erwin Dieterich
Elisabeth Robson
author
Ranch Hand

Joined: May 14, 2004
Posts: 173
    
    6
Hi Barry,
From what little I've seen so far on Metro and WR, it does look like you'll be able to do a lot with HTML5 and JavaScript.

You'll need to know HTML (not sure how much Metro will rely on new elements yet), and it looks like you'll need to make fairly heavy use of a new feature in HTML5, custom data attributes. To use these, you simply add an attribute to an element, where the attribute name begins with "data-". It looks like Metro-style apps will use custom data attributes to define widgets and controls, so, for instance you add a data-win-control attribute to a div to identify it as a control object. There is a JavaScript API for processing custom data attributes, although the last time I checked, this had only partial support in browsers at best. So we'll have to wait to see how that shakes out. We don't cover custom data attributes in HTML5 because of the lack of coverage, but may in a future edition. It's basically like working with other attributes, however.

What Head First HTML5 Programming will help you with is teaching you basic event handling and how to work with APIs, both of which you'll need to build Metro-style apps with HTML, CSS and JavaScript. Windows will have its own APIs and objects (think of these as JavaScript libraries) you'll work with in order to create apps specifically for Metro, but working with these APIs should be similar to working with any other JavaScript API, so once you've learned how to do it for say, video or canvas, that knowledge will apply to other APIs as well. And event handling is absolutely necessary to do any kind of web app, so your knowledge there will cross over to Metro-style apps easily.

Hope this helps!

Elisabeth


Co-Author of Head First JavaScript Programming
Barry Eckert
Greenhorn

Joined: Jul 26, 2011
Posts: 5

Thanks for the quick reply! It really does sound like a useful book. When I took my intro to web programming class, there were some mutterings going around online about HTML5 sometime soon, and I thought oh great, what I'm about to learn will be deprecated by the time I graduate So, I knew that some self-teaching would be imminent. Your book looks like a very good choice for that, especially with the javascript coverage which I really know next to nothing about.
Elisabeth Robson
author
Ranch Hand

Joined: May 14, 2004
Posts: 173
    
    6
Well the good news is that pretty much all of what you learned about HTML & CSS is still totally valid. Except for the fact that we're continuing on the HTML track rather than going down the XHTML path, very little has been "deprecated"; it's all *new* stuff. So you've got a solid foundation to build on!

Elisabeth
Eric Freeman
author
Ranch Hand

Joined: Jun 21, 2004
Posts: 33
    
    5
Agreed with all Elisabeth said, you've got the right foundation with HTML/CSS, now you just need to add the computational side (JavaScript).

I'm not close enough to metro to know how they are handling the various libraries. Would love to hear from someone closer to it how this is setup. Are these just JavaScribe extensions, or something more proprietary?

Eric


Co-Author of Head First Design Patterns
 
Consider Paul's rocket mass heater.
 
subject: HTML5 Headfirst