Archive for February, 2011

FlashFirebug 2 – Excellent Flex real-time debugging

Friday, February 25th, 2011

I just started using FlashFirebug 2 on Firefox. Extremely helpful for debugging complex interfaces. Also lets you edit the properties of the SWF in real-time, so you can test changes on the fly!

Below is a screenshot of it in action with a component I’m going to make available soon (a shared mutually exclusive CombBox)

FlashFirebug 2 for Firefox - edit/debug in real-time

I needed to install Flash Player 10_1r53_64_win_debug.exe

FlashFirebug 2 link: http://www.o-minds.com/products/flashfirebug

Flex 4 Dependency Injection Example

Wednesday, February 9th, 2011

Joel Hooks wrote a good article on the advantages of dependency injection a.k.a. inversion of control (IoC) in ActionScript3. I thought the most informative paragaph was as follows:

“When dependencies aren’t injected, when they are created internally by the object using the new Object() syntax, the class is internally bound to the dependency. When this dependency is provided to the class externally the responsibility of creating the dependency is removed from the class. The advantages of this approach are even more significant when we use interfaces instead of specific implementations for our class dependencies. When interfaces are used, the class doesn’t care about the specific implementations provided as dependencies as long as they conform to a specific interface.”

Ive used the RobotLegs and Swiz micro-architectures before on small projects, but I haveĀ  also used IoC quite extensively outside of these frameworks. I put together a little visual demo of IoC being used in Flex 4 (view source enabled). Click pic for running example.

Click to view SWF