Subscribe: Punctuated Equilibrium
Added By: Feedage Forager Feedage Grade B rated
Language: English
adobe  application  cfoutput  cheers todd  cheers  data  don  error  flex  function  google  great  new  source  todd  var 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Punctuated Equilibrium

Punctuated Equilibrium

Rantings & Ramblings on the Convergence of Code and Business

Updated: 2015-09-16T16:35:13.621-07:00


Over on ReignDesign...


I'll be posting on a bi-weekly basis over at my ReignDesign's blog (my new company). Here are some of the topics you can expect:
  • Flash, Flex, AIR
  • Android (Java Mobile Development)
  • iPhone (yep, packing the market with apps)
  • UX Design
Swing over and check it out.
If you are looking for RIA or Mobile Development, we've got a talented group of developers working with us. Get in touch.

Using DI to add a PureMVC Mediator in Flex


Classic issue with PureMVC, how do you add your mediators to your Flex components in an application at initialization. If you're not concerned with tight coupling you might add all the mediators with one command. But what if you don't want to tie all the mediator initialization together in one command? You might be thinking make separate commands for each mediator and fire it off as a PureMVC MacroCommand. Not a bad idea. It would certainly get the job done. But what about reusing the same command for each component and dependency injecting the mediator class and view component reference? Oh so clean. I love it and I think you will to.

//inside command class
public var mediatorClass:Class;
public var viewLocation:String;

override public function execute( note:INotification ):void
var m:IMediator = new mediatorClass() as IMediator;
m.viewComponent = getViewComponent( note.getBody() );
Facade.getInstance().registerMediator( m );

protected function getViewComponent( app:Object ):Object
var result:Object = app;
for each( var subItem:Object in viewLocation.split(".") )
result = result[subItem];
return result;

The viewLocation would be equal to a String like "" where someComponent is located directly under the main application and menu is a subcomponent of that etc. etc.

If you don't know how to handle DI in a Flex application, I highly suggest you take a look at the Prana Framework. Its made a huge difference in the flexibility and extensibility of the Flex product I'm currently working on. Plus, you'll be able to handle mediator initialization in seconds with one class. :)


Cantonese = Tasty


We grabbed a little late night snack after the evenings festivities at a local Cantonese restaurant. You can think of this place as the "diner food" of China. Very popular with the post bar/club crowd around 3am.

First up was a little duck.(image) Actually, duck beak would be a little more accurate. It had been prepared in a spicy red sauce. If you don't mind spending hours gnawing at your food, this is a perfect snack (very bony).

Next we have carrot cake, no not that carrot cake.

(image) This is actually a tuber best known from Vietnam and Laos. Its the closest thing you get to a potato in Shanghai. A little sweet with just the right amount of starch. Delicious.

Below you can see a rice paste rolled into a cylinder and mixed in a sweet, tangy sauce.

(image) The overall effect is very pleasing. Think rice au gratin.

While I didn't have high expectation for Shanghai's culinary experience. I've been very surprised by the range of foods I've sampled since arriving here almost a month ago. I can not say all of it has been enjoyable but it certainly has been original (from a US perspective).


Traveling on the Lazy


One great thing about going to Shanghai from the Eastern US is that you don't have to change your watch.


Just flip it around (assuming you don't have numbers on it!).


Its exactly a twelve-hour time difference. Brilliant!


PS - this might be my first post of many entitled "Traveling on the Lazy" :)

Google Code University


If you ever wanted to learn more about the tech. behind Google's shimmer, check out their new website Google Code University. Its aimed at students and professors but an individual interested in distributed computing will do just as well. So far the site has four main sections:
  • AJAX Programming
  • Distributed Systems
  • Web Security
  • Languages
In each section are tutorials and videos, exposing how Google is using these technologies/techniques and how you can give them a try too. A fun website if you've got some ambition and a little free time.


On the road to Shanghai...


