About design patterns

xiaoxiao2021-03-05  23

I remember that I have been in design mode should be 1 year ago, it was a big two. I learned Java for a year, I saw Thinking in Java twice. Suddenly I noticed this thing, then I have annified some information, and after the initial contact of the UML language, I gradually thought about the direction of OO. Speaking of design patterns, I was confused when I was in touch with him. After all, I was saying that there was no other concept of object-oriented concept. More in C / C style, the process of writing code, and all feel fresh. After I bought a "Java Design Mode", a thick book, 1024 pages, is the thicker book I have bought. It is not easy to read, but it is difficult to understand the content of the whole.

At the beginning, I contacted the Singleton mode, so I was abused everywhere, and I used a lot of Singleton when I wrote the Web. Since after learning, I know that Singleton is an anti-pattern in J2EE, not recommended. Mainly in the distributed environment, Singleton has lost its meaning.

Static Factory and Abstract Factory I have also used the abuse of the existence of the existence, and then I know how these two things are used.

I feel that the design pattern is learning and actually linked. After all, the design mode is extracted from the actual development. If you get it out, it is very boring.

转载请注明原文地址:https://www.9cbs.com/read-37459.html

New Post(0)