puremvc
2021-03-20 16:58:50 0 举报
puremvc uml 类图
作者其他创作
大纲/内容
依赖
继承
IProxy<<interfacee>>
+ getProxyName():string+ setData( data:any ):void+ getData():any+ onRegister( ):void+ onRemove( ):void
Notifier<<class>>
- multitonKey:string = null+ static MULTITON_MSG:string
IObserver<<interfaxe>>
+ setNotifyMethod( notifyMethod:Function ):void+ setNotifyContext( notifyContext:any ):void+ notifyObserver( notification:INotification ):void+ compareNotifyContext( object:any ):boolean
实现
Facade<<clsss>>
- model:IModel = null- view:IView = null- controller:IController = null- multitonKey:string = null+ static MULTITON_MSG:string+ static instanceMap:Object = {}
IView<<interface>>
Model<<class>>
- multitonKey:string = null- proxyMap:Object = null+ static instanceMap:Object = {}+ static MULTITON_MSG:string
- initializeModel():void+ registerProxy( proxy:IProxy ):void+ removeProxy( proxyName:string ):IProxy+ retrieveProxy( proxyName:string ):IProxy+ hasProxy( proxyName:string ):boolean+ static getInstance( key ):IModel+ static removeModel( key ):void
Notification<<class>>
- name:string = null- body:any = null- type:string = null
+ getName():string+ setBody( body:any ):void+ getBody():any+ setType( type:string ):void+ getType():string+ toString():string
Observer<<class>>
- notify:Function = null- context:any = null
- getNotifyMethod():Function- private getNotifyContext():any+ setNotifyMethod( notifyMethod:Function ):void+ setNotifyContext( notifyContext:any ):void+ notifyObserver( notification:INotification ):void+ compareNotifyContext( object:any ):boolean
MacroCommand<<class>>
- subCommands: ICommand[] = null
- initializeMacroCommand():void- addSubCommand( commandClassRef:Function ):void+ execute( notification:INotification ):void
SimpleCommand<<class>
+ execute( notification:INotification ):void
IFacade<<interface>>
View<<class>>
- multitonKey:string = null- mediatorMap:Object = null- observerMap:Object = null+ static MULTITON_MSG:string+ static instanceMap:Object = {}
Icommand
IController<<interface>>
Proxy<<class>>
- proxyName:string = null- data:any = null+ static NAME:string
+ getProxyName():string+ setData( data:any ):void+ getData():any+ onRegister( ):void+ onRemove( ):void
INotifier<<interface>>
INotification<<interface>>
IModel<<interface>>
+ registerProxy( proxy:IProxy ):void+ removeProxy( proxyName:string ):IProxy+ retrieveProxy( proxyName:string ):IProxy+ hasProxy( proxyName:string ):boolean
Controller<<class>>
- multitonKey:string = null- view:IView = null- commandMap:Object = null+ static instanceMap:Object = {}+ static MULTITON_MSG:string
Mediator<<class>>
- mediatorName:string = null- viewComponent:any = null+ static NAME:string
+ getMediatorName():string+ getViewComponent():any+ setViewComponent( viewComponent:any ):void+ listNotificationInterests( ):string[]+ handleNotification( notification:INotification ):void+ onRegister():void+ onRemove():void
IMediator<<interface>>
+ getMediatorName():string+ getViewComponent():any+ setViewComponent( viewComponent:any ):void+ listNotificationInterests( ):string[]+ handleNotification( notification:INotification ):void+ onRegister():void+ onRemove():void
ICommand<<interface>>
+ execute( notification:INotification ):void
0 条评论
下一页