It might be too early to build client work with canvas but that doesn’t mean it’s too early to learn

April 7th, 2011

I’ve been asked a couple of times since HTML5’s canvas element isn’t that widely adopted yet, since versions of Internet Explorer that don’t support it still account for more than 50% of browser market share, why I spend so much time working with it. I think there’s a few good reasons for developers to experimenting with canvas now.

When I first got into web development, I became a big fan of Flash. I spent a lot of time learning ActionScript. I would check out every Flash site on thefwa.com looking for inspiration about what I should learn next. But, as I learned more and more about Flash development, I realized that most of these Flash sites and applications were built by teams. I had missed the days of the solo Flash developer making kickass stuff. Flash has moved on into more complicated territory and if I wanted to do any cutting edge Flash work, I would have to join a big company.

With the canvas element, and I’ve seen some Flash developers say this mockingly, but it’s true, it’s just like the early days of Flash. We don’t really know fully what we can do with canvas yet. Every week I see developers pushing what canvas can do and it’s usually just a developer messing around on their own time. This is something that’s attracted me to working with canvas, unlike with Flash, I can’t just Google how to do something, I have to figure it out on my own and I like that.

Flash has been evolving into something far beyond what I think the original programmers could have imagined. We’re at the point now where Flash is going to be used to make Playstation 2 quality games. Now, that’s actually pretty amazing, being able to play a game like that in the browsers, even if you need a plug-in. But if I want to build video games that complex, then I would probably have got into actually building video games. But if you still want to build simple video games that still might impress someone, canvas is probably the way to go.

It’s going to be a while before canvas is widespread. The reason? IE 9 doesn’t work on Windows XP and the truth is, most people that use it aren’t going to be switching from IE 8 to Firefox or Chrome. And IE 9 isn’t going to really take off until XP dies out and Windows 7 takes over. And, realistically, Windows 7 isn’t going to really take off until corporations start installing it on their computers.

So, if we have to wait for IE 9 to replace all the other versions, then what’s the point of working with canvas now? Well, eventually, that is going to happen and when it does, I think it would be better to be able to say to clients, “Yes, I can build that for you” as opposed to “I’ll have to learn how to do it.” I think if you want to work with canvas in the future, it’s smart to start working with it now because I’m pretty sure that the canvas API is going to evolve and be more mature. I would rather start learning the basics now so that when more features are added, I’ll be able to just add it to what I already know instead having to start at the beginning when canvas becomes more widespread.

Right now, I think when clients say that they want something built in canvas, I think they really mean they want it to work on the iPad. So even now there will be opportunity to do client work with canvas, but I think that might be few and far between. I’m sure there will be more opportunities in the future and some of us just might luck out and get a cutting edge client that doesn’t mind if what they want doesn’t work in some browsers.

Really though, I think I’ve found working with the canvas tag to be a great way to learn JavaScript. And if you have any experience with Flash and ActionScript, building similar things with canvas isn’t as different as you’d think. And you can say you’re all about HTML5 now and that will get you some instant cred with the cool kids.

Leave a Reply

Your email address will not be published. Required fields are marked *