The design pattern is coming with the "Design Pattern, Elements of Reusable Object-Oriented Software" issued by 95 years. A "Java and Mode" makes a more extensive Chinese developer understand and fall in love. Design Patterns!
In the article on the bridge, there was a story about the design pattern: "On the Java language system, the GOF design mode is a" bridge "between Java basics and J2EE framework knowledge." The pattern is great.
What is the design pattern?
John Vlissides have said: "In design mode, only, the most important thing is constant." Maybe it's not so good, what he said should be that the design model is a crystallization summary for existing experience. Therefore, it should be compared to the formula in mathematics, the theorem in the physics should not be over.
There is no universal formula and theorem in the world, of course, there is no universal design mode! How can I use a good mode of use?
Of course, the first one must follow the conditions applicable to each pattern, and correctly evaluate and analyze existing issues. Otherwise, Zhang Guan Li Dai is equal to non-symptoms, eat it faster :)
To do the right analysis and evaluation, is it easy to talk? ! This is not a familiar number of two or three-channel design pattern textbooks that can be achieved - of course, this is a good role in the close goal. This is the main thing is to experience! However, the monks have just participated in the socialist construction for less than half a year, and the family is thin, and there is no right to ignore the big quarter here: introduce you one or two cheats, everyone must have a certain skill. Another point is important, just don't die! Think about the use of formulas to make mathematics or physical questions, it is difficult to solve some clever big topics. It can be said that the essence is to expand and reuse, and do this first to know the idea of each mode. Just like the masters in martial arts, Kung Fu gets no unknown; the highest realm of design model is probably. So everyone still write code, less sleep, more mobile pen, chat less, and share together.
"Design Pattern, Elements of Reusable Object-Oriented Software" has been mentioned in 23 models. Maybe you have to shake your head: 23 models, too much, just can't remember! Take a look at "Java and Mode" this multi-function device (can be used as a brick), which is fainted, exclaimed: Design mode loves me, it's so difficult! !
In fact, the younger brother has also been the top of the top, it is really embarrassing! But when I had to study the design model because of the reason for a training, I found that the original worry is extra! There are many models in the 23 models, "Looks like God", in order to better master we can complete 23 concentrated memories (look like God here I mean: They are basically the same in achieving the structure, and implementation The purpose is to have different focuses). So, I advise the people who are still hesitating, open your book, start learning!
According to the division in the book, the design model is divided into three types: creation, structural and behavioral design patterns.
The creation design pattern describes the related technologies of instantiated objects to solve issues related to creating objects.
Structural design patterns describe the common ways of organizational classes and objects in the software system, avoiding a class that is given to excessive duties and destroying classes and information overlapping between classes.
The behavioral design pattern is responsible for allocating the responsibility of the object, providing a valid policy for the coordinating model of the object.