Design Mode: Object-oriented

Source: Internet
Author: User

Design Mode: Object-oriented

The so-called design principles or design patterns are nothing more than those created on the premise of object-oriented. The premise of object-oriented is abstraction. The three features of object-oriented are encapsulation, inheritance, and polymorphism. To understand the design patterns in essence, let's analyze the relationships between these concepts. See:

The premise of Object-oriented thinking is abstraction, which abstracts some common objects or classes from the real world and encapsulates them into classes or abstract classes or interfaces. These classes or interfaces are used to increase code reusability. Since they are used for reuse, subclass inheritance is required. In order to satisfy the Personalized Requirements of sub-classes during the inheritance process, polymorphism naturally emerges. In order to better reflect the object-oriented thinking, we have a series of design principles, and the design model is only a concrete manifestation of the design principles.

When we have been working on a design model for so long, we have to fundamentally understand what a knowledge is? Why? If not, what will happen ?" These essential things can be more vital in essence.

For details about the design principles, click: Design Principles summary.

For details about the design mode, click: Design Mode highlights.


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.