`
阅读更多

The Design Patterns book discusses 23 different patterns, classified under three purposes (all of which revolve around the particular aspect that can vary). The three purposes are:

1.              Creational : how an object can be created. This often involves isolating the details of object creation so your code isn’t dependent on what types of objects there are and thus doesn’t have to be changed when you add a new type of object. The aforementioned Singleton is classified as a creational pattern, and later in this book you’ll see examples of Factory Method and Prototype .

2.              Structural : designing objects to satisfy particular project constraints. These work with the way objects are connected with other objects to ensure that changes in the system don’t require changes to those connections.

3.              Behavioral : objects that handle particular types of actions within a program. These encapsulate processes that you want to perform, such as interpreting a language, fulfilling a request, moving through a sequence (as in an iterator), or implementing an algorithm. This book contains examples of the Observer and the Visitor patterns.

 

.................

 

However, a later insight made me realize that it’s more useful to organize the patterns in terms of the problems they solve. I believe this is a subtle but important distinction from the way Metsker organizes the patterns by intent in Design Patterns Java Workshop (Addison-Wesley 2002), because I hope that you will then be able to recognize your problem and search for a solution, if the patterns are organized this way.

 

很好的设计模式学习链接:http://www.jdon.com/designpatterns/index.htm

分享到:
评论

相关推荐

    Thinking in Patterns _ Problem Solving Techniques using Java.

    - **模式分类 (Classifying Patterns)** - 对模式进行更细致的分类有助于开发者更好地理解和应用它们。 - **开发挑战 (The Development Challenge)** - 讨论了在实际开发中遇到的挑战以及如何利用模式来应对这些...

    Fuzzy and Neuro-Fuzzy Systems in Medicine

    4.3 Classifying Evoked and Event-Related Potentials by Waveform 5. Concluding Remarks and Future Applications 5.1 Dynamic Version of State Identification by UOFC 5.2 Data Fusion Appendiex 1...

    k-Nearest Neighbor Classification

    this paper, the problem of classifying an unseen pattern on the basis of its nearest neighbors in a recorded data set is addressed from the point of view of Dempster-Shafer theory. Each neighbor of a ...

    Machine Learning in Action.pdf

    Table of ContentsPART 1 CLASSIFICATION Machine learning basics Classifying with k-Nearest Neighbors Splitting datasets one feature at a time: decision trees Classifying with probability theory: naïve...

    Building.Machine.Learning.Systems.with.Python.2nd.Edition

    This book shows you exactly how to find patterns in your raw data. You will start by brushing up on your Python machine learning knowledge and introducing libraries. You’ll quickly get to grips with ...

    Data Structures and Algorithm Analysis in C++, Third Edition.pdf

    - **3.4.5 Classifying Functions** (函数分类):根据函数的增长速度对函数进行分类。 - **3.5 Calculating the Running Time for a Program** (计算程序运行时间):教授如何通过代码分析来估算程序的运行时间。 - ...

    radar deep learning

    we propose an intelligent cognitive radar system for detecting and classifying the micro unmanned aerial systems (micro UASs). In this system, we design a low- complexity binarized deep belief network...

Global site tag (gtag.js) - Google Analytics