乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Iteration::two的基于Flex的開源項(xiàng)目-- Cairngorm store的...

       WindySky 2007-04-28

      Cairngorm是Iteration::two的開源項(xiàng)目, 是使用macromedia Flex的RIA開發(fā)的最佳實(shí)踐(best-practice)框架.
      在Cairngorm基礎(chǔ)上開發(fā)RIA, 將會在Iteration::two的專家體系和現(xiàn)有的靈活可維護(hù)企業(yè)解決方案中達(dá)到平衡.
      Cairngorm本身并不是一個(gè)完整的企業(yè)應(yīng)用, 它只是提供了一個(gè)開發(fā)的骨架, Iteration::two稱之為體系.
      在這個(gè)體系中包括以下幾個(gè)部分:
      1. Business(業(yè)務(wù)邏輯部分)
      2. Command(命令部分)
      3. Control(控制部分)
      4. Model(數(shù)據(jù)模型)
      5. View(界面視圖)
      6. VO(ValueObject)

      我們從Control說起:
      在Control中, 定義了3個(gè)基類: Event, EventBroadcaster, FrontController.
      Event用于在應(yīng)用不同的層之間傳遞事件, 并攜帶事件的數(shù)據(jù). 包含type和data兩個(gè)成員.
      type存放一個(gè)區(qū)別不同事件的名稱,將會在FrontController中進(jìn)行注冊.
      而在命令(Command)類中, 會對事件進(jìn)行響應(yīng).

      EventBroadcaster是一個(gè)單例類(singleton), 用于廣播用戶動作對應(yīng)的事件. 使用方法: EventBroadcaster.getInstance().broadcastEvent( ... )

      FrontController稍微復(fù)雜一點(diǎn)點(diǎn). 用于將特定的用戶動作分發(fā)到指定的命令類.
      FrontConroller是請求處理的核心類. 整個(gè)體系中遍布的EventBroadcaster.getInstance().broadcastEvent( ... )這樣的調(diào)用,
      都是用來通知監(jiān)聽控制器: 用戶發(fā)出了請求. 在實(shí)際應(yīng)用中, 開發(fā)者應(yīng)該生成一個(gè)FrontContoller的子類,
      并在構(gòu)造函數(shù)中調(diào)用addCommand()注冊預(yù)期事件的處理命令. FrontController的具體實(shí)現(xiàn)類應(yīng)該創(chuàng)建一次而且只能創(chuàng)建一次.
      通常的做法是這樣的: 在主應(yīng)用中, 將FrontController的子類作為一個(gè)Tag進(jìn)行申明, 
       * <p>
       * <code>
       * <mx:Application  xmlns:control="com.domain.project.control.LoginController"        ... >
       *
       *        <control:LoginController id="controller" />
       *
       *  ...
       *
       * </code>
       * </p>
      FrontController的處理實(shí)質(zhì)上是這樣的, 在調(diào)用addCommamd時(shí), 將處理命令保存在數(shù)組中, 將與之對應(yīng)的事件處理對象注冊為FrontController本身,
      在事件觸發(fā), 調(diào)用FrontController的handleEvent時(shí), 調(diào)用executeCommand, 在executeCommand中, 先在數(shù)組查找出事件對應(yīng)的命令,
      調(diào)用命令的execute方法. 這就要求所有的命令都實(shí)現(xiàn)Command接口

      (內(nèi)容較多, 未完待續(xù))

        本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多