Cairngorm 3 and Robotlegs
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
Comments are currently closed for this discussion. You can start a new one.
2 Posted by odoe on 30 Mar, 2010 07:13 PM
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.
3 Posted by Ruprict on 31 Mar, 2010 03:43 PM
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
Stray closed this discussion on 11 Feb, 2011 11:37 PM.