Posted by Jacob Wright in ActionScript 3, Object Oriented ProgrammingMar 10th, 2010 | 5 Comments
Been loving 360 Flex this year! Tyler and I finally finished our presentation, and so I had some time to write a post I've been meaning to.
One of the issues one comes across in building performant applications in Flash is object creation and garbage collection. Object pooling helps overcome this. Object pooling is keeping old objects around and reusing them instead of throwing them away and always creating new fresh objects.
Creating objects in Flash isn't bad. It's when you create hundreds or thousands of throw-away objects very quickly that this becomes a problem.
Used Pooling in Observe
For...
Posted by Jacob Wright in ActionScript 3, Flash, ReflexFeb 17th, 2010 | 4 Comments
Monday I wrote about how I would use the observer pattern to alter the functionality of getters/setters and respond to changes without using Flash's events. Tyler and I brainstormed more about the solution and as I knew would happen we came up with a better implementation.
Changes
One thing I didn't like about my initial go at it, is that you had to create a class with three methods, and usually you only used one of them. So methods were being called that didn't need to be for the sake of it. We decided to add functions on an as-needed basis. I named the different types checks, hooks, and observers.
Check,...
Posted by Jacob Wright in ActionScript 3, Flash, ReflexFeb 8th, 2010 | 6 Comments
I've been trying to figure out the best way to include a styling framework with Reflex as needed, without requiring APIs and including extra classes in the core. Pay-as-you-go. The solution that I finally came up with turns out to be great for not only styling, but effects/transitions and data-binding too. I'll start with data-binding to try and describe the benefit.
Flex Data-binding
In Flex we have data-binding. Data-binding is cool. Allows us to do stuff a lot easier. We use it in almost everything we write in Flex.
Unfortunately, data-binding is based on the event dispatching system in Flex....
Posted by Jacob Wright in ActionScript 3, Flash, JavascriptNov 28th, 2009 | 5 Comments
So there may not be an exorbitant amount of use-cases for displaying an image in HTML that was generated real-time in Flash, but I thought's cool, so I'm sharing anyway. It makes the inner-geek in me smile.
Short background: I was looking into creating a Flash drawing app that consisted only of the canvas portion, with the rest of the UI in HTML. This is for many reasons including the size of Flex, the native OS components in the browser, speed, and hey, it forces separation of core app logic from the presentation logic, right? ;)
So I wanted a way to display thumbnails of the pages of my drawing....
Posted by Jacob Wright in ActionScript 3, Flash, PHPNov 16th, 2009 | 16 Comments
After building a couple of RESTful services using the Zend Framework, I decided to create a dead simple REST server that allowed me to skip all the features I didn't need as well as a tons of classes that came with Zend Framework MVC. There are still useful features to add (XML support for example), but overall I'm quite happy with what I've come up with.
My solution, RestServer, is a JSON REST server, so far. It should be trivial to add support for XML or other formats, but there would have to be assumptions on what your object would look like in XML (XML-RPC style, your own custom XML format,...
Posted by Jacob Wright in ActionScript 3, CSS, FlexAug 31st, 2009 | 4 Comments
Question: What's 2.8KB, can style any DisplayObject on the stage, and enjoys long walks on the beach?
Answer: Flex styling pwned!
So it's leaked out on twitter that Ben Stucki, Ryan Campbell, Tyler Wright, and myself are working together on a new RIA component initiative. Taking a different approach than Open Flux, we are starting from scratch and building up fresh. We're bringing together what we've learned from Open Flux and Stealth with the goal to release finished features and stable builds. We hope to provide something that we all can use in production. We haven't announced the name yet, officially.
Ryan...