Home > Resources, Robotlegs, Tutorials > RobotLegs Updates, Demos and Unit Testing

RobotLegs Updates, Demos and Unit Testing

Things have been rolling along quite nicely on the RobotLegs front lately. Joel Hooks put together two useful examples, check ‘em out:

I’ve also pushed out quite a couple of framework updates (currently at v0.6):

That last change means that RobotLegs is now dependent on the AS3 Commons logging library. It also means that RobotLegs logging is now standard, and can be easily configured or turned off. Try it out with the PowerFlasher SOS Max tool.

Module Demo

I’ve started putting together another Flex example, called the Acme Widget Factory, which can be found here:

RobotLegs Demos on GitHub

The demo is a little convoluted, but exists to illustrate a couple of things:

  • Working with Flex Modules
  • Communicating between Contexts via Interfaces and Events
  • An alternative to Named Proxies

The demo only works with the Spring ActionScript adapters for now – due to what I believe to be a bug in SmartyPants (but I haven’t had time to build isolated tests to prove this).

The Module side of things needs a little more thought, but I think it is fairly clean and usable for the time being.

Review

As Joel mentions in one of his posts, RobotLegs hasn’t had much peer review. This is very true, and needs to be remedied (besides, I’m DYING for some technical feedback!). I have some theories as to why this is:

  1. Some developers really dislike PureMVC (probably for many of the same reasons that I started RobotLegs in the first place) and so have disregarded RobotLegs because it can be viewed as a rebuild of PureMVC.
  2. Many Flex developers who work on large enterprise applications seem to dislike the idea of using 3rd party Architectural Frameworks, preferring to hand-roll their own solutions on a per-project basis.
  3. Dependency Injection sounds complicated to developers who are new to the pattern.
  4. Many intermediate Flash developers have only just started getting into PureMVC. It will take some time for them to fully understand it’s strengths and weaknesses.
  5. Experienced developers, on the other hand, are probably bored of the whole “Architectural Framework” trip, and are tired of trying out new frameworks. By now they’ve picked their favorite, learned how to be really productive with it, and have built code-generators and other such tools to work around the bad/boring parts of their chosen framework.
  6. Setter injection turns some people off.. which it shouldn’t.
  7. I’m not very “connected” in the developer circles. RobotLegs is my first Open Source project, and is the first time I’ve really put myself “out there”. I don’t have a very impressive online portfolio – the portfolio pieces on my blog are mostly just the small things (often built for friends) that I’m allowed to list publicly.

If you are an experienced Flash/Flex developer, and can bring yourself to review yet another framework, I would love to get some technical feedback on RobotLegs as a framework. Harsh criticism welcome.

