preface

I wrote a design pattern series before – the road to open a shop of small light, good response. By means of stories and analogies will comb some knowledge of the file before, which is a systematic knowledge of the process, he can make to you all are more likely to receive points.

Later, when I was discussing basketball tactics, I made a point:

Some of the tactics of basketball, as I understand it, are run, block, pass and cut. This is equivalent to the principles of object orientation, tactics are like design patterns.. Before patterns are used, remember the rules.

I feel it is necessary to sort out my understanding of object-oriented design from the perspective of “running, blocking, passing and cutting” at the lower level, and sort out some of my feelings before, and then I have this article.

As a supplement to OOD, we welcome you to exchange ideas.

The opening

Good-looking martial arts since childhood, always dream that one day they can be like the protagonist of the novel that battle sword tianya, happy, chivalric, everywhere home.

However, after all, can not escape firewood, rice, oil and salt, for three bucket of rice, into the world of mortals, into sentient beings.

However, dream is the heart of Mars, although not burning potential, but also keep hot heart. Hence want to learn daily for a “martial arts secret “, to comfort.

This series of articles will take a “martial arts secret” perspective to write my own thoughts on object-oriented programming. It is mainly divided into three parts, which are expounded from the three levels of Tao, Fa and shu respectively:

  • The first is the mind method, mainly talking about the basic values and cognition of the school (object oriented);
  • The second is the internal process, from SOLID + LoD six OOD design principles to talk about the basic principles I sent in code design;
  • The third is the moves, talk about the 23 design patterns of GoF (commonly used), respectively from three levels, take the martial arts moves
    • “Up” — Creation
    • “Frame” — structural
    • “Active” — behavioral

PS: In order to facilitate memory review, each chapter will be summarized as a knowledge card style. As follows:

Welcome to share your knowledge cards