Comparison of several popular as3 MVC frameworks:
Framework |
Dependencies Management |
Event Management |
Presentation Pattern |
Cairngorm |
Singleton |
Singleton Dispatcher |
Code Behind |
PureMVC |
Service Locator |
Notification |
Mediator |
Mate |
Dependency Injection |
Display list |
Presentation Model |
Swiz |
Dependency Injection |
Display list |
Presentation Model |
Parsley |
Dependency Injection |
Central Dispatcher |
Presentation Model |
Robotlegs |
Dependency Injection |
Event bus |
Mediator or others |
PureMVC is applicable to java,. net, and other languages. It is based on inoication ication rather than as event Events, which greatly improves efficiency and flexibility.
At the same time, if the application of pureMVC is unreasonable, it may lead to excessive workload.
The MVC Framework of robotlegs draws on a lot of puremvc ideas. In contrast, robotlegs is more focused on AS3, absorbing the advantages of puremvc, and introducing the dependency injection mode, similar to spring in java.
It uses the SwiftSuspenders framework to implement dependency injection in actionscript and encapsulate it accordingly.
Swift suspenders: https://github.com/tschneidereit/SwiftSuspenders/
Here I have written two simple demos: pureMVC and robotlegs (it seems that there are few robotlegs DEMOS)
RebotLegsDemo.zip
Puremvcreality and practice-tutorial
PureMVC.zip
I personally think that robotlegs is more useful! I hope to help you get started.
Related information:
Https://github.com/robotlegs/robotlegs-documentation/blob/master/best-practices-zh-cn.textile#mediatorresponsibilities
Http://www.cnblogs.com/skynet/archive/2012/03/21/2410042.html
Http://sswilliam.blog.163.com/blog/static/189696383201176112822269/