A summary of the post “How I explained OOD to my wife"

I have read the post “How I explained OOD to my wife”,i am deeply impressed by the author’s intelligence and knowledge,by the word choice he used,the sentence structure he made,he explained the OOD from real life perspective and discussed in a conservational manner.it is so good that i don’t know which word i can use to praise this post,maybe splendid or any words that can be used to praise things,i have recommended this post to some of my friends.

following are a summary of this post.

there are some basic principle of Object Oriented Design (OOD),which are abbreviated as SOLID

  • S = Single Responsibility Principle
  • O =Opened Closed Principle
  • L = Liscov Substitution Principle
  • I = Interface Segregation Principle
  • D = Dependency Inversion Principle

As we know the descriptions above are abstract and hard to understand,let me translate them to software language(exactly,i just copy from the original post,not translate).

Single Responsibility Principle

"There should never be more than one reason for a class to change."

Opened Closed Principle

"Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification."

Liscov Substitution Principle

"Subtypes must be substitutable for their base types."

Interface Segregation Principle

"Clients should not be forced to depend upon interfaces that they do not use."

Dependency Inversion Principle

"High level modules should not depend upon low level modules. Rather, both should depend upon abstractions."

你可能感兴趣的:(EXPLAIN)