Difference between OOP basics vs SOLID?

I know of OOP (Object oriented programming) and SOLID.

  • OOP basics
  • Encapsulation
  • Abstraction
  • Inheritance
  • Polymorphism
  • and

  • SOLID
  • Single Responsibility Principle
  • Open / Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle)
  • However, I'm not sure what the exact differences are, and if SOLID is a subset of OOP. Can anyone help explain the differences?


    the answer is simple:

  • languages or concepts which don't support Encapsulation, Abstraction, Inheritance and Poly are not object oriented. If you do something object oriented you can always apply these OO basics, because they are available. One doesn't call such things principles.
  • SOLID in return is optional. When developing an OO design you should strive to be SOLID, by applying the underlying basics. Solid only determines how "good" your design is, not if it is object oriented or not. They are principles.
  • PS: I don't understand the downvotes to your question, since it's legitimate, can be answered clearly and is confusing to many OO newcomers. Upvote from me.


    Object-oriented programming is a programming form which is based on the idea of "objects". Rounded up pieces of code that describe properties (width, time, position...) and behavior (change width, display time, calculate position...) of required entities that work together to solve a specific problem. SOLID is a set of principles that help you design a solution for a specific problem in the object-oriented domain. Think of it as a set of rules that will help you visualize the most correct way to reach a solution for a problem.

    链接地址: http://www.djcxy.com/p/82244.html

    上一篇: 用非静态类包装静态类

    下一篇: OOP基础与SOLID之间的区别?