- Convention over Configuration (Coc)
- Don’t Repeat Yourself (DRY)
-
Single Responsibility Principle (SRP)
An object should have only a single responsibility.
-
Open/Closed Principle (OCP)
Classes or methods should be open for extension, but closed for modification.
-
Liskov Substitution Principle
-
Interface Segregation Principle
-
Dependency Inversion Principle (DIP)
- Has to do with ‘high-level’ objects not depending on ‘low-level’ details.
- This can be achieved with duck typing.
- ‘high-level’ : think business logic
- ‘low-level’ : think database querying and IO
- Fat model, skinny controller
- KISS - "Keep it simple, stupid"
- Composition over inheritance