And remember, RobotLegs is on GitHub – if you like some of it, but want to change other bits, all you have to do is click that little “fork” button and go crazy. Git For The Win!

  1. August 6th, 2009 at 15:47 | #1

    Shaun – I want to get the most recent released SWC (other than building it myself) and when I download the 0.6 SWC (from github) it is a zip (or tar) of the demos, so I was going to use the RobotLegs.swc inside the demos libs folders..however the swcs are different file sizes.

    how/where can I get the correct swc? also, I’m going to publish it to my maven repo once I have it.

  2. August 6th, 2009 at 15:51 | #2

    Also, I’m curious how the dependency injection works. I noticed as a RL (RobotLegs) user I don’t have to setup an XML file or whatever mechanism used by Spring ActionScript or SmartyPants…I guess RobotLegs is doing it behind the scenes. It does it by type unless I give it a name?

    Also, what if I want to use Spring ActionScript and setup a beans.xml (or whatever they call it)…will RL “respect” that…meaning will it work? I’m just trying to understand how the IoC stuff is working and what’s possible.

    I’m about to write a little app for a production application and I’m going to give RL a spin instead of PureMVC (my prior framework of choice).

    Thanks

  3. August 6th, 2009 at 16:16 | #3

    Hi Craig,

    You might be downloading the Demo archive, and the SWCs included with the demos might be out of date.. Try this rather:

    http://github.com/darscan/robotlegs

    Download the archive, and grab RobotLegsLib.swc from the “bin” folder, and the other SWCs from the “lib” folder – at this point I would recommend using Spring (and as3commons) instead of SmartyPants.

    With regards to injection: I chose to take the annotation route for framework actors (as it’s the simplest), but you can definitely define your own dependencies using SmartyPants or Spring.

    You’ll just need to ensure that you define the rules in the same instance of the Injector (in the case of SP), or the ObjectFactory (in the case of Spring), that your RobotLegs Context is using. To do this, manually create the appropriate Injector/ObjectFactory and pass it through to the RobotLegs Injection Adapter that you give to the Context. Let me know if that makes sense.

    Glad that you’re taking RL for a spin! Let me know how it goes.

    Cheers,

  4. August 6th, 2009 at 17:19 | #4

    Ok thanks, when I get the SWC into my maven repo I’ll let you know.

    Also, just curious. When/why does it make sense to have “events” under the views package versus at the higher package level?

  5. August 6th, 2009 at 17:27 | #5

    I usually have “view/events” for my UI components, and root “events” for the application/context.

  6. August 6th, 2009 at 17:49 | #6

    Cool, the 0.6 SWC is in my repo:

    http://www.codecraig.com/repo/org/robotlegs

    I can put up the other dependencies later. Is this the list:

    as3commons, as3lang, as3reflection, spring actionscript (might have its own maven repo) and SmartyPants, right?

  7. August 6th, 2009 at 17:58 | #7

    Just a quick note: I hadn’t pushed the v0.6 tag to GitHub properly, so you might need to grab RobotLegsLib.swc again.

    In terms of dependencies, there are two ways to use RL:

    With Spring ActionScript:

    RobotLegsLib
    as3commons-lang
    as3commons-logging
    as3commons-reflect
    spring-actionscript-core

    Or with SmartyPants-IOC:

    RobotLegsLib
    as3commons-logging
    SmartyPantsIOC

    I would recommend going with Spring if you plan to use Modules (or sub-contexts).. at least for the time being.

    I’m not familiar with Maven, so I’m afraid I probably won’t be much help with that side of things, but I’ll do my best :)

  8. August 6th, 2009 at 18:08 | #8

    Oh no problem. Maven is really nice, once you get your pom.xml file setup. Luckily “velo” has created flex-mojos, now a sub-project of Sonatype. Anyways I’ll try and keep my “repo” up-to-date as releases are pushed out for other users of RobotLegs, who might use Maven to use.

    Thanks.

  9. August 7th, 2009 at 01:47 | #9

    I noticed the download includes as3commons-logging and as3commons-reflect but no as3commons-lang, instead there is an as3commons-project.

    Is as3commons-project supposed to be equivalent to as3commons-lang?

  10. August 7th, 2009 at 01:50 | #10

    @craig

    nevermind, not sure what I was looking at.

  11. August 7th, 2009 at 02:24 | #11

    shew! you had me worried there for a moment!

  12. August 7th, 2009 at 15:40 | #12

    So I’m looking at the demos to help me get started using RobotLegs and I am trying to figure out what the most recent/best approach is. I see in the AcmeWidgetFactory startup command it binds the AcmeWidgetFactory (i.e. the Application):

    injector.bindValue( AcmeWidgetFactory, contextView );

    However, in the “HelloFlex” demo it doesn’t do this. Just curious is this needed, suggested, etc?

    Thanks.

  13. August 8th, 2009 at 01:32 | #13

    Hi Craig, I’ve posted an answer over at the Discussion Group:

    http://groups.google.com/group/robotlegs/browse_thread/thread/57fbad9ad99ecaa2

  14. karfau
    September 9th, 2009 at 16:07 | #14

    I know it has been a month, i couldn’t get here earlier ;)

    Here’s another guess on the less feedback: In my expierence projects using SVN for versioning are getting much more feedback then those on github.(Could be wrong, but I think svn is just very more widely used.)

    Another thing I want to say is: I really like the way u write about all those things, they are simple to understand and always more constructive (as in positive) then flaming.

    Reading through all those artikels made a lot of things much clearer for me and I defenitly want to give rl a try. (when will u pronounce 0.8? ;) )

    Grettings from germany

  15. September 10th, 2009 at 09:39 | #15

    Hi Karfau,

    Thanks, I’m glad you enjoy my ramblings! And yes, I imagine that most Flash devs are more comfortable with SVN (oh the pain!) than Git (oh the joy!).

    I suppose I should announce 0.8 right away.

    Cheers,

  16. October 17th, 2009 at 05:06 | #16

    Cool, the 0.6 SWC is in my repo:

    http://www.codecraig.com/repo/org/robotlegs

    I can put up the other dependencies later. Is this the list:

    as3commons, as3lang, as3reflection, spring actionscript (might have its own maven repo) and SmartyPants, right?

  1. No trackbacks yet.
Comments are closed.
blog comments powered by Disqus