SOLID Prinzipien erklären
Single Responsibility Principle: one class should be responsible for one piece of functionality. One method should do one thing.
Open Closed Principle: Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. Modify behaviour by adding new code, not by changing old code.
Liskov Substitution Principle: When redefining a routine in a child class, you may only replace its precondition by a weaker one, and its postcondition by a stronger one. If parent class works with Square, child class can work with Shape, but not with cube. If parent class returns List, child can return LinkedList
Interface Segregation Principle: interfaces should be as small as possible.
Bad smell: class implements an interface, but one function stays empty
Solution: divide interface in several interfaces
Dependency Inversion Principle: ****high level modules should not depend on low level modules. Only interfaces should be used for referencing low-level functions
Attribute Fridge violates DIP. We should add an Interface for Frigde (like FoodContainer) and use it instead.
Attribute UserManager violates DIP. We should add an Interface for UserManager and use it instead.
Sieben internen Bestandteile eines Microservices nach Toby Clemson
Neun Charakteristiken von Microservice-Architekturen