Friday, December 06, 2024

Focus on Verbs, Not Names: A Strategy for Better System Design

In my experience, the key to deeply understanding a system or product lies in focusing on behaviors—the actions, flows, and events that drive its operation. Prioritize identifying verbs over names. Here’s why this approach works and how it can transform your design process.

Start with Behaviors

Shift your analysis from “What is this thing?” to “What does it do?”. Focus your research and conversations on:

  • Identifying actions and business flows.
  • Understanding dependencies and concurrency.
    • What depends on what?
    • Which actions can happen in parallel?
    • What triggers or informs each behavior?

When you analyze behaviors, you uncover the dynamic interactions users have with your system. This focus naturally aligns with designing systems as collections of small, independent pieces that encapsulate state and communicate through messages—perfect for paradigms like OOP, Actors, and Microservices.

The Pitfall of Focusing on Names

Many teams fall into the trap of identifying entities (names) first, which often results in anemic, static models disconnected from real-world dynamics. This approach, while intuitive, neglects the rich context of flows, dependencies, and rules. Misunderstanding Object-Oriented Analysis (OOA) in this way often leads to systems that lack expressiveness and scalability.

Behaviors as the Foundation of Value

Remember, customers don’t value software for its own sake. Software is a liability, not an asset. The true asset lies in the actions and outcomes your system enables. Identifying behaviors first ensures your design delivers meaningful value to the customer by focusing on what they actually need: actions, not abstractions.

Scalability Through Behaviors

Focusing on behaviors reveals the concurrent nature of the real world. Systems that prioritize names struggle to address concurrency, parallelism, and scalability. By contrast, analyzing actions and flows allows you to design systems that are naturally reactive and distributed. At higher levels, this approach helps define bounded contexts, domain events, and microservices. At lower levels, it aids in designing concurrent and scalable services.

Event Storming: A Behavioral Lens

Techniques like Event Storming are powerful tools for identifying domain events, dependencies, and key behaviors. They bring the behavioral focus to life, helping teams collaboratively uncover what drives their system and how it should respond.



Conclusion

Identifying entities (names) has its place, but behaviors (verbs) are more critical. A system’s essence lies in what it does, not what it’s called. Adopting a behavior-first approach ensures you design systems that are adaptive, scalable, and valuable to customers.

In the end, this mindset reflects a simple truth: development is always iterative. By continuously refining our understanding of behaviors, we build systems that evolve gracefully with the needs of their users.

Notes:

No comments: