ARC302-曹严明-组合型智能客户端应用课件

上传人:pu****.1 文档编号:567270841 上传时间:2024-07-19 格式:PPT 页数:35 大小:2.85MB
返回 下载 相关 举报
ARC302-曹严明-组合型智能客户端应用课件_第1页
第1页 / 共35页
ARC302-曹严明-组合型智能客户端应用课件_第2页
第2页 / 共35页
ARC302-曹严明-组合型智能客户端应用课件_第3页
第3页 / 共35页
ARC302-曹严明-组合型智能客户端应用课件_第4页
第4页 / 共35页
ARC302-曹严明-组合型智能客户端应用课件_第5页
第5页 / 共35页
点击查看更多>>
资源描述

《ARC302-曹严明-组合型智能客户端应用课件》由会员分享,可在线阅读,更多相关《ARC302-曹严明-组合型智能客户端应用课件(35页珍藏版)》请在金锄头文库上搜索。

1、组合型智能客户端应用组合型智能客户端应用With Composite With Composite Application BlockApplication Block曹严明曹严明.NET.NET架构顾问架构顾问微软(中国)微软(中国)日程日程组合型应用的应用场景组合型应用的应用场景Composite App Block Composite App Block 体系架构概述体系架构概述Composite App Block Composite App Block 主要概念主要概念DemoDemoJPMC JPMC 网上银行网上银行 集成集成投资信息投资信息集成集成分析工具分析工具集成集成新闻及

2、提醒新闻及提醒集成集成股票数据股票数据 Citibank Citibank 信息发布门户信息发布门户Thomson Thomson 金融数据门户金融数据门户Dell Dell 客服集成桌面客服集成桌面Commonwealth Bank of Australia Commonwealth Bank of Australia 柜员系统柜员系统Commonwealth Bank of Australia Commonwealth Bank of Australia 柜员系统柜员系统Client tierClient tierCommonwealth Commonwealth 柜员系统体系结构柜员系统

3、体系结构Data storageData storagePrivate ServicesPrivate ServicesSmartPartActive DirectoryLocal CacheAgentSecurityInstrumentationOracleConfigurationAuthnOrchestrationPrivate service nPrivate serviceAuthzConfigLegacy systemsLegacy systemsMainframe nWS ProxyIFW Service nSOFAService HelpersData IntegrationS

4、OFAMainframeIFW ServiceData centreData centreBranch siteBranch siteSmart ClientSmart ClientSmartSmartCardCardLocal ADLocal ADSOFA FarmSOFA FarmHIS FarmHIS FarmAD FarmAD FarmBizTalk FarmBizTalk FarmMainframeMainframeOther Application Other Application Servers, Oracle Servers, Oracle Every Service Eve

5、ry Service authorized authorized against ADagainst ADCommonwealth Commonwealth 柜员系统部署方案柜员系统部署方案日程日程组合型应用的应用场景组合型应用的应用场景Composite App Block Composite App Block 体系架构概述体系架构概述Composite App Block Composite App Block 主要概念主要概念DemoDemoBillingBillingInventoryInventoryCRMCRMSmart ClientSmart ClientModuleModul

6、e组合型组合型组合型组合型解决方案解决方案解决方案解决方案 将不同的功能模块组合成解决方案将不同的功能模块组合成解决方案 运行环境提供基础服务运行环境提供基础服务 降低开发成本降低开发成本 灵活方便灵活方便什么是组合型智能客户端应用什么是组合型智能客户端应用什么是组合型智能客户端应用什么是组合型智能客户端应用? ? ? ?Smart ClientSmart ClientModuleModuleSmart ClientSmart ClientModuleModuleComposite UI App Block Composite UI App Block 的来由的来由UIP1PAGUIP2PAG

