Book Image

JavaScript Domain-Driven Design

Book Image

JavaScript Domain-Driven Design

Overview of this book

Table of Contents (15 chapters)
JavaScript Domain-Driven Design
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Services


For now, we have been expressing concepts around "things", but there are certain concepts that are best expressed around the act of doing something, and this is where services come in. Services are a first class element of domain-driven design, and their goal is to encapsulate actions in the domain that involves the coordination of many collaborators.

 

"[…]Verbs in Javaland are responsible for all the work, but as they are held in contempt by all, no Verb is ever permitted to wander about freely. If a Verb is to be seen in public at all, it must be escorted at all times by a Noun.

Of course "escort", being a Verb itself, is hardly allowed to run around naked; one must procure a VerbEscorter to facilitate the escorting. But what about "procure" and "facilitate?" As it happens, Facilitators and Procurers are both rather important Nouns whose job is is the chaperonment of the lowly Verbs "facilitate" and "procure", via Facilitation and Procurement, respectively.[…]"

 
 --- Steve Yegge...