This page will stay here as a way to quickly find references to the key blog posts of the past for me and the readers, while working on new articles.
First, I made a roundup of the most crucial and popular oop posts. I guess you have already read The Repository pattern and Object-oriented terminology if you are here.
- Domain model is everything discusses the differences between the domain and infrastructure layers and how to get the best from both. Typically an infrastructure layer is reusable and is provided to the programmer as a library or framework, while the domain layer is the core of an application and is commonly written from scratch.
- Never write the same code twice: Dependency Injection is an introduction to DI techniques, which allow to produce reusable and testable code. For any non-trivial project at least considering Dependency Injection is fundamental.
- When to inject: the distinction between newables and injectables expands on the previous article about DI and makes distinctions about which classes are really suitable for injection of collaborators and the cases when it is an overkill.
- Factory for everything focuses on the object graph building aspect of injection and on how to implement the [Abstract] Factory pattern, presenting a refactoring example towards it.
- Object-oriented myths deals with common legends about supposed futility of good object-oriented design, such as overuse of factories and getters&setters versus encapsulation.
- The rest of the object-oriented myths is the second part of the previous article on myths, and talks about singletons, lazy loading and Utility classes.
- SOLID part 1: Single Responsibility Principle: There can be only one reason for a class to change.
- SOLID part 2: Open/Closed Principle: Classes and methods should be open for extension but closed for modification.
- SOLID part 3: Liskov Substitution Principle: Every function or method which expects an object parameter of class A must be able to accept a subclass of A as well, without knowing it.
- SOLID part 4: Interface Segregation Principle: Classes should not depend on interfaces that they not use.
- SOLID part 5: Dependency Inversion Principle: High level classes should not depend on low level classes. Both should depend upon abstractions. Details should depend upon abstractions. Abstractions should not depend upon details.