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

Isolating the domain


 

Create your application to work without either a UI or a database so you can run automated regression-tests against the application, work when the database becomes unavailable, and link applications together without any user involvement.

 
 --Alistair Cockburn

When we create an application following the principles of domain-driven design, we strive to keep the business logic separate from the parts of the software that interact with the "real world". The most-often referenced case is that we don't want to build our UI layer in a way that it houses some or all of the business logic as well. We want a clear domain-focused API that is consumed by other parts of the application to provide their interaction with the domain.

The concept is similar to the UI being provided by some, to the UI specific language or API, be it HTML, or for example QT. Both sprang out of the concept of providing the developer with all the parts needed to build a UI but keep a natural separation. This...