Design patterns: Facade – With Kotlin example

Facade pattern comes under structural patterns group, it aims to simplify connection between clients and complex subsystems by providing a simple interface that contains the needed functionalities by clients and redirect requests to the handlers in the subsystem. Lets see the following diagram In this diagram there is a subsystem with many classes and the • Read More »


Design patterns: Composite – With Kotlin examples

In software and the real world, there are objects with different structures some of them are primitive or simple and some consist of other objects (Children) and many of these children consist of other objects and that is ok, but the problem appears when we need the same task to be done by the primitive and the • Read More »


Design patterns: Adapter – With Kotlin examples

Design patterns split into three main categories Creational, Structural and Behavioral, we explored the creational patterns and now we will move on to the second category the Structural patterns. These patterns focus on how to assemble objects and classes to constry larger structures with simpler and more flexible relationships. And as a beginning of our • Read More »


Design Patterns: Prototype pattern – With Kotlin examples

The design patterns differ in their usage and implementation, and each one of them provide a solution for many common problems with more efficient and flexible methods, one of the famous patterns is Prototype and it belongs to the creational patterns group. The prototype as our reference book “Design Patterns: Elements of Reusable Object-Oriented Software” • Read More »


Design Patterns: Builder pattern – with Kotlin and Kunafa Examples

As a part of our new design patterns series, I will talk about Builder pattern which is the second pattern in our reference book “Design Patterns: Elements of Reusable Object-Oriented Software” by the Gang of Four. Builder pattern belongs to the creational patterns group. These patterns focus on creating objects with more flexible mechanisms . • Read More »