Archive for the 'Design Patterns' Category

Law of Demeter, MVC views, and the Presenter pattern

Over on Pivotal Blabs there is an interesting post Lovely Demerter, Meter Maid commenting on the last section of Misunderstanding Law of Demeter by Dan Manges. I’m a big fan of making views (the V in MVC) compliant with LoD by using the Presenter Pattern in Rails, go have a read and let us [...]

Napoleon Dynamite speaks on the Abstract Factory Pattern

Oh that Napoleon Dynamite such the software developer…

Don: Hey, Napoleon. What did you do yesterday?

Napoleon Dynamite: I told you! I spent it with coding up sweet classes!

Don: Design Patterns, did you use any?

Napoleon Dynamite: Yes, like 50 of ‘em! Clients kept trying to instantiate my concrete classes, what the heck would you do in a [...]

Liskov Substitution Principle and the Decorator Pattern

From A Learning Guide to Design Patterns this question is asked about the decorator:

In the Implementation section of the Decorator Pattern, the authors write: A decorator object’s interface must conform to the interface of the component it decorates. Now consider an object A, that is decorated with an object B. [...]