《Prism 5.0源码走读》 设计模式

Prism或Prism构建的应用程序时会使用大量的设计模式,本文简要列举Prism相关的那些设计模式。

  • Adapter(适配器模式):Prism Library主要在Region和IoC container应用Adapter模式。
    1. ContentControlRegionAdapter.cs
    2. ItemsControlRegionAdapter.cs
    3. SelectorRegionAdapter.cs
    4. UnityServiceLocatorAdapter.cs
    5. MefServiceLocatorAdapter.cs
  • Application Controller Pattern: 这个我们在应用程序中经常应用于控制View切换和跳转,减少event的数量。
  • Factory Pattern: Prism里面使用工厂模式来创建Region behavior.
  1. RegionBehaviorFactory.cs
  • Command Pattern:
  • Dependency Injection Pattern:
  • Event Aggregator Pattern:
  • Facada Pattern:
  • Inversion of Control Pattern:
  • Observer Pattern:
  • Model-View-ViewModel Pattern:
  • Registry Pattern:
  • Service Locator Pattern:
  • Separated Interface and Plug-in
  • Composite and Composite View

下图是设计模式在Prism结构设计中的应用:

 

编辑记录:

2014.08.11 初始版本

2014.08.12 加入Factory Pattern

 

转载于:https://www.cnblogs.com/codesee/p/3905792.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值