Dec 28 2008

Learning design patterns with Actionscript 3: episode 1 – Singleton pattern

Category: actionscriptDavide Zanotti @ 3:22 pm

In these Christmas holidays I bought some new books, among them I purchased “Actionscript 3 design patterns” (written by William Sanders and Chandima Cumaranatunge) and I’m actually studying this one. I never faced before the world of design patterns (which is, for those that never heard about, a way to write code and solve problems by implementing tested strategies that will guarantee flexibility and extensibility), or better I knew what a design pattern is, but I’m trying to learn to use them for the first time.
Unfortunately the first thing I learned about implementing design patterns in Actionscript 3 is that for some stuff we have to use workarounds, because actually as3 doesn’t provides 2 little useful things: abstract classes (on which most of the patterns are based) and not public constructor (in Java we can declare a class constructor as private, in as3 we must declare it as public), anyway with some little efforts, we can do everything :-)

Continue reading “Learning design patterns with Actionscript 3: episode 1 – Singleton pattern”

Tags: , , , , ,


Dec 22 2008

Centralizing event handling in Actionscript 3: a good method to handle events for multiple objects with a single listener

Category: actionscriptDavide Zanotti @ 2:26 pm

One of the first cool things I learned about Actionscript 3, is how to handle events. Actionscript 3 is heavily tied with events, so the use and a deep understanding of events and listener should be one of the most important subject to face for an Actionscript developer. Although I’m far away to be considered an experienced Actionscript developer, I’ve just realized the power and the benefits of a centralized event handling architecture and I want to share my new knowledge by writing this post.  So… what means to “centralize events handling”?
Continue reading “Centralizing event handling in Actionscript 3: a good method to handle events for multiple objects with a single listener”

Tags: , , , , ,


Nov 10 2008

I’m learning Actionscript 3… and I like it!

Category: actionscriptDavide Zanotti @ 2:52 pm

Essential Actionscript 3.0After some tests with the Adobe AIR SDK, I’ve discovered the huge limits of developing in HTML + Javascript (of course I’m speaking about a desktop application perspective). So I’ve took a look around and I’ve realized that what I need for AIR (and not only) is Actionscript! It is infinitely stronger, flexible and better structured than Javascript, and with the 3.0 version is a true object oriented programming language. From my point of view it can be considered a middle way between Java and Javascript. In fact it has the OOP benefits as polymorphism, hineritance, interfaces, typed parameters and so on like Java, plus the flexibility of the coding style like Javascript, ie I can use JSON sintax and I’m free to code in “strongly tiped” way or not.

At the moment I’m studing the excellent book “Essential Actionscript 3.0″ and I’m already quite comfortable with the new language. The next book I’m going to buy are:

  • Actionscript 3 design patterns
  • Actionscript 3 game programming university
  • Foundation Actionscript 3 animations: Making Things Move!
  • Programming Flex 3 – The Comprehensive Guide to Creating Rich Internet Applications with Adobe Flex

So… like AC/DC say: “It’s a long way to the top if you want rock N roll” :-)

Tags: , , , , ,


« Previous Page