Some common problems in learning Design Patterns

Source: Internet
Author: User

Based on recent feedback from enthusiastic readersHere are some common design patterns to answer. For more information about how to understand the object-oriented thinking in the design pattern, please download the design pattern.
Some common problems in learning Design Patterns
1. Is there a standard mode? 
To describe each design pattern, gof defines four basic elements for them to enable the pattern to be widely transmitted. This does not mean that the pattern provided by gof is a standard pattern. In fact, they do not give a standard for each mode, but many places give their possible changes, such as the composite mode, with a transparent combination mode, there are also safe combination modes, such as The Observer (observer) mode, there are two forms: push and pull.

These design patterns are just a reference solution for experienced people for common problems. We should avoid repeating the wheel of invention and there is no lineage (which standard or which is not standard ), this is a pseudo-proposition.
2. What is the relationship between design patterns and OO? 
When the design model was first introduced, it was in a period of rapid development of object-oriented design, and those models were all part of the successful object-oriented system, therefore, the 23 most basic models are about object-oriented, but this does not mean that only object-oriented models are available. We know that the mode is a common solution to a problem in a certain context. Therefore, the service-oriented architecture can have a mode and agile can also have a mode. osgi (open
Services Gateway initiative) also has a mode.
3. Can we create a new design model? 
You can give a general solution to a context problem and describe them using the four basic elements of gof. To avoid repeated invention wheel, you must know whether your creation exists or whether it is a variant of the existing mode.
4. Learning the design model means learning the design? 
Learning the design model is just to learn from the successful experience of OO experts. To learn design, you must learn from them and use OO to look at the problem and solve the problem. In this way, in the process of solving the problem, the model will be captured, and naturally change them to adapt to your problem itself.
5. Is the design pattern fundamental to OO design? 
Solving the problem is fundamental. The mode is just a Summary of the experience in solving the problem. After I first learned the design patterns, I thought that the elegant design was to use the design patterns as much as possible. Therefore, I deliberately applied them to solve the problems and encountered some poor designs. Later I read Eric Evans's domain-driven design: Tackling complexity in
The book the heart of software realizes the importance of Domain Modeling. To solve problems, we need to establish a reasonable model for your domain problems. Since oo can bring huge changes to software programming, we need to learn to use the OO perspective to analyze problems and enjoy the great benefits oo brings to programming.

Then, in a later software development, I started to start with the nature of the problem, "forgot" the model, and extracted the model for the problem. After the design and development was completed, I found that, I have naturally used composite mode and interpreter mode. So far, I realized the importance of using the OO perspective to analyze problems. Therefore, this book does not simply introduce models, but explores OOP with everyone and analyzes the benefits of OOP for programming, I hope that anyone who has read this book will be able to analyze problems with the OO perspective.
6. What is the core of the software? 
The core of the software is the model, and extracting a refined model for complex domain problems is fundamental. We must learn to use Oo, a powerful tool, and use its vision to analyze and solve problems so that we can make software satisfactory to our customers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.