Wabysabi

The Personal and Professional website of Daniel Wabyick

Thursday, November 19, 2009

AS3 Framework Comparisons – Robotlegs

Screenshot - Flexcaster Robotlegs

Recently, a coworker asked me – ‘What’s Robotlegs all About?’. I waved my hands around a bit, rambled about dependency injection, Spring, Swiz, until his eyes glazed over. Talking about frameworks only goes so far.

Enter Richard Lord’s fantastic AS3 framework comparison using Flexcaster, an example podcast application. Its a pretty simple example, but it compares the syntax and structure of a variety of frameworks including Robotlegs, PureMVC, Swiz, Cairngorm, as well as pure Flex 3 – all using a simple, uniform example.

Comparing the level of complexity, simply from a class-count, is a pretty interesting exercise. Check out these numbers!

  • Flex 3 – 13 Classes
  • PureMVC – 28 classes
  • Robotlegs – 30 classes (!)
  • Cairngorm – 20 classes
  • Swiz – 18 classes

To the framework’s defense, they are designed to scale to much larger projects, and its not entirely an apples-to-apples comparison. Robotlegs, for example, demonstrates two different feed implementations, and has a slightly different UI class model than the Flex 3 example. The Swiz example, eschews the Command pattern, and instead uses singletons. Its definitely an eye-opener to compare how they differ.

posted by admin at 4:10 pm  

3 Comments »

  1. The main cause of the difference is that PureMVC and Robotlegs (using it’s reference MVCS implementation) both require the use of mediators on your views – something you’ll want on large projects. The other frameworks don’t require any separation of display logic from mxml. Also, frameworks that use the command pattern (PureMVC, Cairngorm & Robotlegs) will naturally need more classes.

    However, more classes doesn’t mean more complex if those classes are simpler.

    Comment by Richard Lord — November 19, 2009 @ 11:51 pm

  2. I agree with your assessment. Its not necessarily complexity, but the amount of classes you have to write, even if they’re simple, does have a burden on how quick it is to setup your project and get things going. I like commands … sometimes, and sometimes I prefer the simplicity of controllers. Thanks again Richard for the example!

    Comment by admin — November 20, 2009 @ 8:02 am

  3. Indeed. Luckily, with Robotlegs you don’t have to start with that kind of PureMVC-ish setup:

    You can prototype in a Swiz-like fashion (ie injecting directly into your views, and using Controllers instead of Commands), and then move over to a more de-coupled approach as parts of your application settle down.

    Comment by Shaun — November 20, 2009 @ 10:06 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress