六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 1369|回复: 0

pureMVC与RobotLegs actionscript MVC框架对比

[复制链接]

升级  16%

2

主题

2

主题

2

主题

童生

Rank: 1

积分
8
 楼主| 发表于 2012-12-30 16:16:11 | 显示全部楼层 |阅读模式
<div id="cnblogs_post_body">
对比下比较热门的几个as3 MVC 框架:
<div align="center">
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好像很少)




个人觉得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/



您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表