设计模式,我想大家都很熟悉,然而大家熟悉的可能Gof的23Patterns。有些人甚至把它们等同起来了。其实模式就是,重复问题的重复解决方法,它是用于解决一些在相同或相似的语境中采用的相同解决方案。
    去年曾把《Patters of EnterPrise Application Achitecture》(以后简写《PofEAA》)扫了一遍,几乎没有给我留下什么印象。倒是我越来越崇拜Martin Fowler了。自今天起,打算重新过一遍,不知道自己能坚持到什么时候。在这里我可能会把原本的书中的很多东西放到这里。然而由于本人水平所致,打算分三步走来学习Patterns。
    第一步、先理解书中的内容,掌握模式的特点;
    第二步、学会应用模式,能在遇到的场合想到它的解决方案(模式);
    第三步、自己去发现生活中的模式(是发现不是发明哦);
    《PofEAA》里的引言和第一部分的表述就不在这里介绍了,直接进入介绍模式。打算介绍的先后顺序:
    1、基本模式
    2、Web表现模式
    3、对象-关系模式
    4、领域逻辑模式
    5、分布模式
    6、其他模式(数据源模式、离线模式、会话状态模式)
今天,由于最近比较闲。我打算另起一篇对基本模式中的入口(Gateway)进行介绍。
 ================================================
Patterns List
基本模式:
    Gateway
    Mapper
    Layer Supertype
    Separated Interface
    Registry
    Value Object
    Money
    Special Case
    Plugin
    Service Stub
    Record Set
Web表现模式:
    MVC
    Page Controller
    Front Controller
    Template View
    Transform View
    Two Set View
    Application Controller
对象-关系模式
    Table Data Gateway
    Row Data Gateway
    Active Record
    Data Mapper

    Unit of Work
    Identity Map
    Lazy Load

    Identity Field
    Foreign Key Mapping
    Association Table Mapping
    Dependent Mapping
    Embedded Value
    Serialized LOB
    Single Table Inheritance
    Class Table Inheritance
    Concrete Talbe Inheritance
    Inheritance Mappers

    Metadata Mapping
    Query Object
    Repository   
领域逻辑模式
    Transaction Script
    Domain Model
    Table Model
    Service Layer
分布模式
    Remote Facade
    Data Transfer Object
其他模式
    Optimistic Offline Lock
    Pessimistic Offline Lock
    Coarse-Grained Lock
    Implicit Lock

    Client Session State
    Server Session State
    Database Session State