DEV Community

Israel Parra
Israel Parra

Posted on

Making Design Decision

Making Design Decision

DDD In action

I want to take advantage of this article to talk about one interesting topic related to Domain Driven Design which is how we should take decisions related to our domain design.

Eric Evans in his book “Domain Driven Design” list six essential points to consider at the time to take strategic design decisions. Those points are the following:

  • Decisions must reach the entire team

  • The decision process must absorb feedback

  • The plan must allow for evolution

  • Architecture teams must not siphon off all the best and brightest

  • Strategic design requires minimalism and humility

  • Objects are specialists; developers are generalists

As you can see those points are simple and most of us can be sure that we already have put into practice a couple of them because most of them are close to common sense and are part of the daily practices in a development team. But what means each one of those points, well I will share with you the definitions provided by Evans in its great book.

Before to proceed I want to clarify that for the following descriptions, I going to get the textual definitions making reference to “Domain Driven Design — Eric Evans”. I do that because his idea is clear and I’m very sure that will help you to understand the approach of each idea.

I recommend to read carefully each one of the points and thinking about your current project and your current team. Evaluate if you already are applying those concepts and think about how it is helping your daily work. On the other hand, if your team is not applying all or some of the points make time and think about what is happening?, what your team or your company needs to modify to can apply each one of those concepts?, and think about what could be the changes if your team implements those points in your daily work.

I’m sure that making that kind of reflection based on the status of your development team brings us a lot of benefits because we can start to prepare a road to propose changes that could be beneficial for our current development process.

After our philosophical section, it’s time to learn what those points mention. Then let’s go with our learning.

Decisions must reach the entire team

Obviously, if everyone doesn’t know the strategy and follow it, it is irrelevant. This requirement leads people to organize around centralized architecture teams with official “authority”􏰀so that the same rules will be applied everywhere. Ironically, ivory tower architects are often ignored or bypassed. Developers have no choice when the architects’ lack of feedback from hands-on attempts to apply their own rules to real applications results in impractical schemes.

On a project with very good communication, a strategic design that emerges from the application team may actually reach everyone more effectively. The strategy will be relevant, and it will have the authority that attaches to intelligent community decisions.

Whatever the system, be less concerned with the authority bestowed by management than with the actual relationship the developers have with the strategy.

The decision process must absorb feedback

One technical architecture team I worked with actually circulated its own members through the various application development teams that were attempting to use its framework. This rotation pulled into the architecture team the hands-on experience of the challenges facing the developers, while it simultaneously transferred the knowledge of how to apply the subtleties of the framework. Strategic design has this same need of a tight feedback loop.

The plan must allow for evolution

Effective software development is a highly dynamic process. When the highest level of decisions is set in stone, the team has fewer options when it must respond to change. EVOLVING ORDER avoids this trap by emphasizing ongoing change to the large-scale structure in response to deepening insight.

When too many design decisions are preordained, the development team can be hobbled, without the flexibility to solve the problems they are charged with. So, while a harmonizing principle can be valuable, it must grow and change with the ongoing life of the development project, and it must not take too much power away from the application developers, whose job is hard enough as it is.

With strong feedback, innovations emerge as obstacles are encountered in building applications and as unexpected opportunities are discovered.

Architecture teams must not siphon off all the best and brightest

Design at this level calls for sophistication that is probably in short supply. Managers tend to move the most technically talented developers into architecture teams and infrastructure teams, because they want to leverage the skills of these advanced designers. For their part, the developers are attracted to the opportunity to have a broader impact or to work on “more interesting” problems. And there is prestige attached to being a member of an elite team.

These forces often leave behind only the least technically sophisticated developers to actually build applications. But building good applications takes design skill; this is a setup for failure. Even if a strategy team creates a great strategic design, the application team won’t have the design sophistication to follow it.

Conversely, such teams almost never include the developer who perhaps has weaker design skills but who has the most extensive experience in the domain. Strategic design is not a purely technical task; cutting themselves off from developers with deep domain knowledge hobbles the architects’ efforts further. And domain experts are needed too.

It is essential to have strong designers on all application teams. It is essential to have domain knowledge on any team attempting strategic design. It may simply be necessary to hire more advanced designers. It may help to keep architecture teams part-time. I’m sure there are many ways that work, but any effective strategy team has to have as a partner an effective application team.

Strategic design requires minimalism and humility

Distillation and minimalism are essential to any good design work, but minimalism is even more critical for strategic design. Even the slightest ill fit has a terrible potential for getting in the way. Separate architecture teams have to be especially careful because they have less feel for the obstacles they might be placing in front of application teams. At the same time, the architects’ enthusiasm for their primary responsibility makes them more likely to get carried away. I’ve seen this phenomenon many times, and I’ve even done it. One good idea leads to another, and we end up with an overbuilt architecture that is counterproductive.

Instead, we have to discipline ourselves to produce organizing principles and core models that are pared down to contain nothing that does not significantly improve the clarity of the design. The truth is, almost everything gets in the way of something, so each element had better be worth it. Realizing that your best idea is likely to get in somebody’s way takes humility.

Objects are specialists; developers are generalists

The essence of good object design is to give each object a clear and narrow responsibility and to reduce interdependence to an absolute minimum. Sometimes we try to make interactions on teams as tidy as they should be in our software. A good project has lots of people sticking their nose in other people’s business. Developers play with frameworks. Architects write application code. Everyone talks to everyone. It is efficiently chaotic. Make the objects into specialists; let the developers be generalists.

Because I’ve made the distinction between strategic design and other kinds of design to help clarify the tasks involved, I must point out that having two kinds of design activity does not mean having two kinds of people. Creating a supple design based on a deep model is an advanced design activity, but the details are so important

that it has to be done by someone working with the code. Strategic design emerges out of application design, yet it requires a big-picture view of activity, possibly spanning multiple teams. People love to find ways to chop up tasks so that design experts don’t have to know the business and domain experts don’t have to understand technology. There is a limit to how much an individual can learn, but overspecialization takes the steam out of domain-driven design.

Final notes

With this kind of article, I hope to wake up your curiosity about the DDD world and let you know that there are perfect authors like Eric Evans that can teach us a lot of things and we can absorb all those recommendations to be better developers, remember as I have mentioned in other articles we need to be a software craftsman.

Top comments (0)