At the Forge - HTML5
As I indicated earlier, it's nice to know that HTML5 is being rolled out in stages, and that we don't need to wait for a complete implementation to be ready, which might take a number of years. However, it also means that each browser supports a slightly different subset of the HTML5 standard, which spells trouble for Web developers aiming to address users with a uniform platform.
Fortunately, there are ways to check with the current browser to see whether it supports each of the features offered by HTML5. However, you probably want to be able to concentrate on developing your application, rather than creating useful and reliable tests. The open-source Modernizr JavaScript framework is simple to download and install (since it's a single .js file), and it allows you to query the browser from within your program, checking to see what functionality is there. For example, if you want to know whether geolocation is supported, you can say:
if (Modernizr.geolocation) {
navigator.geolocation.getCurrentPosition(handle_position);
}
else
{
alert("Ack! I have no way of knowing where you are!");
}
Although Modernizr can be a terrific help in identifying what features are available, it doesn't solve the real problem—namely, gracefully handling the lack of such features. I realize Modernizr isn't designed to take on such responsibility, but perhaps someone in the jQuery community (or elsewhere) will create a library (post-Modernizr?) that goes one step beyond Modernizr, allowing us to paper over the differences between browsers, much as Prototype and jQuery did for basic JavaScript functionality several years ago.
HTML5 is coming, and some would say it's already here. If you are creating a Web application, you will do both yourself and your users a big favor by using HTML5. However, doing so does raise questions about which features you can and will include, and which browsers you intend to support. We've seen how Modernizr can help smooth over these differences and keep the Web a universal medium, but doing so will take a bit of work. Next month, I'll look at some features aimed at making the Web a more complete application framework, namely Web sockets (for interprocess communication), workers (for background threading) and local storage.
Resources
HTML5 has become a hot topic lately, leading to a large number of books, blog postings and even magazine articles (like this one!) on the topic. Additionally, the W3C has a number of standards and papers about HTML5.
The best book I've read on the subject isn't even a proper book at the time of this writing, but rather a free on-line resource written by Mark Pilgrim. If you're familiar with Pilgrim's previous work, such as Dive into Python, you know that his writing is excellent. Not surprisingly, this was the first resource to which I turned to bone up on HTML5, and it continues to be my favorite combination of tutorial and reference.
I have read two other books on the subject, each of which introduces things in its own way. From the Pragmatic Programmers comes HTML5 and CSS3 by Brian Hogan. This book is well written, providing (I think) a gentler introduction to the subject than other books. Apress has its own book, called Pro HTML5 Programming by Peter Lubbers, Brian Albers and Frank Salim. This last book also is aimed at beginners, but I found its examples to be less useful than those in the other books.
There have been a number of good articles and blog postings about HTML5 as well. One particularly interesting one is www.smashingmagazine.com/2010/09/23/html5-the-facts-and-the-myths.
Finally, the Modernizr library is at www.modernizr.com. Full documentation about what it provides is on that site, with terrific detail about what information is available to your application.
Reuven M. Lerner is a longtime Web developer, architect and trainer. He is a PhD candidate in learning sciences at Northwestern University, researching the design and analysis of collaborative on-line communities. Reuven lives with his wife and three children in Modi'in, Israel.
- « first
- ‹ previous
- 1
- 2
- 3
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
Web Development News
Developer Poll
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- RSS Feeds
- What's the tweeting protocol?
- New Products
- Trying to Tame the Tablet
- Dart: a New Web Programming Experience








16 hours 35 min ago
19 hours 7 min ago
20 hours 25 min ago
20 hours 59 min ago
21 hours 22 min ago
1 day 2 hours ago
1 day 2 hours ago
1 day 4 hours ago
1 day 6 hours ago
1 day 8 hours ago