All Posts tagged as "Design Patterns"

The Typecast Pattern: Harnessing State Transitions

Whether you’re dealing with network connections, user sessions, or any state-dependent operations, ensuring that transitions are valid and safe is crucial. The complexity arises because states often dictate what actions can be performed, and performing an invalid action can lead to unpredictable behavior or even system failures...

Read

Design Patterns: Abstract Factory

In the last article I explored how to implement the Singleton pattern in Rust, I will continue with another creational design pattern, the Abstract Factory pattern

Read

Box<dyn ...> enables the Bridge Pattern

Continouing the series about design patterns today I wanted to explore the `Bridge` pattern. Reading the GOF book it states "Decouple an abstraction from its implementation so that the two can vary indepedently"...

Read

Static Factory Method

I am reading currently the Effective Java book and one of the first tips on the book is the usage of the static factory methods instead of constructors...

Read

Design Patterns: Singleton

Whether you’re dealing with network connections, user sessions, or any state-dependent operations, ensuring that transitions are valid and safe is crucial. The complexity arises because states often dictate what actions can be performed, and performing an invalid action can lead to unpredictable behavior or even system failures...

Read