I have learned a little experience in using Java (6)

zhaozj2021-02-17  54

It should now be said that the design model has been studied. The design pattern is a highly abstract concept. Each mode is a successful experience in solving a problem. Understanding design patterns need to be insightful, so it is best to have some experience before learning design mode, otherwise it is very It is difficult to understand the essence of design patterns.

The article in writing design patterns is difficult to me, first of all, due to experience, level restrictions, the understanding of design patterns has not reached that height, and there are many articles in the design mode. From simple introduction, it is difficult to discuss it. There is a new perspective discussion. I briefly introduced the books I have ever read, and introduce the design model from my understanding of these two books.

The books in design patterns, there are a lot of information, I have read two, "design patterns" and "Java and Mode", which are introduced.

"Design Mode" is the originally mentioned GOF written, which is the Chinese transcript of the Curable Works "Design Patterns Elements of Reusable Object-Oriented Software" using a moderative method. No matter how this book is called a classic, it is worth collecting, you can take it out for a while. The book is 6 chapters, the first chapter introduces the basic concepts of design patterns, and how to read this book. The second chapter introduces an instance that applies multiple design patterns. The third chapter discusses five creation modes, and the fourth chapter discusses 7 structural modes, and the fifth chapter discusses 11 behavior patterns. Chapter 6 is conclusion. The 23 design patterns mentioned in this book are also the classics in the model. In the newly created design model, large parts are variants in these 23 modes. But this book is difficult to understand and also famous:

This book introduces the object description language of design patterns, not the UML we now, you need to understand this object description language when learning. This book example realizes language is SmallTalk and C . When learning this book, you must be familiar with these two languages, and C itself is a very difficult language.

I think this book is not suitable for beginner design patterns, especially for Java developers.

"Java and Mode" is a simple interpretation of "design mode" in Java. The book is 55 chapters, the first two chapters introduced some basic knowledge, including the basic knowledge of UML, next 9 chapter introduces the object-oriented programming principle, the remaining 44 chapters, discuss 26 design patterns, 18 topics. These 18 themes are some examples of design patterns in applications, and some are the author's experience, some of which is a successful example of a wide application.

"Java and Mode" is for Java languages, so examples are implemented in Java. This book provides a large number of simple examples, and simple example is easy to understand, which is easy to simulate in the future. The problems discussed in the subject are also very profound, reflecting the author's deep understanding of software design, is an interpretation of the author's design model. Although this book is relatively simple, I also read three times after reading it, I realized the taste of this book. The following is a little experience I read this book, I read it three times, I will understand everything I understand.

First reading: The first two chapters of this book are the foundation concept, naturally must first understand; and object-oriented principle, you need a certain experience to be deeply understood, so the first time read, how much can understand how much Don't be more important; for the reading of the design mode, at least familiar with the UML map of each mode and the sample code for this mode; the subject is the first time, these themes are examples of application design mode, which should be primarily understood. The second reading, what is the object-oriented principle? The focus on each design pattern, understands the scope of application, understanding the shortcomings, and the comparison of mode and mode, how to reflect object-oriented design in each design mode in principle. Third reading, focus is the principle of object-oriented. The study model is not a simple process, and it is necessary to repeated learning and constantly practice.

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

New Post(0)