25 lines
No EOL
807 B
Markdown
25 lines
No EOL
807 B
Markdown
---
|
|
layout: default
|
|
title: SOLID principles
|
|
categories: programming
|
|
---
|
|
|
|
### Single responsibility principle
|
|
|
|
This mean if the one thing in specification is changed you only need to change the code in the single place or class
|
|
|
|
### Open/closed principle
|
|
|
|
Software 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.
|
|
|
|
### Interface segregation principle
|
|
|
|
The interfaces should be small and provide as little methods as possible.
|
|
|
|
### Dependency inversion principle
|
|
|
|
The lower module must not depends on higher module. In order to achieve this the code must to relay on abstractions (in other words the code has to use interfaces/protocols) |