Tag: design pattern
-
Real life Kotlin example of Delegation and Dependency Injection
Showcasing a simplified version of a real-life Kotlin application for order processing where we need to enhance functionality without touching the production code. Functional requirements Supposing the system already has the functionality for order creation, now the requirements are to implement: For simplicity, we will only log a message when saving to the database, auditing…
-
Learn the Single Responsibility Principle! Now!
So far, all projects I’ve seen have broken the Single Responsibility Principle (SRP). All of them! At some point, it becomes unavoidable, but I’m not talking about those cases. Instead, I’m referring to the ones where people have a choice and pick the simplest one without even giving it a thought. If you don’t know,…