Cairngorm 3 and Robotlegs

Ruprict's Avatar

Ruprict

30 Mar, 2010 06:36 PM via web

So, I very recently did a simple project using CG3, and it is MUCH better than CG2. I think now Cairngorm lines up better with Robotlegs, Swiz, etc. One of the driving ideas behind CG3 is to just provide guidelines on how to create an app, and a big one is a to presume an IoC container. CG3 does not provide IoC, that's up to the "adapter", and the first adapter is based on Parsley. Another CG3 guideline is to use the Presentation Model pattern, where MXML components have models injected into them. As I started to look at Robotlegs, it is using view mediation, resulting in the view not knowing about the mediator, but the mediator knows about the view (MXML). In other words, RL and CG3 are photo negatives in how they handle views. AT first glance, and realizing I have not written anything using RL, I kinda like the CG3 approach. It keeps the view script very small, and the view knows nothing about the business events of the application.

So, my discussion point/question(s) are:
1) Am I understanding RL on the presentation side?
2) Has anyone else looked at CG3? Do you think you could make RL (with its default IoC) conform to the CG3 guidelines? Or is that lunacy?

Just curious,
Ruprict

  1. 2 Posted by odoe on 30 Mar, 2010 07:13 PM

    odoe's Avatar

    Hi Ruprict.
    MVCS is an implementation that Robotlegs provides, but it does not equal Robotlegs. You can actually bypass the Mediator implementation completely, and use it in cases such as the Presentation Model.
    Mr. Hooks put together an example here (along with AS3Signals).
    http://joelhooks.com/2010/01/16/robotlegs-image-gallery-example-usi...

    I saw your CG3 preso last week (thanks btw), and the thought of replacing Parsley as the IoC had occurred to me as some of the CG3 libraries looked impressive, such as the PopUp library.

    I'm sure others may be able to explain it better than I. I have not had any experience with CG3 yet.

  2. 3 Posted by Ruprict on 31 Mar, 2010 03:43 PM

    Ruprict's Avatar

    Hey odoe,

    Glad you made the preso. I just created a branch of my git repo and ported that app to Robotlegs. The link you gave me was VERY helpful and, from what I can tell, exactly how you would adapt RL to CG3. Check it out in your spare time....

    BTW, I didn't have to write any code to adapt the app to RL, just change how the context worked to match the SwiftSuspenders/RL way of doing things. The PopUp and Observer libraries were used, as is. CG3 really seems to just be an approach, rather than an implementation.

    Thanks,
    Ruprict

  3. Stray closed this discussion on 11 Feb, 2011 11:37 PM.

Comments are currently closed for this discussion. You can start a new one.