Digging for Essential Behavior

After essential attributes were identified, the team could look into indispensable behavior . . .

After looking back at the basic requirements the team was given, they now sought the behavior of Tenant and User:

• Tenants may be active or be deactivated.

When we think of activating and deactivating a Tenant, we probably visualize a Boolean toggle. As true as that may be, how it is implemented is unimportant here. If we were to place active in the attributes compartment of Tenant in the class diagram, would that necessarily tell the reader anything useful? In Tenant.java, would the following attribute declaration reveal intentions?

public class Tenant extends Entity {     ...     private boolean active;     ... ...

Get Implementing Domain-Driven Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.