Gentle and knowledgeable (1): sharing design patterns (Abstract Factory and Singleton models)

Source: Internet
Author: User

 

Let's learn from each other. Here, I will tell you about my learning process and hope to help you and reduce detours.

    1. Without some programming experience as the foundation, it is basically difficult to learn the design model. Even so, as a newbie, you may still need to memorize these things. After a long time, as long as you do not forget, you will find his great power.
    2. The design pattern is not equivalent to experience. The more experience you have, the better your design model is. It's impossible for you to have a lot of work experience, but naturally you can understand the design patterns and something you can't think. Therefore, you must learn the design pattern.
    3. Design pattern, learn it once, learn twice, you think you understand, in fact, you are far from really understanding. You must always use it at work and constantly learn it before you can grasp it.
    4. When you get to a pattern that is no longer used for the pattern, it means that when you create a function, you will no longer think of the design, but naturally use it. At this time, you are already a master. You are also a programming expert. Just like the programmers who just learned programming, when debugging bugs, they could write a little bit and debug it. When you are a good player, you will not start debugging until the entire film can be completed. This is a natural phenomenon. It is not because you have reached another stage because you didn't deliberately debug bugs.
    5. When you see a UML diagram, you can immediately reflect the completeness in your mind.CodeYou have mastered the design pattern when you have a clear understanding of the schema.
    6. When you have a wealth of work experience, looking back at the basic things, you will find "beautiful ". I suggest you go back and take a look at the XHTML and CSS standards and data structures. You may agree with me.
    7. Some users prefer to download code directly. I will also make various demos for various subsequent models and open the code download.
    8. If you have any questions, please contact me through mazhiyuan1981@163.com. Thank you very much.
    9. Now we provide two source code downloads. In the future, I will write and open all other code models. Finally, let's look at the situation and use some cases in my actual work project to demonstrate it.
    10. All the provided case codes are compiled by yourself. I am the first sender of these codes. It is a coincidence that you see similar or identical on the Internet.

On the following page, I will not post the specific source code. Please download it directly.

 

 

 

 

 

 

 

Download source code:/files/mazhiyuan/pattern.rar

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.