Blog Archives

Builders with Defaults

One of the times I find Builders particularly useful is when creating complex objects in tests. Often the test case will be influenced by something small within the complex object. To make my tests as readable as possible, I want
Posted in Simple Thoughts

Builders with a Fluent Interface

We use the approach described by the Builder Pattern to ease the creation of objects, especially complex objects. The premise is simple, we slowly gather the parts we want, until we build a complete object. It wasn't until I started using
Posted in Simple Thoughts