7、CABPAGCCFThomsonDellCAB微软其他部门微软其他部门客户解决方案客户解决方案PAGOther field frameworksComposite UI Application BlockComposite UI Application Block创建企业级智能客户端创建企业级智能客户端对系统设计团队的价值:质量与一致性提供一个针对企业级智能客户端应用的公共开提供一个针对企业级智能客户端应用的公共开发体系结构发体系结构提供一个一致的和可预测的方法来开发、包装、提供一个一致的和可预测的方法来开发、包装、发布基础组件,以便强制企业应用的体系结构发布基础组件,以便强制企业应用的体系结

8、构标准标准对开发团队的价值:生产力提供一个开发环境能很好的隐藏复杂度和提高提供一个开发环境能很好的隐藏复杂度和提高生产力生产力通过高度抽象和关注点的分离,开发人员能够通过高度抽象和关注点的分离,开发人员能够关注于业务逻辑关注于业务逻辑提高基础框架代码的复用提高基础框架代码的复用商务目标: 提高最终用户的生产力和业务工作的敏捷性公司可以以更敏捷的方式推出新的和升级的功公司可以以更敏捷的方式推出新的和升级的功能能界面使最终用户更快的、更准确的完成工作任界面使最终用户更快的、更准确的完成工作任务,避免通过务,避免通过 Alt-Tab, Copy-Paste Alt-Tab, Copy-Paste 的

9、方式作的方式作应用间的数据交换应用间的数据交换一致的界面降低了培训费用一致的界面降低了培训费用主要困难主要困难将完全不同的组件组合成一个完整的应用将完全不同的组件组合成一个完整的应用将将ShellShell部分与应用逻辑部分分离开来部分与应用逻辑部分分离开来可扩展性使您能使用自己的设计模式和开发可扩展性使您能使用自己的设计模式和开发方法方法ShellComposite App Block Composite App Block 概述概述ModuleCatalogUI Element MgrViewViewUI Element MgrViewViewElementElementApplicati

10、on HostWork ItemWork ItemShared StateShared StateShared EventsShared EventsCAB CAB 体系结构体系结构ShellHostUser Interface ElementsSmartPart Managers & Base ClassesHosted ControlLayoutMDIStatusStrip UI ElementMenuStrip UI ElementToolStrip UI ElementServicesCatalogReaderLoaderAuthenticationLogging?Module 1Sm

11、artPart 1Controller 1Shared StateModule 2Shared StateSmartPart XController XSmartPart YController YMain Form InitializerAuthorization?Biz Logic 开发开发Infrastructure 开发开发Shell 开发开发A Work Item设计组合型应用设计组合型应用 应用逻辑应用逻辑将将将将 views views views views (SmartPartSmartPartSmartPartSmartPart)设计为独立于)设计为独立于)设计为独立于)设

12、计为独立于 controllers controllers controllers controllers 的单元的单元的单元的单元共享模块状态共享模块状态共享模块状态共享模块状态共享基础服务共享基础服务共享基础服务共享基础服务封装用例封装用例封装用例封装用例 重用重用重用重用降低模块间的依赖性降低模块间的依赖性降低模块间的依赖性降低模块间的依赖性尽量使用尽量使用尽量使用尽量使用 events, services, and interfaces events, services, and interfaces events, services, and interfaces events, s

13、ervices, and interfacesSmartPart ASmartPart AController AController ASmartPart BSmartPart BController BController BBusiness EntitiesBusiness EntitiesService1A Work Item设计组合型应用设计组合型应用 界面逻辑界面逻辑SmartParts SmartParts SmartParts SmartParts 是控件是控件是控件是控件 Workspaces Workspaces Workspaces Workspaces 在一个可视框架中

14、显示它们在一个可视框架中显示它们在一个可视框架中显示它们在一个可视框架中显示它们Shell Shell Shell Shell 开发人员开发开发人员开发开发人员开发开发人员开发 Workspaces. Workspaces. Workspaces. Workspaces. 控件跟控件跟控件跟控件跟 Workspaces Workspaces Workspaces Workspaces 无关无关无关无关界面元素可以用共同的方法添加界面元素可以用共同的方法添加界面元素可以用共同的方法添加界面元素可以用共同的方法添加以免业务逻辑开发人员把业务逻辑跟特定的界面以免业务逻辑开发人员把业务逻辑跟特定的界面

