prototypin' [10/20/2006 18:56:08]
I put off using classes in brickslayer because... Well, that kind of object oriented programming in javascript is clunky. I've read that Javascript 2.0 will have real classes like Actionscript (and Python and Java and...) but that's not much help today.
I was going to avoid using any high level frameworks, because the point was to teach javascript, not a particular framework. But that means I have to write twice as much to explain all the confusion the framework gets rid of. I realized it's better to give people the high level tools. It's easier for them, easier for me, and they can always look at the framework code if they want to see what the hard way looks like.
So, I decided to use prototype. It's small and powerful and makes javascript classes look like traditional classes. Pluss it gives you AJAX support, ruby-style .each() for Arrays, a couple nice shortcuts for selecting elements, and a bunch of other cool features.
Plus, it paves the way to an "advanced" course if this thing takes off. (I'm also considering a "beginner" course that just covers basic HTML, CSS, and simple simple javascript, based around a little puzzle game.)
Now that I think about it, using prototype might make this interesting to more experienced developers as well, since there's not much documentation on prototype and it's getting a lot of attention. I guess we'll see. :)
