pureMVC与RobotLegs actionscript MVC框架对比

 

对比下比较热门的几个as3 MVC 框架:

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运用范围不仅限与actionscript ,同样可以应用到其它语言java,.net 等 ,它基于INotification,而不是as 自身的event事件,所以效率和灵活度大大提高了。

同时pureMVC如果运用不合理可能超成繁冗工作量可能会增加不少。

robotlegs的MVC框架,发现借鉴了很多puremvc的思想,相比之下robotlegs 更加专注入AS3,吸收了puremvc的优点,同时引入 依赖注入模式,类似java中的spring.
它使用了SwiftSuspenders 框架实现actionscript 中的依赖注入,并对它进行了相应的封装。
SwiftSuspenders :https://github.com/tschneidereit/SwiftSuspenders/

这里我写了两个简单的DEMO,一个是pureMVC和robotlegs(robotlegs DEMO好像很少)

RebotLegsDemo.zip

PureMVC实现与实践——教程.pdf

PureMVC.zip

个人觉得robotlegs更加好用!希望对大家入门有一定的帮助。
相关资料:
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/

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值