BigJoe Logo BigJoe
Blog Books
Blog Books
All Books Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F# Draft
All Books
Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#

Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F# Draft

Scott Wlaschin

Contents

Jump to chapter

1. Preface 2. Part 1 Understanding the Domain 3. Credits 4. Questions or Suggestions? 5. Working with the Code in This Book 6. Other Approaches to Domain Modeling 7. What’s in This Book? 8. Chapter 1 Introducing Domain-Driven Design 9. The Importance of a Shared Model 10. Understanding the Domain Through Business Events 11. Partitioning the Domain into Subdomains 12. Creating a Solution Using Bounded Contexts 13. Creating a Ubiquitous Language 14. Summarizing the Concepts of Domain-Driven Design 15. Wrapping Up 16. Chapter 2 Understanding the Domain 17. Interview with a Domain Expert 18. Fighting the Impulse to Do Database-Driven Design 19. Fighting the Impulse to Do Class-Driven Design 20. Documenting the Domain 21. Diving Deeper into the Order-Taking Workflow 22. Representing Complexity in Our Domain Model 23. Wrapping Up 24. Chapter 3 A Functional Architecture 25. Bounded Contexts as Autonomous Software Components 26. Communicating Between Bounded Contexts 27. Contracts Between Bounded Contexts 28. Workflows Within a Bounded Context 29. Code Structure Within a Bounded Context 30. Wrapping Up 31. What's Next 32. 033-domain Modeling Made Functional 33. Part 2 Modeling the Domain 34. Chapter 4 Understanding Types 35. Understanding Functions 36. Types and Functions 37. Composition of Types 38. Working with F# Types 39. Building a Domain Model by Composing Types 40. Modeling Optional Values, Errors, and Collections 41. Organizing Types in Files and Projects 42. Wrapping Up 43. Chapter 5 Domain Modeling with Types 44. Reviewing the Domain Model 45. Seeing Patterns in a Domain Model 46. Modeling Simple Values 47. Modeling Complex Data 48. Modeling Workflows with Functions 49. A Question of Identity: Value Objects 50. A Question of Identity: Entities 51. Aggregates 52. Putting It All Together 53. Wrapping Up 54. Chapter 6 Integrity and Consistency in the Domain 55. The Integrity of Simple Values 56. Units of Measure 57. Enforcing Invariants with the Type System 58. Capturing Business Rules in the Type System 59. Consistency 60. Wrapping Up 61. Chapter 7 Modeling Workflows as Pipelines 62. The Workflow Input 63. Modeling an Order as a Set of States 64. State Machines (State Machine) 65. Modeling Each Step in the Workflow with Types 66. Documenting Effects 67. Composing the Workflow from the Steps 68. Are Dependencies Part of the Design? 69. The Complete Pipeline 70. Long-Running Workflows 71. Wrapping Up 72. What’s Next 73. 074-domain Modeling Made Functional 74. Part 3 Implementing the Model 75. Chapter 8 Understanding Functions 76. Functions, Functions, Everywhere 77. Functions Are Things 78. Total Functions (Total Function) 79. Composition 80. Wrapping Up 81. Chapter 9 Implementation: Composing a Pipeline 82. Working with Simple Types 83. Using Function Types to Guide the Implementation 84. Implementing the Validation Step 85. Implementing the Rest of the Steps 86. Composing the Pipeline Steps Together 87. Injecting Dependencies 88. Testing Dependencies 89. The Assembled Pipeline 90. Wrapping Up 91. Chapter 10 Implementation: Working with Errors 92. Using the Result Type to Make Errors Explicit 93. Working with Domain Errors 94. Chaining Result-Generating Functions 95. Using bind and map in Our Pipeline 96. Adapting Other Kinds of Functions to the Two-Track Model 97. Making Life Easier with Computation Expressions 98. Monads and More 99. Adding the Async Effect 100. Wrapping Up 101. Chapter 11 Serialization 102. Persistence vs. Serialization 103. Designing for Serialization 104. Connecting the Serialization Code to the Workflow 105. A Complete Serialization Example 106. How to Translate Domain Types to DTOs 107. Wrapping Up 108. Chapter 12 Persistence 109. Pushing Persistence to the Edges 110. Command-Query Separation 111. Bounded Contexts Must Own Their Data Storage 112. Working with Document Databases 113. Working with Relational Databases 114. Transactions 115. Wrapping Up 116. Chapter 13 Evolving a Design and Keeping It Clean 117. Change 1: Adding Shipping Charges 118. Change 2: Adding Support for VIP Customers 119. Change 3: Adding Support for Promotion Codes 120. Change 4: Adding a Business Hours Constraint 121. Dealing with Additional Requirements Changes 122. Wrapping Up 123. Wrapping Up the Book
Font size
Background
Font

033-domain Modeling Made Functional

What's Next Part 2 Modeling the Domain