15、以免业务逻辑开发人员把业务逻辑跟特定的界面以免业务逻辑开发人员把业务逻辑跟特定的界面风格紧耦合风格紧耦合风格紧耦合风格紧耦合可以集中控制用例改变界面的方式和时间可以集中控制用例改变界面的方式和时间可以集中控制用例改变界面的方式和时间可以集中控制用例改变界面的方式和时间Commands Commands Commands Commands 连接了可操作界面元素集和一个业务逻辑连接了可操作界面元素集和一个业务逻辑连接了可操作界面元素集和一个业务逻辑连接了可操作界面元素集和一个业务逻辑callbackcallbackcallbackcallbackView AView AController ACo

16、ntroller AView BView BController BController BBusiness EntitiesBusiness EntitiesShellUI Elem Mgr 1UI Elem Mgr 2Element1Element2UI InitCommandCommandCommandCommandWindows WorkspaceTab Workspace应用启动次序应用启动次序: 1 of 2: 1 of 2初始化初始化初始化初始化 Shell, Host, Shell, Host, Shell, Host, Shell, Host, 和初始服务和初始服务和初始服务

17、和初始服务1.1.1.1.Shell Shell Shell Shell 启动启动启动启动2.2.2.2.Shell Shell Shell Shell 给给给给 HostFactoryHostFactoryHostFactoryHostFactory 提供基本的启动设置提供基本的启动设置提供基本的启动设置提供基本的启动设置3.3.3.3.HostFactoryHostFactoryHostFactoryHostFactory 根据这些根据这些根据这些根据这些设置创建设置创建设置创建设置创建 Authentication, Authentication, Authentication, Aut

18、hentication, CatalogReader, CatalogReader, CatalogReader, CatalogReader, InitializerInitializerInitializerInitializer 和和和和 Loader Loader Loader Loader 服务的实例服务的实例服务的实例服务的实例4.4.4.4.HostFactoryHostFactoryHostFactoryHostFactory 创建创建创建创建 Host Host Host Host 并把这些服务添加给并把这些服务添加给并把这些服务添加给并把这些服务添加给 HostHostHo

19、stHostHostShellHost FactoryBootstrap Config DataLoader123AuthenticationInitializer45CatalogReader应用启动次序应用启动次序: 2 of 2: 2 of 2初始化初始化初始化初始化 Host Host Host Host 并加载并加载并加载并加载 Modules Modules Modules Modules1.1.1.1.Shell Shell Shell Shell 调用调用调用调用 Host.InitializeHost.InitializeHost.InitializeHost.Initial

20、ize(), (), (), (), 这这这这个由个由个由个由 InitializerInitializerInitializerInitializer 服务服务服务服务实现实现实现实现2.2.2.2.Host Host Host Host 调用调用调用调用 Authentication Authentication Authentication Authentication 服务服务服务服务, , , , 该服务负责在当前应用该服务负责在当前应用该服务负责在当前应用该服务负责在当前应用程序域中建立程序域中建立程序域中建立程序域中建立 principalprincipalprincipalpr

21、incipal3.3.3.3.CatalogReaderCatalogReaderCatalogReaderCatalogReader 服务以服务以服务以服务以 Solution Profile Solution Profile Solution Profile Solution Profile 返回返回返回返回基本模块设置。基本模块设置。基本模块设置。基本模块设置。CatalogReaderCatalogReaderCatalogReaderCatalogReader 服务封服务封服务封服务封装了如何选择正确的装了如何选择正确的装了如何选择正确的装了如何选择正确的 Solution Prof

