Domain-Driven Refactoring
summary
Starts from a procedural “loyalty rewards” handler that loads data, calls an HTTP service, computes values, and saves via EF; applies concrete refactorings (compose/inline methods, extract class, extract interface, use base type, move method to type) with ReSharper and DI changes so the logic moves into OfferType and Member, constructors and private setters enforce invariants, and a domain double dispatch pattern handles async value lookup. Result: behavior lives in domain objects, easier testing and safer mutations.
AI-written summary · about
chapters (15)
- 0:00Start
- 2:08Object Model of the Domain
- 2:21Patterns of Enterprise Application Architecture
- 11:36Calculating the Expiration Date
- 12:23Assign an Offer to a Method
- 15:43The Transaction Script Pattern Transaction
- 16:48Calculate Offer Value
- 24:05Extract Method into Class Refactoring
- 24:22Fix Up the Dependency Injection
- 25:10Domain Service
- 27:00Defactoring
- 30:30Make this Method Non-Static
- 40:39Double Dispatch Pattern
- 54:37Assign Offer Method
- 59:54Domain Driven Design
related talks
49mDomain-Driven Refactoring
01h 12mLegacy Refactoring
54mImplementing Domain Driven Design
50mDomain-Driven Transformation
01h 05mGetting to DDD: Pragmatic or Principled?
01h 03mExposing the not-so-secret practices of the cult of DDD
01h 03mExposing the not-so-secret practices of the cult of DDD
34mData-Driven Refactoring