I left Pier almost a month ago now. Since then I've been skiing, pub-crawling (NYC for St. Patty's Day), concert going, and traveling up and down the eastern seaboard. Time off is great but after a while it can get to be too much and you need to get back to what you love.
(image) So, next week I'm starting my new job at ReignDesign in Shanghai, China. I'm extremely excited about this move. New language, culture, city, company...and the list goes on. Reign has a great Flash development team, I can't wait to get across the pond and meet everyone. As always, I'll be working to push the boundaries of Flash and thin client GUI design.

For all my friends and family in the US, I'll miss you guys but you're always welcome to come over and visit (mere ~18 hour flight). Wish me luck.


Full Open Source Flex 3 SDK Released


The full source for the Flex 3 SDK was just released on Adobe's new open source wiki. Check it out if you're so inclined:

There were two surprises on the website:
  1. You can view Actionscript source for the AIR specific classes in Flex
  2. There's a section on Flex 4 (codename Gumbo) with some bug details

PS - Flex 3 and AIR 1.0 have just shipped. I think the post script topped the actual post...

Synchronous Service Calls in AS3


Tired of dealing with an asynchronous services in Flex? Here's a solution that can be helpful in certain situations.

Start off with a simple user interface bound to a Cairngorm-style ModelLocator Singleton:

Then Create a Controller Class that listens for the click event and calls a service:

