zoukankan      html  css  js  c++  java
  • 《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

  • 相关阅读:
    C#中关于zip压缩解压帮助类的封装(转)
    MonoTouch的官网
    Android布局
    VS2010网站发布
    HTML5的PLACEHOLDER属性
    some np problem
    srm 578
    opencv 边缘算子
    Python扩展(pybind11混编)
    PyTorch之初级使用
  • 原文地址:https://www.cnblogs.com/codesee/p/3905792.html
Copyright © 2011-2022 走看看