The authors are:
canvasseems cool, let's delve into that.
- Cameron Adams
- James Edwards aka Brothercake
- Christian Heilmann
- Michael Mahemoff
- Ara Pehlivanian
- Dan Webb
- Simon Willison
The book itselfLet's just briefly start with some hardware talk: SitePoint create beautiful books, with nice colors, pictures and conventions to make the reading as smooth and enjoyable as possible for you, dear reader. One thing baffled me, though, and that was that for each chapter, there's no information about who has actually written it; not in the table of contents nor at the beginning of each chapter. The chapter contents themselves offer some clues, and knowing some of the authors, I had a pretty good grasp about who had written what, but I still find it weird.
The chaptersThe book consists of seven chapters, each written by a different author, and vary from
1. Fun with TablesThis chapter starts with explaining that you can access elements with
document.getElementById. "Oh, man, I'm in for a long boring ride", I thought, but it quickly evolved into some advanced scripting with
tableelements, such as client-side sorting and drag and drop support. Having spent way too much work with tables and their "magic" throughout the years, I generally refrain from them, and will continue to do so. However, if you're bound to create an advanced
tablefor an intranet or so, this is definitely the chapter to read to get some inspiration.
2. Creating Client-side badgesChris Heilmann was written a number of blog posts and articles about how to create and control client-side badges to present in your, or any other, web site. What I like about Chris' writing is that unobtrusiveness and accessibility is heavily emphasized, leading to better practices and better code. This chapter is a good introduction to implement something in the above-mentioned manner, and it also contains an explanation of how JSON can help you get content cross-domain (since that is not possible using
XMLHttpRequest). It also takes failed connections to third party content providers into account, which is a simple yet important thing to take into consideration.
3. Vector Graphics with canvasTo be honest, I haven't really had any real-world scenario where using the
canvaselement has been an alternative option as a solution, but it is indeed a highly interesting technology, offering vector-based coding on the client side. This chapter starts with coding simple drawing lines, and then delves into creating pie charts and assorted shapes. What about Internet Explorer then, which doesn't support the
canvaselement? The fantastic solution ExplorerCanvas, by fellow Swede Emil A Eklund (now with Google), is mentioned and it is a script which transforms your
canvascode into Vector Markup Language, VML, which works in IE.
4. Debugging and Profiling with FirebugMost likely, each and everyone of you are using Firebug (and if you aren't, you should. Now!). This part of the book covers general debugging and profiling, and I think it had one or two things which I had overlooked. One thing bothered me, though, and that was that the author suggested to leave in the ultra-lite edition for all web browsers, just in cause you still left a
consolecall in there somewhere. I definitely disagree with this: either have a deploy script that removes such things, or just use your editor to find and remove such occurrences. Shipping something with superfluous code is just a case of patching, instead of fixing the actual problem.
canvasand some heavy scripting to tweak vectors, but this is just CSS. What he does is using how borders are rendered in web browsers, and completely adapts them to create paths and corridors. Doing things like this sincerely shows that the sky is (perhaps) the limit.
7. Flickr and Google Maps mashupsIn the concluding chapter of the book, Simon offers a basic introduction of creating nice widgets with Google Maps and Flickr. It kind of revisits the concepts in the Client-side Badge chapter with getting external content through JSON, but I believe people who have, for instance, never created something with Google Maps will appreciate this explanation of how to start out with it. Something slightly disappointing, though, is that he occasionally uses inline styling and events on HTML elements. Maybe it's just to show how something can be achieved, but as we ll know, people copy-and-paste code, meaning that it will spread like wildfire. Another thing is that his usage of
filterin the CSS for Internet Explorer is the old version of having filters in IE 4-5.0, where there's a much more improved, performance-wise, option since IE 5.5. However, all in all, it is a nice chapter going through the steps necessary to create a compelling presentation of maps and pictures together; two of my favorite things!