惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
The Hacker News
The Hacker News
T
Tor Project blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
Vercel News
Vercel News
C
CERT Recently Published Vulnerability Notes
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
I
Intezer
aimingoo的专栏
aimingoo的专栏
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
P
Proofpoint News Feed
B
Blog
T
Threat Research - Cisco Blogs
博客园 - 叶小钗
Recorded Future
Recorded Future
Last Week in AI
Last Week in AI
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
PCI Perspectives
PCI Perspectives
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Schneier on Security
Schneier on Security
N
News | PayPal Newsroom
C
Cybersecurity and Infrastructure Security Agency CISA
H
Help Net Security
博客园 - 聂微东
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
GRAHAM CLULEY

博客园 - kenshin

[Flex]关于国内Flex开发者/从业者的调查问卷 [Flex]Mate Flex Framework 流程介绍之Using view injection [国殇]2009年5月12日 汶川一周年纪念日 [Flex]Mate Flex Framework 流程介绍之Using an adapter [Flex]Mate Flex Framework 流程介绍之 Listener tag [Flex]Mate Flex Framework 流程介绍之Two-way Communication:Dispatcher and ResponseHandler tags [Flex]Mate Flex Framework 流程介绍之One-way Communication [Flex]浅析Mate flex framework在实际项目中的应用(三) [Flex]浅析Mate flex framework在实际项目中的应用(二) [RIAMeeting]RIA大讲堂 - Flex开发免费培训 [Flex]为什么国内的公司都不敢使用Flex作为产品的平台与主要开发语言 [Flex]Flex编程注意之如何得到itemRenderer里面的内容 [Flex]Flex编程注意之J.parentNode is null的错误 [RIAMeeting]RIAMeeting出席Adobe Developer Tech Day [Flex]Flex编程注意之SecurityError: Error #2060错误解决方案 [RIA业界]两个消息 [Flex]Flex编程注意之ViewStack高度异常问题 [产品介绍]Flex Live chat [产品介绍]Flex calendar
[Flex]浅析Mate flex framework在实际项目中的应用(一)
kenshin · 2009-04-15 · via 博客园 - kenshin

但是这次我要说的mate framework,在网络查找了一下,虽然有一些关于mate的中文资料,但是基本上都介于介绍和宣传之类的问题,几乎没有关于mate在实际应用中的作用。

那么我就来结合我使用mate framework的一些心得,介绍一下mate在实际项目中的作用。

什么是mate flex framework:

Mate 是一个基于标签(tag-based)的事件驱动(event-driven)的Flex框架,是由AsFusion创建的。

它的特点:

1、与Cairngorm类似也是基于event handler,但是也不同与Cairngorm,因为它没有备受争议的frontControler和频繁的使用单例模式。

2、与PureMVC就更加的不同了。mate是完全的基于Flex的framework,而不像PureMVC那样是一个独立的框架。

3、它是基于标签形式的,因此它的语法势必比较容易通读,但是这也限制了它的作用,因为mate只能应用在MXML里面,即由Flex开发的project,而无法适用于完全由AS写的project。

     这是一个比较典型的Mate语法结构:

     <EventHandlers type="{QuoteEvent.GET}" debug="true">

   <RemoteObjectInvoker destination="ColdFusion"
      source="stockQuoteExample.QuoteService"
      method="getQuote"
      arguments="{event.symbol}"
      debug="true">

      
      
<resultHandlers>
         
<MethodInvoker generator="{QuoteManager}"
            method="storeQuote" arguments="{resultObject}"/>

      
</resultHandlers>

   </RemoteObjectInvoker> 
  </EventHandlers>
Mate的驱动者:

大量的sample:

Mate显著的三个特点:

EventMap(事件地图)、Injectors(依赖注入机制)、extensions(插件、扩充)机制。

Mate flex framework的优势:

1、它可以应用在你已经开发了一半的flex project里面(只需要应用它的EventMap方式即可)同时也不会破坏掉原有的结构。

    而CairngormPureMVC如果要应用在已经开发了一半的project的话,首先它们是很难应用的,就算是强行应用的话,那么无疑会破坏掉原有project的结构。

2、由于是基于标签方式,因此可读性比较强,同时学习难度也远远的小于CairngormPureMVC。一个Flex的初学者在很短时间(下载运行调试一下mate sample例子就应该可以上手了)内就肯定会掌握Mate了。

3、Mate由于只能在Flex里面使用,因此它比较适用于中小型团队的flex project开发。

4、它独有的extensions机制,可以将具体的一些功能的抽出和再应用。

那么Mate的缺点:

1、由于是基于标签形式,因此只能在Flex里面使用,因此限制了它的应用范围。

2、我个人认为不太适用于大型flex framework project。因为它的优势EventMap在大型项目的情况下会变成它的缺点(这点我在下一篇文章说明)