22、ile Solution Profile Solution Profile Solution Profile 以加以加以加以加载正确的载正确的载正确的载正确的 SmartPartsSmartPartsSmartPartsSmartParts4.4.4.4.Loader Loader Loader Loader 被调用并赋予被调用并赋予被调用并赋予被调用并赋予 Solution ProfileSolution ProfileSolution ProfileSolution Profile,开,开,开,开始以正确的次序加载始以正确的次序加载始以正确的次序加载始以正确的次序加载 modules (m

23、odules (modules (modules (带有依赖性的带有依赖性的带有依赖性的带有依赖性的属性属性属性属性) ) ) )5.5.5.5.Loader Loader Loader Loader 调用调用调用调用 module module module module 的的的的入口类的入口类的入口类的入口类的 AddServicesAddServicesAddServicesAddServices() () () () 方法,方法,方法,方法,让让让让 module module module module 注册自己的注册自己的注册自己的注册自己的服务然后调用服务然后调用服务然后调用服务

24、然后调用 Start() Start() Start() Start() 方法方法方法方法HostShellLoader1AuthenticationCatalogReaderMyModuleIPrincipal2Host InitializationSolutionProfile34IModuleLoad AssemblyLoad IModuleServiceXYZ5- AddServices- StartInitializerComponents, Services & ContainersComponents, Services & ContainersCABCABCABCAB所有的部分

25、都是围绕着所有的部分都是围绕着所有的部分都是围绕着所有的部分都是围绕着 containerscontainerscontainerscontainers, , , , componentscomponentscomponentscomponents and and and and services services services services 这三个概念这三个概念这三个概念这三个概念构建的构建的构建的构建的采用这个体系结构,你可采用这个体系结构,你可采用这个体系结构,你可采用这个体系结构,你可以对以对以对以对 CAB CAB CAB CAB 的功能进行任意的功能进行任意的功能进行任意的

26、功能进行任意的扩展的扩展的扩展的扩展Components Components Components Components 是包含一些逻是包含一些逻是包含一些逻是包含一些逻辑的对象。比如,辑的对象。比如,辑的对象。比如,辑的对象。比如,Windows Windows Windows Windows Controls, controllers Controls, controllers Controls, controllers Controls, controllers 带有业务逻辑和服务代理带有业务逻辑和服务代理带有业务逻辑和服务代理带有业务逻辑和服务代理Services Services

27、Services Services 是被应用中许多是被应用中许多是被应用中许多是被应用中许多 components components components components 调用的对象。调用的对象。调用的对象。调用的对象。比如比如比如比如security services, security services, security services, security services, tracing services, tracing services, tracing services, tracing services, eventing serviceseventing ser

28、viceseventing serviceseventing servicesContainers Containers Containers Containers 是是是是 components components components components 和和和和 services services services services 的集合。的集合。的集合。的集合。Container Container Container Container 管理管理管理管理其中的其中的其中的其中的 components components components components 的生的生的生

29、的生命周期。命周期。命周期。命周期。. Component . Component . Component . Component 可可可可以向以向以向以向container container container container 请求一个请求一个请求一个请求一个 serviceserviceserviceservice。Containers Containers Containers Containers 可可可可以包含其他的以包含其他的以包含其他的以包含其他的 containers containers containers containers。ApplicationHostDefa

30、ult Work ItemChild Work Item 1Child WorkItem 2Service1Service2Component1Component1Component2Component2Component3Component3Component4Component4Component5Component5Service3添加和定位服务添加和定位服务使用使用使用使用 Service Locator Service Locator Service Locator Service Locator 和和和和 Injection Injection Injection Injectio

31、n 模式模式模式模式Adding ServicesAdding ServicesAdding ServicesAdding ServicesCAB Foundation ServicesCAB Foundation ServicesCAB Foundation ServicesCAB Foundation ServicesModule-added servicesModule-added servicesModule-added servicesModule-added servicesProgrammaticallyProgrammaticallyProgrammaticallyProgra

