Severin Perez


Thematic Configuration with the Abstract Factory Pattern

October 17, 2018
In object-oriented design, one of the principle aims is to produce code that is flexible, maintainable, and reusable. One of the ways to do this is to use abstractions in your code rather than concretions. The more your objects know about how one another are implemented, the more dependencies there are in your system. As the number of dependencies grows, the potential for cascading breakage grows as well. But what happens when you have a system that requires certain objects to come from the same family?

Extending Object Behavior with the Decorator Pattern

October 13, 2018
In some situations, it may be preferable not to mutate a given object. Or more likely, you won’t even have the option of mutating an object because it may come from a codebase over which you have no control (such as an external library). Such cases are relatively common; however, it’s still possible to enhance an immutable object’s behavior. One effective means to do so is with the decorator pattern.

Coding Dynamic Behavior with the Strategy Pattern

October 10, 2018
One of the benefits of object-oriented design is the ability for objects to share some behaviors while simultaneously differing in others. Typically, this is achieved through inheritance--when many subclasses inherit properties from a parent class but can optionally override certain behaviors as needed. This is a very useful and common design pattern; however, there are situations when polymorphism through inheritance is inappropriate.

Fundamental Object Design Patterns in JavaScript

June 17, 2018
As a JavaScript developer, much of the code you will be writing will deal with objects. We create objects to help organize code, reduce redundancy, and reason about problems using object-oriented techniques. The benefits of object-oriented design are readily apparent, but recognizing the usefulness of objects is just the first step. Once you have decided to use an object-oriented structure in your code, the next step is to decide *how* to do it.

Tag: design (p. 1)
© Severin Perez, 2020