Can software development step up to the next level? Many tried, but failed..
However, I do think software development is too hard for a lot of problems we try to solve on a daily basis. And as a consequence, too many bugs are out there annoying our beloved users.
If you ever tried using a MDD tool in the past, you’re probably aware that MDD isn’t actually an improvement. Generating code from UML diagrams just takes forever to get it right. The endless drawing in overpriced UML tools, the ugly and bad performing generated code, the inability to deal with custom code changes, etc.. it simply doesn’t work.
And to me, it doesn’t work because MDD as we know it focuses on the data model, the structures if you like. Just like we’ve been focussing on CRUD application for way too long. What if we start focussing on the behavior? Couldn’t that work?
What if we had some ‘framework’ we could rely on and focus on the business side of things. DDD/CQRS/ES just happens to do that. Those of you who have actually been involved in such a project might have noticed that the infrastructure code can be generalized (perhaps you’re already using a framework) and that the command handlers, command validators and event handlers are most of the time very easy to write.
So, imagine we have this tool (no, not UML), where we can define our aggregates and their methods. Thinking up the stream, those methods are triggered by incoming commands defined by the signatures of those methods. We can specify the rules to make sure we’re creating valid commands. We can specify logic that checks if the command can be applied on the aggregate. Thinking down the stream, we can define the event(s) that need to be triggered (i.e. specify what data they should contain) and the logic for their event handlers. The logic for the command handlers, command validation and event handlers could be real code, or just some DSL that gets compiled/interpreted later on. The logic in the methods, validators and event handlers would implicitly define the invariants of our aggregates.
I don’t see this working on the ‘read’ side, as the read side can’t be generalized that much as it needs to be optimized for reading, it is the outside world with all its special requirements.
So, what do you think of this idea? Is this just too crazy for words, or might it just work? Please give it a thought before you lock me up in some mental health clinic ;)