Episode #487: Prototype Pattern

Some of the scariest domain models around arose from the need to accommodate expanding levels of re-use. For instance, consider a student filling out a quiz. The same quiz might be answered by multiple students. It might be spawned from a template which is re-used across multiple classes. And that template, in turn, might be sourced from an example quiz shared across multiple schools.

The number of classes needed to model this kind of multi-level reuse can increase geometrically if you're not careful. In this episode, you'll learn a pattern which will enable you to collapse arbitrarily deep re-use hierarchies into a single, "flat" set of domain concepts.

This page is just for members. Sign in or subscribe to gain access!