Guidance on how to break down problems and structure solutions.
Category: Design
Episode #178: Identity Map
In the last episode we looked at the problem of "aliasing", here there are multiple objects representing a single row in a database. Today, we'll look at one possible solution …
Episode #177: Aliasing
Today we look at a perncious problem that sometimes plagues code which uses an Object-Relational Mapper (ORM). Documentation of the ActiveRecord inverse_of option mentioned in the episode can be found …
Episode #172: Registry
Today's dish is another one from one of my favorite cookbooks: Martin Fowler's Patterns of Enterprise Application Development. This time, we'll use the Registry pattern to make it easy for …
Episode #169: Caching Gateway
You might remember the Gateway and Mapper patterns from recent episodes. Today we'll look at how to insert a caching layer between those two patterns. In the process, we'll examine …
Episode #165: Refactor Tapas::Queue
In previous episodes, we got the Tapas::Queue class under test, using a couple of different thread-testing techniques. Now that it has tests, it's time to refactor. The steps of this …
Episode #164: Mapper
Today we explore a pattern for bridging the gap between different domain models.
Episode #145: Active Object
Continuing with the general theme of threads and concurrency, today we look at another pattern for splitting up work in parallel.
Episode #141: Bounded Queue
We continue to evolve our thread-safe queue implementation. Today, we add the ability to set a bound on the queue size.
Episode #140: Threads are Hard
In this episode some bugs turn up in our thread-safe queue class.