Created

14 April 2008

Teaching Object Oriented Programming in a Flash

There was a time when Flash was not much more than an animation tool that brought snippets of motion graphics to the masses over slow dialup connections. It was not much of a programming platform and certainly not useful for teaching an introductory, object-oriented programming course. After years of improvements, Flash has now adopted many object-oriented programming principles. For the first time, Flash can be used as a platform to demonstrate these principles by simply moving a movie clip across the stage through programming code.

Creative programming in the classroom

Upon graduation, my first position was developing interactive CD-ROMS which sparked a love for what I call "creative programming." This is the type of programming code that works your right and left brain by not only defining the desired functionality of an application, but also ensuring that it is well designed. Once I started teaching, it seemed a natural extension to start incorporating this love into the classroom.

Flash to the rescue

For the past several years I have taught the Web Development program at the Nova Scotia Community College (NSCC). One of the pinnacle programming languages I used to introduce students to the wonders of object oriented programming is Java. The problem I found was, although Java is a powerful and true object oriented language, for a beginner it was just not tangible enough. Students were not able to see the objects they were integrating into their applications, and as a result it was hard for them to grasp the concepts in general. This is where Flash came to the rescue.

I started by introducing an entire course on Actionscript into the curriculum; everything from the basics right up to the advanced stuff, exposing as many nooks and crannies of the language as time would allow. The concepts were the same as any Java course (thanks to Actionscript 3.0), but what caught me by surprise was that the quality of learning increased dramatically. No longer were students manipulating an object that exists only in the deep facets of the system's memory, but one that is right there in front of them on the screen. A bouncing ball object is a lot more interesting to mess with if you can see it. Besides this, I also re-designed many of the course projects; abandoning the "number crunching" style of development for a more visual results approach. The "a-ha" moment for the students followed shortly after.

The fresh air of Flex

Acting on the success of this new Actionscript course; it was not long before I introduced Flex into the curriculum. After spending a semester struggling to build intelligent web application interfaces using server-sided scripting, Flex was a breath of fresh air for the students. Moving over to Flex was relatively painless since MXML is comparable to a typical server-sided scripting language. Of course, the final project had the students digging deep into their gained knowledge to build that ultimate web application. This would be the quintessential multi-layer, multi-technology web application incorporating Flex, Actionscript Custom Classes, XML Communication, server-sided scripting and databases.

Introducing creative programming

Flash can also be a great tool for the true beginners of creative programming. I often hold a workshop on Game Development in Flash which incorporates the use of a custom built game engine of my own design. What better way to get students interested in design and development then to hit them where many of their interests lie, gaming. The students spend hours modifying pre-built movie clips with their own character design and animation. When completed, a simple run of the game engine brings all their hard work to life in a real working web based game.

Industry is knocking

My motivation in choosing Flash for my classroom was not only about this improved quality of learning. Industry has been knocking on my door more and more these days all with the same complaint, "We need Flash developers who can program Flash applications; not someone who knows how to throw a bunch of tweens together to make a pretty animation." In fact, most of the graduates of our Web Development program are not programming web applications, but are using Flash to develop skinnable video players and interactive games for companies like Nickelodeon and MTV. This demand has led the NSCC to launch a new program called Interactive & Motion Graphics. This distinct program introduces many aspects of motion graphics and gives a student the option to study the Flash and Flex development platforms exclusively for an entire school year. The final goal is graduating and walking right into a Flash development career.

Conclusion

Even for the seasoned programmer there is a geeky satisfaction in watching a character that you designed and programmed move across the stage, but also be smart enough to stop before hitting the edge. The visual reflection of your programming code right there on the screen is very rewarding for both instructor and student alike. As we face digital native students that have always known computers in their world (and their inevitable short attention spans), it may be time for us all to face the fact that in the classroom, the more visual you can get the better.