Showing "Object-oriented Design" posts

Post thumbnail

Principle of least knowledge

The Law of Demeter, also known as the "Principle of Least Knowledge," is a design guideline in Object-Oriented Programming that aims to reduce the dependencies between objects, thereby creating loosely coupled and highly maintainable code.

Published On - 29 October, 2024

Post thumbnail

SOLID Principles

SOLID principles are five design guidelines for writing maintainable, scalable, and flexible code - These are Single Responsibility, Open/Closed, Liskov's Substitution, Interface Segregation, and Dependency Inversion.

Published On - 18 October, 2024

Post thumbnail

Why composition is favorable over inheritance?

Composition is preferred over inheritance because it offers flexibility, reduces tight coupling, and promotes reusable code. It allows for dynamic behavior changes without the rigidity of inheritance, resulting in more maintainable and scalable systems.

Published On - 2 October, 2024