About Design Patterns

Source: Internet
Author: User

I hate "design patterns" (probably because I learned Oo from OMT). Oo is actually compromised by design patterns.

The idea of "Design Pattern" is that he first sets out a set of flowers and shelves there, and then teaches in a general way such as "How to get together with legs, how to hook up with hands. This is what I think of as South boxing fights in movies with Hong Kong in the past six or seventy years that have ruined traditional Chinese kung fu. The "Design Pattern" is that routine. Then, there are actually many people in the Chinese kung fu, such as Wudang, Emei, and Shaolin, who are not the so-called kung fu like a stick.

-----------------------------------------------------------------------------

There is no mistake in the design pattern itself, mainly because some people misinterpret his meaning.

I have read the design patterns book. The first sentence is: Each design pattern has its own applicable scenarios. Please do not plan to re-compile yourCode. I don't quite remember it, but it should be.

But in China, the design model has become a dogma, a Bible, a norm, and a standard that all code must abide by. If it is not written in the design mode, it is a demon, that's spam. That's what nobody can understand. There's no level at all. It's a beginner.ProgramSpam code written by members.

Nonsense.

The design pattern is a dictionary that describes in detail the specific implementation, application scenarios, and names of every good person.
It's easy to get started with a name. Chinese people like to turn all conceptual things into topics and show off capital, so many people laugh at others and don't understand what the factory model is, some people talk about the difference between the factory model and the abstract factory.
Take a name for the design pattern, willing to facilitate communication between programmers, it's like telling the waiter you want to eat tomato scrambled eggs in a restaurant instead of letting her put the eggs in a pot and stir-fry them with tomato. Because you and she both understand what tomato scrambled eggs mean, that is, the intention of the design model.

The purpose of the design pattern is to allow programmers not to describe their own implementations, but to use factory pattern, for example, I will use the policy mode to solve this problem to simplify communication.

Therefore, the design model is not guilty. What's wrong is the impetuousness of this industry ......

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.