Stanislav Zorjan - Stasha - Full Stack Software Engineer and Game Development Hobbyist - Prague


OOP Basics:

1. Encapsulation
2. Inheritance
3. Abstraction
4. Polymorphism

 

OOP Principles:

1. Encapsulate what varies
2. Favor composition over inheritance
3. Program to interfaces not implementation
4. Strive for loose coupled design between object that interact
5. Classes should be open for extension but closed for modification (OCP - Open / Closed principle)
6. Depend on abstraction. Do not depend on concrete classes
7. Only talk to your friends
8. "Don't call us, we'll call you" - Observer pattern (publisher / subscriber)
9. Class should have only one reason to change - (SRP - Single responsibility principle)




Comments (0)