ColdFusion Muse

Muse Review - Intro to HTML 5 With Ray Camden at Cfobjective

Sitting in on the first third of Ray's HTML 5 intro. He has a "buttload" of code (his word - one wonders about the capacity but I digress) and with his usual efficiency he has posted all his sample code on github here. Great quote from Ray.

"Whenever I hear descriptions of HTML 5 it reminds me of a drug commercial. It's one sentence of benefits followed by 2 minutes of horrible side effects."

Instead of focusing on esoteric things like canvas, Ray's preso spends a lot of times on form features. This is one of the best things about HTML 5. There are simple and straightforward ways to make forms more usable. A great example is the autocomplete implemented entirely on the client side and entirely without Javascript.

<input type="text" name="foo" list="gurus">
<datalist id="gurus">
<option>Ray</option>
<option>Ben (the elder)</option>
<option>Ben (the younger)</option>
<option>Sean</option>
<option>Muse</option>
<option>
</datalist>


The really cool thing is that datalist is ignored by older browsers and picked up by more modern browsers. It sures beats having to gin up some Ajaxian bindings (not that there's anything wrong with that). There's still be times when you need use Ajax for autocomplete when you have a query to run or a huge dataset. But it sure makes those simple select fields easier and provides a great user experience. Remember you have to have that Doctype added so your browser knows to try to render in HTML 5.

As usual Ray teases out some of the most practical and useful tidbits - things that can be used immediately. Make sure and check out the excellent samples at github. Ray also recommends Can I Use - a great site to test your HTML version code.

Comments



Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.