An excellent book for design patterns beginners
2005-03-21 12:14
375 查看
I believe that every one who are working on software development fields would have at least heard of the Gang of Four and their bible of design patterns - Design Patterns: Elements of Reusable Object-Oriented Software . Not to mention the ones who are going to learn design patterns. Most of them read this book for the starting point, and they may just start a tough road if they haven't enough software design experience. Unfortunately, I was one of them. I took quite some time on finish reading this book, and I have got much from it. Even worse, I was completely confused by all those stuff. What I was still clear is some of the names of the patterns. Nothing else! I thought that's because I was lack of experience on software design. For people like me, are not ready for learning design patterns. I could just defer the attempt until I got enough experience. I had believed this thought for a long time.
On day, the book 'Design Patterns Explained: A New Perspective on Object-Oriented Design' comes in front of me. I surprisingly found that it gives us a much lower threshold of design patterns learning.
Pattern: A solution to a problem in a context.
Basic principles of OOD:
1. design to interface
2. favor composition over inheritance
3. find what varies and encapsulate it
Compare and contrast the traditional way and the new way of looking at objects,encapsulation and using inheritance:
1.Objects:
tra - as a bundle of data and methods
new - as things with responsiblilities
-- focus on what the objects are supposed to do, not simply on how to implement them.
It makes object definition more flexible.
2.Encapsulation:
tra - as hiding data
new - as the ability to hide anything
-- gives a better way to split up the program.
3.Inheritance:
tra - for specialization and reuse
new - as a method of classifying objects
-- make it more likely to design to interface.
Handling variation in behavior with objects.
Be aware of the relationship between them:
1.Commonality/Variability analysis
2.The conceptual,specification and implementation perspectives
3.An abstract class, its interface and its derived classes
On day, the book 'Design Patterns Explained: A New Perspective on Object-Oriented Design' comes in front of me. I surprisingly found that it gives us a much lower threshold of design patterns learning.
Pattern: A solution to a problem in a context.
Basic principles of OOD:
1. design to interface
2. favor composition over inheritance
3. find what varies and encapsulate it
Compare and contrast the traditional way and the new way of looking at objects,encapsulation and using inheritance:
1.Objects:
tra - as a bundle of data and methods
new - as things with responsiblilities
-- focus on what the objects are supposed to do, not simply on how to implement them.
It makes object definition more flexible.
2.Encapsulation:
tra - as hiding data
new - as the ability to hide anything
-- gives a better way to split up the program.
3.Inheritance:
tra - for specialization and reuse
new - as a method of classifying objects
-- make it more likely to design to interface.
Handling variation in behavior with objects.
Be aware of the relationship between them:
1.Commonality/Variability analysis
2.The conceptual,specification and implementation perspectives
3.An abstract class, its interface and its derived classes
相关文章推荐
- [必读免费新电子书]:JavaScript和jQuery基本设计模式(Essential JavaScript & jQuery Design Patterns For Beginners) 最后编辑:2010-11-16 18:15
- Command(Chapter 20 of Pro Objective-C Design Patterns for iOS)
- Proxy(Chapter 22 of Pro Objective-C Design Patterns for iOS)
- Design Patterns for Embedded Systems in C
- The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experi
- AJAX Patterns: Design Patterns for AJAX Usability
- Observer(Chapter 12 of Pro Objective-C Design Patterns for iOS)
- Decorator(Chapter 16 of Pro Objective-C Design Patterns for iOS)
- An Introduction to Entity Framework for Absolute Beginners
- Oracle Tip: Choosing an efficient design for Boolean column values
- Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications 云设计模式:云应用的规范架构指导
- 论文翻译:Development and Evaluation of Emerging Design Patterns for Ubiquitous Computing
- An Introduction to Design Patterns in C++ with Qt 4 (Bruce Perens Open Source)
- Abstract Factory(Chapter 5 of Pro Objective-C Design Patterns for iOS)
- Adapter(Chapter 8 of Pro Objective-C Design Patterns for iOS)
- Visitor(Chapter 15 of Pro Objective-C Design Patterns for iOS)
- Cloud Design Patterns Book Reading(undone)
- Design Patterns for User Interface for Mobile Applications
- Strategy(Chapter 19 of Pro Objective-C Design Patterns for iOS)
- Memento(Chapter 23 of Pro Objective-C Design Patterns for iOS)