Introduction to Design Patterns

Source: Internet
Author: User

Talk about the status quo:

Causes of short-lived projects:

1, the original function can not be more effective split merge, business can not be extended or modified very difficult;

2, modification is more, the same method directly modified and inconvenient to modify;

3, the program itself when the design of strong coupling, repair changes large;

4, post-modification is only a patch, even the patch is problematic.

Reasons for the short-lived project despite repeated prohibitions:

1, encoding degrees of freedom. Real projects are not so random as to write logic between classes and classes. But in the study of the time to develop the habit.

2, the analysis of demand is too optimistic, underestimated the technical difficulties, did not consider the post-business expansion

"Simple" does not mean that the function is simple, but the lack of flexibility, only the project can be used, to get other items is garbage, such code is "one-time code." Our focus is on reusing "code".

Design patterns complicate simple things, but here we need to know that the code of the design pattern is a universal key that can be adapted to a variety of situations, rather than a single occasion.

Broadly, it can be divided into three broad categories.

Behavioral patterns are concerned with the reuse and maintenance of code, and enhance the reusability of code.

Introduction to Design Patterns

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.