http://code.google.com/p/fabrication/
fabrication
PureMVCフレームワークの補助用ライブラリ。定型部分の実装量を減らす。
FlexApplication生成 ~ startupCommand(getStartupCommandの戻り値)実行までのフロー
処理順:1. → 2.のv-bまで → 3. → 4. → 2.のv-c以降
- FlexApplicationコンストラクタ
- FlexApplicationFabricator生成。
(ApplicationFabricatorのコンストラクタで)FlexApplicationのcreationCompleteイベントのハンドラに(readyEventListener()を介して)ApplicationFabricator#initializeFabricator()を登録。
- FlexApplicationFabricator生成。
- ApplicationFabricator#initializeFabricator()
- startupCommandがnullでないかチェック。nullの場合は単体テストであると仮定する?
- ModuleAddress生成。
- FabricationFacade生成。
(FabricationFacade.getInstance()で)生成したFabricationFacadeをmultitonKeyとマッピングする。以降,CommandやMediatorはfacadeとしてここで生成したFabricationFacadeを参照する。 - Command登録:FabricationNotification.STARTUP, ApplicationStartupCommand(startupCommandではない)
- facade#startup(startupCommand, FlexApplication)を呼び出す。
- Command登録:FabricationNotification.STARTUP, startupCommand
- Notify:FabricationNotification.STARTUP, body=FlexApplication
- Notify:FabricationNotification.BOOTSTRAP, body=FlexApplication
- イベントFabricatorEvent.FABRICATION_CREATEDをFlexApplicationをtargetにして送る。
- ApplicationStartupCommand.execute(FabricationNotification.STARTUP)
(他のマシン上のFlash Playerと通信するための設定?)- Command登録:RouterNotification.RECEIVED_MESSAGE_VIA_ROUTER, RouteMessageCommand
- Command登録:RouterNotification.SEND_MESSAGE_VIA_ROUTER, RouteNotificationCommand
- Command実行:ConfigureRouterShellCommand, body=null, notification=FabricationNotification.STARTUP
- startupCommand.execute(FabricationNotification.STARTUP)