"Big Talk Design Patterns" Reading Notes


insert image description here

foreword

These are the notes from reading this book. When I first entered the industry, I felt that I should watch videos, but now, I think that reading is the kingly way. Reading can give you a systematic experience and give you an overall understanding of this skill. The sense of concept, which is very good.

text

foreword

1. If you want to become a better software designer, understanding the evolution process of excellent software is more valuable than learning excellent design itself, because great wisdom is contained in the evolution process of design.
2. Through these design patterns, you can find the feeling of "encapsulation change", "loose coupling between objects", and "programming for interfaces", so as to design "easy maintenance", "easy expansion", "easy reuse", " Flexibility" good program.

1. Is the code error-free? ——Simple factory pattern

1. Separate business logic from interface logic.
2. As long as the operation symbol is input, the factory will instantiate the appropriate object.
3. Introduction to class diagrams:
insert image description here

2. Shopping mall promotion-strategy mode

1. The division of classes is for encapsulation, but the basis of classification is abstraction, and the abstract collection of objects with the same attributes and functions is a class.
2,

reference

Guess you like

Origin blog.csdn.net/qq_43211060/article/details/127848869