Decorator pattern in Kotlin – Design Patterns

Nowadays, optionality is everywhere. Typically, before purchasing an item, one can choose among multiple configurations, models, and kinds available.

The decorator pattern will allow you to implement a dynamic code structure where the new behaviors can be applied to the basic object.

It increases your optionality.

Continue reading Decorator pattern in Kotlin – Design Patterns

Observer pattern in Kotlin – Design patterns

Have you ever been subscribed to the newsletter? When the author publishes the new issue, it comes straight to your inbox. You can always choose to unsubscribe too.

Why am I asking? Chances are that you’re already familiar with the pattern I’m going to describe today – the observer pattern.

Continue reading Observer pattern in Kotlin – Design patterns