solidbook.io
The software design, architecture & testing wiki
Search
SHIFT
K
Account
Downloads
Updates
January 20th, 2025 update
October 30th, 2024 update
March 26th, 2024 update: Revised Book Outline Based on Learnings Teaching TWSE & Timeline
Sept 8th, 2023 update
November 8th, 2022 update
October 17th, 2022 update
September 2nd, 2022 update
July 1st, 2022 update
June 1st, 2022 update
May 12th, 2022 update
January 30th, 2022 update
December 16th, 2021 update
December 2nd, 2021 update
November 10th, 2021 update
October 2nd, 2021 update
July 28th, 2021 update
June 11th, 2021 update
June 2nd, 2021 update
May 25th, 2021 update
May 11th, 2021 update
May 1st, 2021 update
April 19th, 2021 update
March 28th, 2021 update
January 31st, 2021 update
November 16th update
Sept 24th update
August 6th Update
June 14th update
About this online book
Introduction
π Part I: Up to Speed
1. Complexity & the World of Software Design
2. Software Craftsmanship
3. A 5000ft View of Software Design
π§ Part II: Humans & Code
4. Demystifying Clean Code
5. Human-Centered Design For Developers
6. Organizing things
7. Documentation & Repositories
8. Naming things
9. Comments
10. Formatting & Style
11. Types
12. Errors and exceptions
Part III: Phronesis
13. Features (use-cases) are the key
14. Planning
15. Customers
16. Learning the Domain
17. Stories
18. Estimates & Story Points
19. Release Planning
20. Iteration Planning
21. Understanding a Story
22. Acceptance Tests
23. Programming Paradigms
24. An Object-Oriented Architecture
25. Testing Strategies
26. The Walking Skeleton
27. Pair Programming
28. Test-Driven Development Workflow
π Part IV: Test-Driven Development Basics
29. Getting Started with Classic Test-Driven Development
30. Working Backwards using Arrange-Act-Assert
31. Avoiding Impasses with the Transformation Priority Premise
Part V: Object-Oriented Design With Tests
32. Why & How to Learn Object-Oriented Software Design
33. Responsibility Driven Design 101
34. The RDD Process By Example
35. Better Objects with Object Calisthenics
36. Detecting Code Smells & Anti-Patterns
Part VI: Design Patterns
37. Intro to Design Patterns
38. Creational Patterns
39. Structural Patterns
40. Behavioural Patterns
41. How to Develop Pattern Awareness: Understanding the Categorical Nature of Patterns
Part VII: Design Principles
42. Intro to Design Principles
42. The SOLID Principles
43. The Structural Principles
44. The Behavioural Principles
45. The Creational Principles
46. The Least Principles
47. The Ultimate Principles: Coupling, Cohesion & Connascense
48. The Four Elements of Simple Design
π§± Part VIII: Architecture Essentials
49. Intro to Architectural Styles, Principles, Patterns
50. Arch Principles: The Common Principles
51. The Structural Style & Architectural Patterns
The Structural Style
Model-View Controller Architectural Pattern
Model-View-Presenter (MVP) Architectural Pattern
Model-View-ViewModel (MVVM) Architectural Pattern
The Monolithic Architectural Pattern
The Layered Architectural Pattern
The Hexagonal (Component-Based / Ports & Adapters) Architectural Pattern
The Microkernel Architectural Pattern
Component-Based & Structural Principles
Summary of Architectural Styles
52. The Message-Based Style & Architectural Patterns
The Message-Based Style
The Event-Driven Architectural Pattern
The Publish-Subscribe (Message-Queueing) Architectural Pattern
The Blackboard Architectural Pattern
The CQRS Architectural Pattern
The Event-Sourcing Architecture Pattern
Summary of Message-Based Styles
53. The Distributed Style & Architectural Patterns
The Distributed Style
The Client-Server Architectural Pattern
The Peer-to-Peer Architectural Pattern
The Microservice Architectural Pattern
The Service-Oriented Architectural Pattern
The Serverless Architectural Pattern
The Cloud Computing Architectural Pattern
Summary of Distributed Style Architectures
54. The Space-Based Style & Architectural Pattern
The Space-Based Style
The Space Based Architectural Pattern
55. The Principles of Economics & Strategy
π¦ Part IX: Building Web Applications with Domain-Driven Design, Hexagonal Architecture and CQRS
56. About these chapters
57. Domain-Driven Design
Ubiquitous Language
Implementing DDD & ensuring domain model purity
DDD addresses the shortcomings of MVC
Slim (Logic-less) Models
Pick your object-modeling poison
Concerns of the unspecified layer in MVC
Undesirable side-effects with a lack of a domain model
Model behavior and shape
Technical Benefits
Technical Drawbacks
Alternatives to DDD
DDD Building Blocks
Architectural concepts
Subdomains
Bounded Contexts
58. The Project: DDDForum β a Hackernews-inspired forum app
59. How to plan a new project
Imperative design
Dimensions that influence the design approach we should take
Use-case driven design
Applications are groupings of use cases
A use case is a command or a query
Use case artifacts
Functional requirements document business logic
Parallels with API-first design
Steps to implement use case design
Planning with UML Use Case Diagrams
Roles, boundaries, and Conway's Law in Use Case Design
Summary on use case diagrams
Event Storming
Why we need event storming
How to conduct an event storming session
Event Modeling
60. Building DDDForum
Project architecture
Starting with the domain models
Writing Domain Events
Building a Domain Events Subject
Marking an Aggregate that just created Domain Events
How to signal that the transaction completed
How to register a handler to a Domain Event?
Who dictates when a transaction is complete?
Feature 1: Creating a Member
Issuing an API request
Application Services/Use Cases
Fork in the road: Transaction Script vs. Domain Model
Handling errors as domain concepts
Summary on Use Cases/Application Services
Inside the CreateUser use case transaction
Using an Express.js Route Handler to direct the request
Handling the API request with an API Controller
Invoking the Application Service / Use Case
Saving the Aggregate with Sequelize
Notifying subscribers and dispatching Domain Events from Sequelize Hooks
Chaining the CreateMember command from the Forum subdomain
Feature 2: Upvote a post
Understanding voting domain logic
Handling the upvote post request
Inside the Upvote Post use case
Aggregate design principles
Using a Domain Service
Persisting the upvote post operation
Signaling relationship changes
Persisting complex aggregates using database transactions
Feature 3: Get Popular Posts
Read models
Handling an API request to Get Popular Posts
Using a repository to fetch the read models
Implementing pagination
70. Where to go from here?
π§ͺ Part X: Advanced Test-Driven Development
71. 3 Types of Verification: Subject, State, Communication
72. High Value Integration Tests and Contract Tests
73. Dealing with Legacy Code using E2E Characterization Testing
74. Using Idempotency Techniques
75. Using Fixtures & Builders to Build Test Objects & Databases
Conclusion
Made by
Khalil Stemmler
π€ β’ 2025
βΆ
β
Loading...