欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

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

发布时间:2023/12/15 编程问答 61 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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."

总结

以上是生活随笔为你收集整理的A summary of the post “How I explained OOD to my wife的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。