Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Domain Modeling Made Functional
About the Pragmatic Bookshelf
Table of Contents
Early praise for Domain Modeling Mad e Functional
Preface
Who Is This Book For?
What’s in This Book?
Other Approaches to Domain Modeling
Working with the Code in This Book
Questions or Suggestions?
Credits
Acknowledgments
Pa rt 1 Understanding the Domain
Chapter 1: Introducing Domain-Driven Design
The Importance of a Shared Model
Understanding the Domain Through Business Event s
Partitioning the Domain into Subdomains
Creating a Solution Using Bounded Con texts
Creating a Ubiquitous Language
Summarizing the Concepts of Domain-Driven Desi gn
Wrapping Up
Chapter 2: Understanding the Domain
Interview with a Domain Expert
Fighting the Impulse to Do Database-Driven Des ign
Fighting the Impulse to Do Class-Driven Design
Documenting the Domain
Diving Deeper into the Order-Taking Wo rkflow
Representing Complexity in Our Domain Model
Wrapping Up
Chapter 3: A Functional Architecture
Bounded Contexts as Autonomous Software Compon ents
Communicating Between Bounded Contexts
Contracts Between B ounded Contexts
Workflows Within a Bounded Context
Code Structure Within a Bounded Context
Wrapping Up
What’s Next
Part 2: Modeling the Domain
Chapter 4: Understanding Types
Understanding Functions
Types and Functions
Composition of Types
Working with F# Types
Building a Domain Model by Composing Types
Modeling Optional Values, Errors, and Collecti ons
Organizing Types in Files an d Projects
Wrapping Up
Chapter 5: Domain Modeling with Types
Reviewing the Domain Model
Seeing Patterns in a Domain Model
Modeling Simple Values
Modeling Complex Data
Modeling Workflows with Functions
A Question of Identity: Value Objects
A Question of Identity: Entities
Aggregates
Putting It All Together
Wrapping Up
Chapter 6: Integrity and Consistency in the Domain
The Integrity of Simple V alues
Units of Measure
Enforcing Invariants with the Type System
Capturing Business Rules in the Type System
Consistency
Wrapping Up
Chapter 7: Modeling Workflows as Pipelines
The Workflow Input
Modeling an Order as a Set of States
State Machines
Modeling Each Step in the Workflow with Types
Documenting Effects
Composing the Workflow fro m the Steps
Are Dependencies Part of the Design?
The Complete Pipeline
Long-Running Workflows
Wrapping Up
What’s Next
Part 3: Implementing the Model
Chapter 8: Understanding Functions
Functions, Functions, Everywhere
Functions Are Things
Total Functions
Composition
Wrapping Up
Chapter 9: Implementation: Composing a Pipeline
Working with Simple Types
Using Function Types to Guide the Implementat ion
Implementing the Validatio n Step
Implementing the Rest of the Steps
Composing the Pipeline Steps Together
Injecting Dependencies
Testing Dependencies
The Assembled Pipeline
Wrapping Up
Chapter 10: Implementation: Working with Errors
Using the Result Type to Make Errors Explicit
Working with Domain Errors
Chaining Result-Generating Functions
Using bind and map in Our Pipeline
Adapting Other Kinds of Functions to the Two- Track Model
Making Life Easier with Computation Expressio ns
Monads and More
Adding the Async Effect
Wrapping Up
Chapter 11: Serialization
Persistence vs. Serialization
Designing for Serialization
Connecting the Serialization Code to the Work flow
A Complete Serialization Example
How to Translate Domain Types to DTOs
Wrapping Up
Chapter 12: Persistence
Pushing Persistence to the Edges
Command-Query Separation
Bounded Contexts Must Own Their Data Storage
Working with Document Databases
Working with Relational Databases
Transactions
Wrapping Up
Chapter 13: Evolving a Design and Keeping It Clean
Change 1: Adding Shipping Charges
Change 2: Adding Support for VIP Customers
Change 3: Adding Support for Promotion Codes
Change 4: Adding a Business Hours Constraint
Dealing with Additional Requirements Changes
Wrapping Up
Wrapping Up the Book
You May Be Interested In…
← Prev
Back
Next →
← Prev
Back
Next →