Schema concept (the pattern concept)

Source: Internet
Author: User

Schema Concepts

"Design patterns help you learn more from other people's success stories than from your own failures." Perhaps the most important step in the field of object-oriented design is the "design pattern" movement, which is recorded as a "design pattern" book. The book shows the solutions for specific types of problems. This book will use examples to introduce the basic concepts of design patterns. This will inspire you to read the Book of design patterns, such as Gamma, which has become an important and almost necessary "glossary" for programmers engaged in object-oriented programming.

The later chapters of this book describe the process of design evolution with an example, starting with the initial solution, and eventually evolving into a more rational design based on reasonable reasoning and steps. This example program (an example of a mock trash sorting ) evolves over time, you can think of it as a prototype, and you do it from a solution that applies to a particular problem. Evolve into a flexible approach to solving a particular type of problem.

What is a pattern?

In the beginning, you can think of the pattern as a particularly ingenious and perceptive way to solve a particular kind of problem. More precisely, many people have solved a problem from different angles, and ultimately they have proposed the most versatile and flexible solution. This may be a problem you've seen and solved before, but your approach may not be as complete as the approach you'll see in the pattern.

Although they are called "design patterns", they are not, in fact, limited to the scope of design. Patterns seem to be far from traditional analysis, design, and implementation; On the contrary, the pattern embodies the whole idea of the program, so sometimes it appears in the analysis or in the schematic design phase. This is an interesting phenomenon because patterns can be implemented directly by code, so you may not want to use patterns before you design or encode them in detail (you may not actually realize that you need a particular pattern before you design and code in detail).

The basic concept of a pattern can also be seen as the basic concept of design: adding an abstraction layer. Whenever you want to abstract something out, you are actually separating specific details, and a compelling motivation to do so is to separate the changes from the unchanging things that matter. Another way of saying this is that when you find that part of a program is likely to change for some reason, you want to not propagate the changes to the code in the rest of the program. Doing so not only makes the program easier to maintain, but it usually makes the program easier to understand (which lowers costs).

In many cases, the hardest part of designing a system that is elegant and easy to maintain is to find " a whole range of things that change ." "(Here,"vector"means the maximum gradient

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.