Ilya Brin - Software Engineer

History is written by its contributors

Command Pattern in Go: Encapsulating Requests as Objects

2025-09-29 8 min read Patterns Ilya Brin

Command Pattern turns requests into objects. Instead of directly calling a method, you create a command object that encapsulates all information about the action: what to do, with what parameters, on which object.

It’s like an order in a restaurant: the waiter doesn’t cook the food themselves, they write the order on paper and pass it to the kitchen. The paper is the command. It can be delayed, canceled, repeated, or passed to another cook.

Continue reading

Facade Pattern in Go: Simplifying Subsystem Interactions

2025-06-18 9 min read Patterns Ilya Brin

Facade Pattern is a simplified interface to a complex system. Instead of dealing with dozens of classes and methods, the client works with one simple facade that hides all the complexity inside.

It’s like a concierge at a hotel: you don’t call the laundry, restaurant, and housekeeping separately. You tell the concierge what you need, and they coordinate everything for you.

Continue reading
Older posts