Applying the Mediator design pattern in Flex

September 26th, 2007 by Yakov Fain

Any complex screen, more or less, of a business application consists of a number of containers (Panel, Canvas, VBox) and controls (Buttons, DataGrids, Comboboxes). In the best case scenario, a UI designer gives you a nice looking screen prototype that… continue reading

Object-Oriented programming in ActionScript 3 vs Java

January 28th, 2007 by Yakov Fain

Several years ago I wrote an article on using abstract classses and interfaces in Java . Back than I was absolutely sure that writing object-oriented code is a must. These days, I’m using yet another language called ActionScript 3 (AS3),… continue reading

Comparing the syntax of Java 5 and ActionScript 3

November 12th, 2006 by Yakov Fain

Below is a short comparison table of major elements/concepts of these two languages for a quick reference. You can read this table either left-to-right or right-to-left, depending on what’s your primary programming language is today. This list is not complete,… continue reading

ActionScript 3: Overloading constructors with …(rest)

October 16th, 2006 by Victor Rasputnis

ActionScript 3 allows a function to have a variable number of arguments by using so-called … (rest) parameter. Ellipses followed by the name represent an array parameter that can contain any number of comma-delimited arguments: public static function calcTax(… taxParams):Number{… continue reading

A coding challenge

October 9th, 2006 by Yakov Fain

Just finished writing an article called “Polymorphism Without Interfaces”. I challenge you to review and explain the code below: for(var i:uint = 0; i < workers.length; i++) { var p:* = workers[i][“increasePay”]; output.text+=p==undefined?”no luck”:p(5); } The person who writes the... continue reading

ActionScript 3: Dynamic Classes

October 2nd, 2006 by Yakov Fain

In Java, if you’ve created an object from a particular class, you can use only properties and methods that were defined in this class. For example, if the following class: class Person { String name; } you can only manipulate… continue reading

Program in Style or an Elevator Pitch

October 2nd, 2006 by Yakov Fain

Your old programming habits influence the style of your programming in any new language you learn. Let me illustrate my point using Flex. We usually run Flex training for private clients of Farata Systems , but once in a while… continue reading

Who needs protected variables?

August 25th, 2006 by Yakov Fain

For years, object-oriented programmers knew that one of the main OOP features is encapsulation: an ability to hide and protect object internals. Private and protected properties were invented to support just this. But who are we hiding from? From stupid… continue reading