I am very impressed with both Robotlegs and AS3Signals and have been itching to get to grips with combining the two of them. Joel Hooks has supplied a nice example in response to Elad Elrom with the Presentation Model. Using this as a reference I thought I would try and build a smaller simpler example application which brings in the Mediator again (although I am liking the PM example a lot).
I have built an example using the Flex 4.0 SDK and uploaded to Github. Thanks Joel for the support to cleanup mapping the Signal to Command in the Context class etc. I am sure there could be improvements made but I have really tried to keep it mega simple and just get the basics of dispatching and handling signals, it’s worked for me


5 Comments
Looks simple enough
I am a fan of robotlegs so far.
I am wondering what your reasoning is for mapping the proxy and view in separate commands rather than in the main context?
Cheers for the comment Ash,
I usually separate up this logic out of routine as I may have a significant amount of proxies and mediators that need mapping and I prefer not clogging up the main context with all of these.
Also I may not want to immediately define these mappings i.e. I could have some sort of conditional logic occur first then dispatch an event to then run these commands ultimately saving having to return to the context and map them then. Ideally I would have a StartupCommand and handle everything from there onwards.
Its a habit from constructing apps using PureMVC, I like the clean segregation. Just my train of logic
Nice little example using the Hooks Signal injection technique. =)
Did you know you can create the Signal as an MXML tag?
Now your RegView is pure MXML!
http://gist.github.com/301154
The Example was just awesome.. Keep going..
Thanks for the heads up Robert and also for the utility. And Signals as an MXML tag is impressive
cheers for the link!
One Trackback
Social comments and analytics for this post…
This post was mentioned on Twitter by newtriks: Blog to Twitter update – newtriks published a new post: Robotlegs and AS3Signals Example http://cli.gs/9m5Bg...