Ok, the Distributed DDD guys are repurposing Query Command Separation to mean something more specific as an architectural pattern, but at the method level it just means that a method should either clearly change the state of the system or return values, but not both. The point being to remove “surprises” from the code and hidden side effects. Via the DailyWTF, here’s a beautiful example of violating CQS. This isn’t to make fun of the subject of the WTF, but just to say that violating CQS in the code sample was a huge potential problem for the maintenance developers of that application.
The Shade Tree Developer
Jeremy is the Chief Software Architect at Dovetail Software, the coolest ISV in Austin. Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy is the author of the open source StructureMap tool for Dependency Injection with .Net, StoryTeller for supercharged acceptance testing in .Net, and one of the principal developers behind FubuMVC. Jeremy's thoughts on all things software can be found at The Shade Tree Developer at http://codebetter.com/jeremymiller.Upcoming posts…
How I'm using StoryTeller to test FubuMVC
Building a "Lookup" html convention w/ FubuMVC
FubuMVC's Configuration Model "Special Sauce"
Managing Script dependencies with FubuMVC
Authorization and FubuMVC
Continuations
Composing Views with FubuMVC
Extensible Model Binding with FubuMVC
Introducing "Bottles"
Modular Packaging with FubuMVC
Self-Installing Apps w/ FubuMVC
Routing and Behavioral Conventions with FubuMVC
What Should I Learn?Blogroll