Notes for Agile Software Development

Source: Internet
Author: User
  • Single Responsibility Principle (SRP)
  • Open-Close principle (OCP)
  • Replacement principle (LSP)
  • Dependency inversion principle (DIP)
  • Interface isolation principle (ISP)

Simple understanding
Single responsibility: the role of a class should be focused on one aspect. The reason for changing this category is only this change.
Open-closed principle: when designing a class, consider that the class may change in the future. In order to eliminate the changes to the class, the class should be open to class extension during design. The basic method is to abstract the objects involved in a specific class by using abstraction, so as to reduce the dependency of a small class on a specific object.
Replacement principle: the inheritance of OO allows child classes to replace the use of parent classes. "Is a" of behavior is a "of subclass and parent class ". Replacement of child classes cannot undermine the correctness of the original prediction of parent behaviors.
Dependency inversion principle: customers (class users) cannot rely on the objects (classes) that provide services ). The specific method is to abstract the objects that provide services. This is the same as that in the real world. You may not go to a restaurant to eat. Different restaurants can offer your favorite dishes.
Interface isolation: for customers in different aspects, the abstraction of objects should be separated. Do not provide customers with behaviors and attributes that do not need to be known to them. This prevents customers from introducing unnecessary burdens when using objects.

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.