Archive for the 'Flash' Category

ActionScript 3.0 Design Patterns at Work Survey

A Three-Question Survey

I’m working on a new post about ActionScript 3.0 Design Patterns at work. To help get an accurate measure of what folks are doing in the ActionScript work world, I put together a simple survey. The survey is made with radio buttons and check boxes; so it only takes a minute to fill out. Click below to take the World’s Easiest Survey:

ActionScript Design Patterns at Work Survey

We thank you in advance, and when we get the post up, you’ll see the results from the survey.

  • Share/Bookmark

Golden Lunch Bucket Contest Winners!

We finally finished judging the contestants and here are the results. Instead of having several categories for age, we decided to have only one because the ages did not have a great deal of range. Each of the winners happened to be from a different country, and so we can claim a true World Wide Contest. Congratulations to all! Download winning entries.


goldenbucketgrand

will_wizardbrazilflag50
William Rafael de J. Ribeiro, Brazil
Our grand prize winner created an interactive “funny face” using the basic Decorator and adding a second component class for a face and four decorator classes for angry, normal, and sad eyes plus a smile decorator. By moving the mouse around you can see the face change and eyes move.

goldenbucketfirst

tcpic100usflag50
Todd Coulson, U.S.
Todd’s entry used a creative combination of elements to build a baseball diamond. The field was a simple rectangle, and it was decorated with an infield, the bases, a pitcher’s mound, boundary lines and players scrambling to the field. Todd is interested in adding to this foundation using other design patterns.

goldenbucketsecond

timofinlandflag50
Timo Hannelin, Finland
Theoretical background for Timo comes from Katariina Nyberg’s article about phyllotaxis, fibonacci and the golden ratio. If we had a grand prize for the best algorithm, it would go to Timo. One algorithm makes an amazing amount of shapes—stars, triangles, squares, lines, shells, spirals…if you are lucky you will see almost all kinds of basic symbols. It also demonstrates that you can change a class in design pattern with a complex algorithm and it doesn’t faze it one bit.

goldenbucketthird

kevo_100ukflag50
Kevo X. Thomson, UK
Kevo had a very simple entry. By changing the x and y coordinates of the three concrete decorators, he was able to rearrange the images. Again, the change was made and there was absolutely no negative ripple effect. This is exactly what a good design pattern is supposed to do.

  • Share/Bookmark

ActionScript 3.0 Design Pattern Contest: The Golden Lunch Bucket Awards!

goldenbucket
The Contest

Okay, here’s a chance for Fame and Fortune. (We’ll supply the former; you supply the latter.) On Monday, April 27 you’ll find a new ActionScript 3.0 Easy and Practical Decorator Lunch Bucket Pattern on this blog. The contest will begin on Monday, April 27 and end Friday May, 22–2009. (That’s not a lot of time! But it should not take a lot of time to make the changes.) You can download the Decorator files here .

The contest is to see if you can change the Decorator design pattern in the new post, ActionScript 3.0 Easy and Practical Decorator Design Pattern.
Using the provided Component class (no changes allowed) and the provided Decorator class (no changes allowed) add new or changed Concrete Components and/or Concrete Decorators to make the most interesting program using the Decorator Design Pattern.

We have four age categories, and each category will have 1st, 2nd, and 3rd prizes. The Grand Prize will be given to the very best entry, regardless of age. Here are the categories:

  • Under 18
  • 18-25
  • 26-40
  • Over 40

All winners will be displayed on this blog along with their entries and photos. Read on to learn the rules.
Continue reading ‘ActionScript 3.0 Design Pattern Contest: The Golden Lunch Bucket Awards!’

  • Share/Bookmark

Design Pattern Principles for ActionScript 3.0: The Least Knowledge Principle

bucketruleFor those of you who have developed applications where a reference drills down through a series of movie clips, the Least Knowledge Principle may seem a bit harsh. It is very easy and even shows a semblance of foresight and organization to arrange operations in a movie clip set to have each movie clip do one thing in a complex object. To get something working, though, you do not want to rely on drill-down references that visit each of the many movie clips. Statements such as,

myMC_high.myMC_middle.myMC_lower.myMC_lowest.DoSomething()…

break the principle of Least Knowledge because it implies that each has some knowledge of the inner workings of the others. Likewise, anyone who has spent much time with JavaScript and the Document Object Model (DOM) knows that many of the objects have some hefty drill-downs in references. According to the Least Knowledge Principle, these are all ways to ask for trouble. Let’s see why.
Continue reading ‘Design Pattern Principles for ActionScript 3.0: The Least Knowledge Principle’

  • Share/Bookmark

Where’s the Real World?: Design Pattern Examples in ActionScript 3.0

Gentle Readers: This short post is a request for feedback. The whole issue of appropriate level examples both in our books and this blog is an important one because it speaks to the utility of the writings and posts. So, your thoughts are not only welcomed; they’re essential.

I had a meeting with a computer scientist who was teaching a game class. In our short chat, he must have used the term real world a dozen times. Well, I’m all for the real world (in contrast to the unreal world of unicorns, fairy dust, and honest politicians). However, the real world for one is not the same as it is for another. Recently, I got a comment about a blog entry thanking us for a solution to a practical problem that one of our readers encountered in programming. The same post was criticized by another reader as not being real world. Therein lies the dilemma.

Abstract vs. Concrete

Chandima and I use a range of examples in our book. We start with an abstract minimalist example so that the reader can see the participants in a design pattern and then move on to something more concrete to illustrate a practical application. On this blog, most of the examples start with the more abstract elements and move into a fairly general (somewhat abstract) example that is more practical. The more abstract an example, the more general its applicability—not unlike an abstract class. However, the more concrete an example, the better the reader can use it to model a like problem in an eminently practical way. Each has its benefits. The abstract examples have generalizability and the concrete examples have needed detail.

Were I to do all of my examples using real world examples that I deal with, most would involve streaming video and Flash Media Server. My customers usually approach me for just that kind of problem. Obviously,using streaming video and FMS is real world, but its not very generalizable. Likewise, some readers complain that the abstract examples don’t help because they’re not practical.

We’d like your thoughts on this issue. Obviously, the most useful examples would be those that you deal with directly in your work, but like my practical work, it’s pretty narrow. Keeping these concerns in mind, tell us what’s most helpful to you.

  • Share/Bookmark