The Template Method is a lie

In my recent adventures with controller-less actions, and trying to solve the issue of the crazy CRUDController mess I had put myself (and our team/project) into. While some gravitate towards the Singleton pattern to abuse after they learn the GoF patterns, that wasn’t the case for me. Instead, I fell in love with the Template Pattern. But there’s a problem with the Template pattern as the golden hammer for every incidence of duplication we find in our application. The Template Method favors inheritance over composition.

Continue reading over at dzone...

Leave a Reply