SOLID principles

SOLID is an acronym that describes a particular set of application development principles that drive proper object-oriented design and development. When applied across an entire application, these techniques work together to create modular components  that are easy to test and resilient to change.


Single Responsibility Principle

It means that: objects should have only one responsibility and all of their behaviors should focus on that one responsibility.


Open/Closed Principle

Open for extension, closed for modifying.


Liskov Substitution Principle

Objects should be easily replaceable by instances of their subtypes without influencing the behavior and rules of the objects.


Interface Segregation Principle

This principle encourages the use—and at the same time,
limits the size—of interfaces throughout an application. In other words, instead of one
superclass interface that contains all the behavior for an object, there should exist multiple, smaller, more specific interfaces.

Dependency Inversion Principle

Components that depend on each other should interact via an abstraction and not directly with a concrete implementation.


你可能感兴趣的:(Re-study,ASP.NET,MVC)