Articles
Short explainers, each on one idea. Pick a tag to see only its articles.
Level: intermediate
10 of 66 articles
-
UpdatedModule→
Module 3: One Word, Three Meanings: Bounded Contexts
Give each meaning of a word its own bounded context: one folder, one #import and one PostgreSQL schema each, with a test that keeps them apart.
-
UpdatedModule→
Module 6: Trees
Walk a tree depth first and breadth first without hitting the Node.js call stack limit, and see why a binary search tree needs balancing.
-
UpdatedModule→
Module 4: How Contexts Talk: Context Maps
Draw a context map of who depends on whom, then stop a payment provider's field names at the edge of Sales with an anticorruption layer.
-
UpdatedModule→
Module 7: Graphs
Store a graph as adjacency lists, walk it with a visited set, find the fewest steps breadth first, and order dependencies with a topological sort.
-
UpdatedModule→
Module 5: Value Objects: Money Is Not a Number
Make money a value object: a branded Cents type that tsc keeps apart from other numbers, parsed where amounts enter and rounded in one place.
-
UpdatedModule→
Module 8: Heaps
Store a binary heap in an array, keep the top k of a large list, track a running median, and find the cheapest paths with Dijkstra's algorithm.
-
UpdatedModule→
Module 6: Entities and Their Lifecycle
Make the order an entity: one TypeScript type per state, a private constructor with two factories, and methods that refuse a late payment.
-
UpdatedModule→
Module 9: Binary Search and Greedy Choices
Find values in sorted data with binary search, search over the answer itself, and break a greedy rule with a brute force before you trust it.
-
UpdatedModule→
Module 7: Aggregates: Where the Rules Live
Put the seat rule in one aggregate, save it with a version column, and watch a 50-buyer load test stop selling the last seat twice.
-
UpdatedModule→
Module 8: Keeping the Domain Free of Express and PostgreSQL
Put a port between the Sale and PostgreSQL, run each command through an application service, and test the rules in milliseconds with no database.