Naming objects according to the domain

 

There are only two hard things in Computer Science: cache invalidation and naming things.

 
 --Phil Karlton

When exploring roles in a domain, the most complicated thing is most often the fact that we need to name the role that we try to establish in the system. When we are able to name a thing, we can naturally associate it with the role it plays in a system. When building a software system and being able to point out the roles by giving them concrete names, we make it easy for every developer working on the system to know where to put functionality related to the part they need to work on.

Previously, we introduced the concept of a carriage, comprising the cart itself, horses to tow it, and a driver. This is ...

Get JavaScript 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.