Home / Series / Clean Code / Aired Order / Season 5 / Episode 8
Home / Series / Clean Code / Absolute Order / Season 1 / Episode 42

Pile O'Patterns

OK, so now we're really starting the make progress through the design patterns. In this episode we'll study five of the most useful. First we'll discuss Singleton and Monostate; two patterns that help you enforce that only a single instance of a class is created. The real challenge with these patterns is how you initialize the static variables that are involved. So we'll walk through the whole nine yards of initialization issues, including threading issues, locking, double-checked locking, etc. You're going to love Monostate. It's a really cool pattern with lots of very interesting uses. Then we'll talk about nothing. Or rather, objects that do nothing -- or rather objects that get away with doing nothing by doing nothing in just the right way. The pattern is called: Null Object. Then, it's on to the Proxy pattern. This is the pattern used by most interprocess communication tools, and database isolation tools. Proxy is a pattern that is used when two objects need to communicate across a boundary, and should not know about that boundary. Lastly, we'll discuss the Decorator pattern. Decorator is a member of the Visitor family of patterns. It is another way to add new behaviors to existing class hierarchies without modifying those hierarchies. And after that we'll take a long deep breath to get read for the next episode -- and even more patterns.

English
  • Originally Aired May 5, 2015
  • Runtime 60 minutes
  • Created September 17, 2017 by
    Administrator admin
  • Modified September 17, 2017 by
    Administrator admin
Name Type Role
Robert C. Martin Writer
Robert C. Martin Director