class SimpleController{

function SimpleController(){
Application.application.AboveViewHere.addEventListener('getDP', onGetDP );

private function onGetDP ( e:Event ):void{
var dpService:DPService= new DPService();
ModelLocator.getInstance().myDP= dpService.getDP();//binds ArrayCollection reference from service to ModelLocator

Finally here's the service Class:

public class DPService(){

function DPService(){}

private var data:ArrayCollection;
public function getDP(){
var loader:URLLoader = new URLLoader();
loader.addEventListener("complete", onComplete);
loader.load(new URLRequest("someURL.aSweetExtension"));

data = new ArrayCollection();//create the ArrayCollection reference here

return data;//return the reference to the controller

private function onComplete( e:Event ):void{//get called when the service returns
var loader:URLLoader = as URLLoader;
//loop over returned data and populate ArrayCollection
for each( var xml:XML in ){
data.addItem( xml.someProperty );//add data to ArrayCollection
//no need to return anything or dispatch an Event

Using this approach, you don't need to handle services asynchronously because of intelligent object reference management. We created the reference to the resulting data in the call to "getDP", Flex's data binding system will take care of the rest for us. This is a handy approach if you're binding the data directly to the UI since it can greatly simplify your controllers. In a situation where there's an error with the service, you can localize your error handling to one function in the controller in most situations.

Happy coding.


PS - I'm using Singleton's here for simplicity of the example. I don't suggest using them this way in an actual application. Proper MVC architecture wasn't within the scope of this article. Check out PureMVC, if you interested in learning more about Flex/AS3 architecture.

Automation Tooling in Flash


For a long time flash has been the realm of small to mid sized marketing projects. Something that provides a rich interactive experience on the web, difficult to parallel with any other medium. Since the average Flash developer is more designer than developer, true application-grade tooling has been seriously lacking. Items like build tools, unit testing automation suites, source code/package management are all notably lacking. That is until now. If you're developing with either Flash or Flex I encourage you to check out Project Sprouts. Here's the tagline:
Sprouts is an open-source, cross-platform project generation and configuration tool for ActionScript 2, ActionScript 3, Adobe AIR and Flex projects.

The project is on the verge of a 1.0 release, which has the potential to revolutionize the way your develop applications in Flash. I'm actually a member of the Core Team working a new website to help newcomers become productive quickly. It should be accessible in the next three weeks at


ADOBE, Adobe, adobe...


Two quick notes on Adobe. First, They've revamped their website...and damn does it look sweet. Check it out. Second, I noticed a side note in the Flex 3 tracking log a couple weeks ago that mentioned something about "Blaze DS". The name sounded pretty intriguing to me at the time but I didn't have any details to go on. Today they finally issued a press release, it appears Blaze DS is an open source Data Service manager, a Lifecycle Data Services-Light (that's a mouthful). The platform will provide Remote Object access to new server-side languages (PHP, Ruby, etc.), basic data-push, and syncing functionality to Flex 3 (still in beta). No word on its level of integration with Flex 2, the most current full-release of Flex. This should open the door to a larger "open source" crowd that might have been dissuaded from using Flex without an integrated server-side component. Looks like another solid move by Adobe to bolster their development ranks, we'll see how it plays out as more information becomes available.


PS - This information comes from a number of scatter sources so forgive any misinformation I might be spreading.

The Gmail Upgrade Has Arrived...

2007-11-07T19:24:44.473-08:00 least for me. I'm not sure if everyone can see it yet. Below is a sneak peek ofa the new Contact Manager. If you're working in a small shop it looks like it can be a decent little CRM.
(image) As for the main interface, not a whole lot has changed except for the inclusion of a dropdown menu.
(image) The interface changes are nice but the main upgrade is speed. You'd almost think this is running on the desktop, near seamless experience. They actually prompted me to shut off Firebug just so it wouldn't ruin the experience. The Net Monitor intercepts all the incoming requests slowing things down a bit.

I'm sure I'm missing a couple items but that's all I have to report for now. Hope you get to check it out soon!


Basecamp JS Injection


I've used Basecamp on and off for a couple years now. Generally, I thought it was a great application: secure, well-designed, simple & efficient. That is until I ran into this little beauty today.

In case you can't figure out what you're looking at, thats a lightbox with an Iframe pointing to No, that's not a new feature for Basecamp that you missed out on. One of my colleagues, today, noted that he could enter HTML into the Todo list. Immediately, I was like uh-oh...I wonder if I can....out come the When you click on the button labeled "Throw Error", the ErrorLogger class will gracefully handle the error and post some useful debug information to your server. From there you can do whatever you want. Personally, I just toss it in a log file that I monitor. All that in less than 1KB, not bad.I've tested it on IE6/7 and FF2. Its definitely not production ready quite yet but I'll throw an update up with my final version in a day or two.Cheers,Todd[...]

Add A Blog Search Feed to Google Reader


If you're like me your Google Reader RSS Feed Reader is filled with great blogs site ( Lifehacker, Mashable, Techmeme, etc.) While I'm not ditching any of my favorite web filters, sometimes I want to get my information direct from the source, or just another source. Here's a handy trick to keep you ahead of the curve.

Go to Google's Blog Search. Note the RSS/ATOM links on the side. Toss those in your Feed Reader and you're ready to go.

Oh, did I say this was difficult and time consuming? Definitely not.

Very useful? You know it.


PS - Depending on the search query, you may run into some spam. Play around w/ the advanced search options to get things working right.

Got Some Free Time?


Great list of top notch Flash sites:

Steer clear during work hours...lest your lose your whole day (which may or may not be a good thing).



PS - AIR Tour on Friday in Boston.




Simply awesome.


Check out the source.

Code Highlighting


If you're in the market for a code highlighter, I just ran into a good one that handles PHP, Java, Javascript, Perl, SQL, HTML, and CSS. To rock this on your blog/website, all you need to do is include the javascript source in you page header and add a textarea tag like so:Notice the language to be highlighted is included in the class declaration. There's a couple other useful features (such as copying code to the user's clipboard) that can be found here. To make life even easier, I've written up a quick ColdFusion custom tag to create the textarea declaration and include the appropriate content (sorry, non-CF users). Here's the code: You can use the tag like so: language="ColdFusion" file="test.cfm" id="testID" />Any attribute you define in the tag that is not param'ed at the top of the custom tag will be passed onto the