Luar's Flash Playground:Application Framework: MVC與Core J2EE Patterns (ARP / Cairngorm / AS2Patterns)之研究 - AS2Patterns篇
新聞(101)
觀點或評論(94)
Flash書(63)
教程(72)
Design Patterns(3)
FlashCom筆記(47)
Flash Remoting筆記(27)
Flex筆記(11)
Flash Lite筆記(14)
PHP資訊(23)
Ajax筆記(9)
習作(50)
組件(16)
酷站(32)
學習資源(28)
書籍推介(15)
本站與我(91)
RSS瀏覽器
聯絡
熱愛鑽研
Ajax
ActionScript
Flash
Flash Lite
Flex
Flash Remoting
FlashCom
Director
Lingo
PHP
Multiplayer Game

搜尋
VCASMO
Application Framework: MVC與Core J2EE Patterns (ARP / Cairngorm / AS2Patterns)之研究 - AS2Patterns篇 (21-07-2005)

ARP和iteration::two的CairngormAS2Patterns的Application Framework都很相似,都是借用了Core J2EE Patterns

以AS2Patterns為例,由最外觀UI到Server,主要包括:View, View Helper, FrontController, Command, BusinessDelegate, ServiceLocator(, Service),Data以Value Object組成,通訊以AddEventListener和EventBroadcaster聯繫。

結構圖
AS2PatternsClassDiagram.jpg

流程圖
AS2PatternsSequenceDiagram.jpg

筆記

  • AS2Patterns結構跟MVC相似,藍色為Model橙色為View綠色為Controller
  • 所有Component是放在View,也就是與Movie Clip關聯的Class,但直接控制Component卻是ViewHelper,由於它不是與Movie Clip關聯,所以無可避免要用View.getInstance().component.property的方式來讀取更新Component,有時甚至用_root.view_mc.component.property。所以在ARP裡,ViewHelper被認為有害,破壞View封裝性,不建議使用。
  • 每一個Command,就是一個Use Case。
  • BusinessDelegate負責Call Remoting Service,ServiceLocator則設定Gateway Path。

本文章由發表。
同組文章

Movable Type 4.32-en系統支持,Luar's Production版權所有。