Location>code7788 >text

Use a new classification method to sort out the context of design patterns

Popularity:808 ℃/2025-03-29 21:26:48
Design pattern is a summary of programmers' long-term practical experience and is considered to be the "blade" part of the object-oriented approach.
"Design Patterns" published in the 1990s included 23 design patterns, summarized some useful design principles, and made pioneering contributions to the theorization of this practical experience.
We often quote the views in "Design Patterns" to divide these design patterns into three categories: creation, structure and behavior.
However, this classification method is confusing and can easily conceal the thinking path and internal connection of the design pattern. Beginners who want to grasp and understand these design patterns from a macro perspective are often confused.
On the one hand, we want to learn from experience, but on the other hand, we need to pay a high learning cost. This embarrassing situation prompts us to continue to innovate at the theoretical level.
The author tries to establish new classification methods and gradually reveal the thinking paths and intrinsic connections of design patterns, making them more theoretical and easier to understand and apply.
Everything is difficult at the beginning. When I "fiddled with" these design patterns, I found that the situation was very difficult. The ideas of creators cannot be verified, and these design patterns now have their own meanings. To organize them effectively, a good idea method is needed.
Fortunately, I read a paper called "The Early History Of Smalltalk". As one of the pioneering languages ​​in the object-oriented field, Smalltalk achieved unprecedented success in the 1970s, providing nutrition for later generations such as C++, C#, and Java. In this paper, the author Alan Kay (a visionary uncle) reviews Smalltalk's development history and specifically discusses his mind's object-oriented style.
I seem to understand something. In a longer history, programmers are exploring this way. The so-called "design pattern" comes from the simple thinking of "what is the object-oriented style like".
When I returned to object-oriented narrative and did some simple questions and reasoning, the answers to the difficult questions that troubled me gradually revealed. After finding this path to return to nature, things will go much smoother next.
It took me two years to write these short articles. I don’t put in much ink, but I try to sort out the context of the design pattern.
There is no complex project background here, nor a profound system mechanism. Just relax and prepare to experience the wonderful ideas of programmers over the past few decades.
I have selected some ancient poems and essays as example materials, which are "Jiangnan", "Drinking on the Lake for the First Slowing Rain", "Grass and Insects", "Sky Cleansing Sands and Autumn Thoughts", "Pipa Walk", "Mulan Poems", and "Peach Blossom Spring"...
These beautiful words will be the scenery along the way. I hope your reading will be like a fun trip.
Please click here:Collection of "Simple Design Patterns"