[design mode]. NET design Pattern Notes-understanding design Patterns

Source: Internet
Author: User

Today in Terrylee Cnblog (http://terrylee.cnblogs.com) saw the design patterns related to the whole set of articles, beginners design patterns after reading each article to do some notes and excerpts.

What is design mode and what is architecture?

Design Patterns are a set of reusable, most known, categorized purposes, code design experience Summary. Design patterns are used in order to reuse code, make code easier for others to understand, and ensure code reliability. There is no doubt that design patterns in others in the system are multi-win; Design patterns make code production truly engineering; Design patterns are the cornerstone of software engineering, like the structure of a building. Baidu

Software Architecture (software architecture) is a series of related abstract patterns that guide the design of large software systems in all its aspects. Software architecture is a sketch of a system. Software architecture describes an object that directly forms the abstract component of the system. The connections between the components describe the communication between the components clearly and in a relatively detailed manner. In the implementation phase, these abstract components are subdivided into actual components, such as a specific class or object. In the object-oriented realm, connections between components are usually implemented using interfaces (computer science). Software architecture is the foundation of building computer software practice. With architects setting design principles and objectives for building projects, as the basis for graphing, a software architect or system architect presents the software architecture as the basis for a practical system design that meets the needs of different customers. Baidu

Terrylee Reviews : Architecture and patterns should be a mutually-covered process, but overall the architecture is more concerned with the so-called high-level design, and the focus of the pattern is on the application of "Guidelines or guidance" in design through empirical abstraction, Therefore, when considering the problems at different levels, the patterns on different problem domains are formed. The goal of the model is to separate the unchanging and changing parts of common problems. The invariant part constitutes the pattern, so the pattern is a "guideline" for empirical extraction, and is validated in one-time practice, with different patterns at different levels, small to language implementations, and large to architecture. At different levels, the model provides different levels of guidance.

The role of design patterns

(1) Reuse the design, it is more meaningful than the simple reuse of code;
(2) to provide a common vocabulary for the design, each model name is a design vocabulary, its concept makes communication between programmers more convenient;
(3) using the design pattern vocabulary in the development documentation allows others to understand your ideas more freely, understand why you do so, and what you have done. Writing development documents is also more arbitrary;
(4) Applying design patterns can make refactoring systems easy, ensuring that correct code is developed and the likelihood of errors in design or implementation is reduced;
(5) Can save a lot of time.

Rational Application of design pattern

There are a lot of talented programmers in the world who can include 6 design patterns in a piece of code, or they can do the design well without a pattern. But our goal is to pursue effective design, and design patterns can provide some kind of reference model and design method for this goal.

We do not need to Bong Gof design mode for criterion, but the rational use of design patterns is the right choice. Many people have seen Gof's "Design Patterns", the 23 models also back memorized. But the important thing is not how many models you memorize, the key is to put into practice. In order to design effectively, it is worthwhile to be familiar with the cost of a pattern, because you will soon find that this pattern is really good in design, and many times it makes your design easier.

In fact, in software designers, the rejection of design patterns may be very few, blindly exaggerate the design pattern function but more. Talking about "patterns" does not make you an excellent architect. Really good designers, know how to judge the timing of the use of patterns. Another problem is that many people who are stepping into the software design field are often confused about the design pattern. For them, because there is no practical experience of the project, OO thought has not yet been established, the design model is too advanced. In fact, even the most experienced programmers, do not dare to boast that the various models can be applied rationally.

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.