🤕
pdp
  • Hello world!
  • Base IT Knowledge
    • OOP
      • GRASP
      • SOLID
    • FP
    • Data structures
  • ENGX
    • Design patterns
    • Release Strategy
      • Branching strategies
        • Trunk-Based Development
    • Clean code
      • Authoring/Naming
      • Code smells
      • Refactoring basis
  • Development processes
    • Waterfall
    • Agile
    • Scrum
  • Other
    • React
    • a11y
Powered by GitBook
On this page
  • Concepts
  • Useful links

Was this helpful?

  1. Base IT Knowledge
  2. OOP

SOLID

PreviousGRASPNextFP

Last updated 5 years ago

Was this helpful?

Concepts

Single responsibility

A should only have a single responsibility, that is, only changes to one part of the software's specification should be able to affect the specification of the class.

Open-closed

"Software entities ... should be open for extension, but closed for modification."

Liskov substitution principle

"Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program." See also .

Interface segregation principle

"Many client-specific interfaces are better than one general-purpose interface." (functions abstract classes)

Dependency inversion principle

One should "depend upon abstractions, [not] concretions."

IoC or Hof

todo:

todo: examples

DI in react

Useful links

class
design by contract
https://habr.com/ru/company/ruvds/blog/426413/
https://getinstance.info/articles/good-code-principles/solid-single-responsibility-javascript/
http://blog.wolksoftware.com/the-current-state-of-dependency-inversion-in-javascript