Design Patterns

Design Patterns: Composite

The Composite is another design pattern that belongs to Structural Patterns family. We use this pattern when we want to group components inside a larger component. In other words, we can built a hierarchy of objects. A definition by GoF: A basic structure of Composite pattern: Component Declares an interface for objects in the composition….

Read More

Design Patterns: Decorator

Hi guys, one more design pattern and today I am going to continue with a Structural Pattern. In particular, I will introduce you to Decorator design pattern. Sometimes this pattern is also known as Wrapper. Decorator is a pattern that adds new features to an existing object without altering anything from the original object. When…

Read More

Design Patterns: Dependency Injection

What Dependency Injection is. Let’s imagine an object that does a specific function. Now let’s imagine a second object that takes the first object as an argument. This object cannot function or can function partially without the first one. When this happens, it’s called Dependency Injenction. Dependency Injection is a design pattern and we want…

Read More

Design Patterns : Object Pooling

Object Pooling is a design pattern that belongs to creational design patterns. Creational design patterns are the ones that deal with object creation mechanism. This gives the program more flexibility in deciding which objects need to be created for a given use case. Design pattern object pooling gives us the ability to load  some instances…

Read More

The OOP Concept

Object-oriented programming (OOP) is a way of writing code based on concept of objects. Every object has its own arguments and functions. If there is a need to code with OOP principles then we have to be in a continuous effort trying to describe everything into objects. Before we continue on to how we have…

Read More