command pattern returning status

I don’t have Design Patterns: Elements of Reusable Object-Oriented Software in front of me at the moment, but I’m pretty sure the authors even say that the design patterns they present are a model that can be modified to fit a specific situation.

This question cuts to the core of what a design pattern is – a template. It’s not something that must be implemented by-the-book. You identified a case where a logical modification to the pattern as presented in the book would have helped the application, and that’s perfectly fine, especially once you weigh the benefits and costs.

Leave a Comment