Flex3/fabrication

Last-modified: 2010-08-14 (土) 22:52:45

http://code.google.com/p/fabrication/

fabrication

PureMVCフレームワークの補助用ライブラリ。定型部分の実装量を減らす。

FlexApplication生成 ~ startupCommand(getStartupCommandの戻り値)実行までのフロー

処理順:1. → 2.のv-bまで → 3. → 4. → 2.のv-c以降

  1. FlexApplicationコンストラクタ
    1. FlexApplicationFabricator生成。
      (ApplicationFabricatorのコンストラクタで)FlexApplicationのcreationCompleteイベントのハンドラに(readyEventListener()を介して)ApplicationFabricator#initializeFabricator()を登録。
  2. ApplicationFabricator#initializeFabricator()
    1. startupCommandがnullでないかチェック。nullの場合は単体テストであると仮定する?
    2. ModuleAddress生成。
    3. FabricationFacade生成。
      (FabricationFacade.getInstance()で)生成したFabricationFacadeをmultitonKeyとマッピングする。以降,CommandやMediatorはfacadeとしてここで生成したFabricationFacadeを参照する。
    4. Command登録:FabricationNotification.STARTUP, ApplicationStartupCommand(startupCommandではない)
    5. facade#startup(startupCommand, FlexApplication)を呼び出す。
      1. Command登録:FabricationNotification.STARTUP, startupCommand
      2. Notify:FabricationNotification.STARTUP, body=FlexApplication
      3. Notify:FabricationNotification.BOOTSTRAP, body=FlexApplication
    6. イベントFabricatorEvent.FABRICATION_CREATEDをFlexApplicationをtargetにして送る。
  3. ApplicationStartupCommand.execute(FabricationNotification.STARTUP)
    (他のマシン上のFlash Playerと通信するための設定?)
    1. Command登録:RouterNotification.RECEIVED_MESSAGE_VIA_ROUTER, RouteMessageCommand
    2. Command登録:RouterNotification.SEND_MESSAGE_VIA_ROUTER, RouteNotificationCommand
    3. Command実行:ConfigureRouterShellCommand, body=null, notification=FabricationNotification.STARTUP
  4. startupCommand.execute(FabricationNotification.STARTUP)