32、mmaticallyDeclarativelyDeclarativelyDeclarativelyDeclarativelyAcquiring ServicesAcquiring ServicesAcquiring ServicesAcquiring ServicesFind in upstream Find in upstream Find in upstream Find in upstream containerscontainerscontainerscontainersProgrammaticallyProgrammaticallyProgrammaticallyProgrammat

33、icallyDeclarativelyDeclarativelyDeclarativelyDeclarativelyApplicationHostA Work ItemModule LoaderModule LoaderService(typeof(IMyService)public class MyService : IMyService IMyServiceIMyServiceMyServiceMyServiceViewViewController Controller public class MyComponent ServiceDependency IMyService myServ

34、ice;日程日程组合型应用的应用场景组合型应用的应用场景Composite App Block Composite App Block 体系架构概述体系架构概述Composite App Block Composite App Block 主要概念主要概念DemoDemoShellShellUI Elements: UI Elements: 你可以改变的你可以改变的 shell shell 中的共中的共享元素享元素菜单条,状态条,菜单条,状态条,菜单条,状态条,菜单条,状态条,splash screens, etcsplash screens, etcsplash screens, etcsp

35、lash screens, etcWorkspaces: Workspaces: 能够显示和隐藏控件的对象能够显示和隐藏控件的对象Tabbed, Zoned / “Portal”, MDI, Windows, Tabbed, Zoned / “Portal”, MDI, Windows, Tabbed, Zoned / “Portal”, MDI, Windows, Tabbed, Zoned / “Portal”, MDI, Windows, DeckedDeckedDeckedDeckedCommands: Commands: 可以映射到多个界面元素的可以映射到多个界面元素的“行行动动”比

36、如比如比如比如 “ “ “ “显示客户明细显示客户明细显示客户明细显示客户明细” ” ” ” 命令有工具条项和菜单命令有工具条项和菜单命令有工具条项和菜单命令有工具条项和菜单项项项项 UI ElementsUI ElementsUI ElementsUI ElementsShell 开发人员开发人员创建创建创建创建 ShellShellShellShell 应用程序应用程序应用程序应用程序添加添加添加添加 UI Element UI Element UI Element UI Element ManagersManagersManagersManagers注册注册注册注册 Workspaces

37、WorkspacesWorkspacesWorkspacesPart 开发人员开发人员创建控件创建控件创建控件创建控件 ( ( ( (SmartPartsSmartPartsSmartPartsSmartParts) ) ) )定义定义定义定义 CommandsCommandsCommandsCommands映射映射映射映射 UI ElementsUI ElementsUI ElementsUI Elements 到到到到 CommandsCommandsCommandsCommands显示显示显示显示 ControlsControlsControlsControls 在在在在 Workspa

38、cesWorkspacesWorkspacesWorkspaces 里里里里WorkspacesWorkspacesWorkspaces Workspaces Workspaces Workspaces 可以一致的显示多个控件可以一致的显示多个控件可以一致的显示多个控件可以一致的显示多个控件Shell Shell Shell Shell 开发人员创建定制的开发人员创建定制的开发人员创建定制的开发人员创建定制的 workspaces workspaces workspaces workspaces 以提供以提供以提供以提供: : : :控件周围相似的框架和修饰控件周围相似的框架和修饰控件周围相似

39、的框架和修饰控件周围相似的框架和修饰共享的布局和定位共享的布局和定位共享的布局和定位共享的布局和定位眩目的切换眩目的切换眩目的切换眩目的切换Activation UIs (tabs, Alt-Tab keystrokes, etc)Activation UIs (tabs, Alt-Tab keystrokes, etc)Activation UIs (tabs, Alt-Tab keystrokes, etc)Activation UIs (tabs, Alt-Tab keystrokes, etc)提供提供提供提供: : : : Tabbed WorkspaceTabbed Workspa

40、ceTabbed WorkspaceTabbed WorkspaceWindows WorkspaceWindows WorkspaceWindows WorkspaceWindows WorkspaceDecked WorkspaceDecked WorkspaceDecked WorkspaceDecked WorkspaceSmartPart SmartPart SmartPart SmartPart 开发人员可以创建独立于开发人员可以创建独立于开发人员可以创建独立于开发人员可以创建独立于 Workspace Workspace Workspace Workspace 的的的的 Part

41、sPartsPartsPartsTabbed WorkspaceA Smart PartA Smart PartYour Work ItemWindows WorkspaceSplat WorkspaceaWorkspace.Show(mySmartPart);View AView AWork Item StateWorkItemsWorkItemsWorkItem WorkItem WorkItem WorkItem 代表一个用例代表一个用例代表一个用例代表一个用例包含在包含在包含在包含在 Workspace Workspace Workspace Workspace 之中之中之中之中服务服

42、务服务服务 Service Agents Service Agents Service Agents Service Agents 并加载状态(同步或异步)并加载状态(同步或异步)并加载状态(同步或异步)并加载状态(同步或异步)创建其他组件创建其他组件创建其他组件创建其他组件 ( ( ( (比如比如比如比如 Views)Views)Views)Views)。CAB CAB CAB CAB 创建创建创建创建 ControllersControllersControllersControllers。组件共享组件共享组件共享组件共享 WorkItem State WorkItem State Wor

43、kItem State WorkItem State 并可以通过它控制用例的生命周期并可以通过它控制用例的生命周期并可以通过它控制用例的生命周期并可以通过它控制用例的生命周期Your Work ItemRun (IWorkspace ws)Service AgentService AgentService AgentService AgentBusiness EntitiesBusiness EntitiesController AController AEvent Topictopic:/Customer/ChangedEvent Broker Publisher-Event Broker

44、Publisher-SubscriberSubscriberPublishersSubscribers1*.NET Event with AttributeEvent Catalog Service.NET method with attribute EventSubscriptionEventSubscription(“(“topic:/Customer/Changedtopic:/Customer/Changed” ”, , ThreadOption.BackgroundThreadOption.BackgroundThreadOption.BackgroundThreadOption.B

45、ackground)Public void CustomerChanged(object sender, CustArgs args) /go call some web services or something long-running EventPublicationEventPublication(“(“topic:/Customer/Changedtopic:/Customer/Changed”)”)event EventHandler CustomerIdChanged;/fire like a normal .NET eventCustomerIdChanged(this, ne

46、w CustArgs() ); EventSubscriptionEventSubscription(“(“topic:/Customer/Changedtopic:/Customer/Changed”)”)Public void CustomerChanged(object sender, CustArgs args) MessageBox.Show(args.CustomerId,“new customer!”);Publishers Publishers Publishers Publishers 和和和和 Subscribers Subscribers Subscribers Subs

47、cribers 对以下达成一致对以下达成一致对以下达成一致对以下达成一致: : : :主题主题主题主题 ( ( ( (由由由由 URI URI URI URI 决定决定决定决定) ) ) )消息消息消息消息 ( ( ( (如果需要一个特定的如果需要一个特定的如果需要一个特定的如果需要一个特定的 EventArgs) EventArgs) EventArgs) EventArgs)范畴范畴范畴范畴 ( ( ( (全局事件还是局部事件全局事件还是局部事件全局事件还是局部事件全局事件还是局部事件) ) ) )Subscribers Subscribers Subscribers Subscriber

48、s 被调用时有对该线程的控制被调用时有对该线程的控制被调用时有对该线程的控制被调用时有对该线程的控制Background (For long-running work)Background (For long-running work)Background (For long-running work)Background (For long-running work)UI Thread (to update UI controls on appropriate thread) UI Thread (to update UI controls on appropriate thread) UI

49、 Thread (to update UI controls on appropriate thread) UI Thread (to update UI controls on appropriate thread) Publisher (on same thread as publisher)Publisher (on same thread as publisher)Publisher (on same thread as publisher)Publisher (on same thread as publisher)A Work Item共享共享 WorkItem State Wor

50、kItem State弱类型的弱类型的 (use as a dictionary) (use as a dictionary) 或是强或是强类型的类型的 (wrap an item with get/set)(wrap an item with get/set)取决于您希望的耦合度要多少取决于您希望的耦合度要多少取决于您希望的耦合度要多少取决于您希望的耦合度要多少调用调用 State:State:动态编程访问,或者通过动态编程访问,或者通过动态编程访问,或者通过动态编程访问,或者通过 IoC attributes IoC attributes IoC attributes IoC attrib

51、utespublic void SomeMethod() Customer currentCust = (Customer)Context.State”Customer”;public class ControllerX : Component( private Customer cust; State(“Customer”) public Customer set cust = value;)View XView XController XController XWork Item StateBusiness EntitiesBusiness Entities 状态保持状态保持 (State

52、 PersistenceState Persistence)提供一个简单的服务的方式来存储和加载提供一个简单的服务的方式来存储和加载 WorkItem stateWorkItem state本质上是对本质上是对本质上是对本质上是对 WorkItemWorkItemWorkItemWorkItem(是一个(是一个(是一个(是一个application application application application controllercontrollercontrollercontroller)使用了)使用了)使用了)使用了 mementomementomementomemento 模式

53、,采用一模式,采用一模式,采用一模式,采用一个个个个 State State State State 对象,并提供一个对象,并提供一个对象,并提供一个对象,并提供一个 serviceserviceserviceservice,这个,这个,这个,这个 service service service service 作为这个作为这个作为这个作为这个 State State State State 对象的对象的对象的对象的repositoryrepositoryrepositoryrepository。提供的实现包括提供的实现包括: :SQLSQLSQLSQLIsolated FileIsolate

54、d FileIsolated FileIsolated FileFileFileFileFileOptional DPAPI Optional DPAPI Optional DPAPI Optional DPAPI 加密加密加密加密public interface IStatePersistenceService void Save(State state); State Load(Guid id); void Remove(Guid id);/your WorkItemServiceDependencypublic IStatePersistenceService persistence;p

55、ublic void SomeMethod() persistence.Save(this.State);DemoDemoCAB CAB 设计中所采用的几种模式设计中所采用的几种模式Implement patternImplement patternByByModel View ControllerModel View Controller- - Using the controller attribute on the view to get injectionUsing the controller attribute on the view to get injection- - Usi

56、ng the controller base class on your controllers Using the controller base class on your controllers- - Saving model objects in WorkItem state Saving model objects in WorkItem state Application ControllerApplication Controller- - Encapsulate into the WorkItem the logic to open, traverse, Encapsulate

57、 into the WorkItem the logic to open, traverse, and close views, executing logic in between, and close views, executing logic in between, - - Keep views independent of each other Keep views independent of each otherBlackboardBlackboard- - Using the WorkItem state as the blackboardUsing the WorkItem

58、state as the blackboard- - Components in the WorkItem can access it and Components in the WorkItem can access it and collaborate on it independentlycollaborate on it independentlyMementoMemento- - Have controllers place the state that might need to be Have controllers place the state that might need

59、 to be managed externally or persisted into WorkItem statemanaged externally or persisted into WorkItem state- - WorkItem state can be saved & loaded independentlyWorkItem state can be saved & loaded independentlyService LocatorService Locator- - Use the Component Model Use the Component Model GetSe

60、rviceGetService() functionality to () functionality to add and get services in the Application Host or upstream add and get services in the Application Host or upstream WorkItems.WorkItems.- - Optionally, use attributes to get Optionally, use attributes to get setter injectionsetter injection 资源资源加入加入 CAB CAB 社区并下载代码:社区并下载代码: 动手实验动手实验动手实验动手实验MSDN CAB WhitepaperMSDN CAB Whitepaper MSDN CAB WebcastMSDN CAB Webcast 谢谢!谢谢!

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 研究生课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号