high level CQRS and Event sourcing
high level CQRS and Event sourcing client commands write / domain events read model dtos client
LIST
high level CQRS and Event sourcing client commands write / domain events read model dtos client
Code snippets from GregYoung 8 CQRS Class - YouTube public class DeactivateInventoryItemCommand { public readonly Guid InventoryItemId; public readonly string Comment; public DeactivateInventoryItemCommand (Guid id, string comment) { InventoryItemId = id; Comment = comment; } void DeactivateInventoryItem(Guid, string comment) CommandHandler contains no logic, logic is in domain object delegates to domain object public class DeactivateInventoryItemHandler : Handles<DeactivateInventoryItem> { public DeactivateInventoryItemHandler(InventoryItemRepository rep){} void Handle(DeactivateInventoryItem cmd) { var item = repository.GetById(cmd.Id); item....
GregYoung 8 CQRS Class ( https://www.youtube.com/watch?v=whCk1Q87_ZI ) Code snippets from GregYoung 8 CQRS Class - YouTube original Code snippets from GregYoung 8 CQRS Class - YouTube
Course: CQRS in Practice (https://app.pluralsight.com/library/courses/cqrs-in-practice) CQRS & Onion Architecture Map CQRS & Onion Architecture where do C, Q, E belong? Map where do C, Q, E belong? Where to put Command Handlers Map Where to put Command Handlers Command reuse -> domain service Map Command reuse -> domain service Domain Service called for duplicate code Projections Map Choosing projection type A - database triggers...
(https://www.pluralsight.com/courses/clean-architecture-patterns-practices-principles) Layers and modules Map Screaming architecture Map Screaming architecture ~ Functional organisation (packages) Pros & Cons Map Pros & Cons Types of Tests Map The Last Responsible Moment The Last Responsible Moment avoiding premature decisions by deferring the decisions to a point in time where the cost of not making the decision becomes greater than the cost of making the decision (src: [[course-clean-architecture-patterns-practices-and-principles....
Course: Modern Software Architecture: Domain Models, CQRS, and Event Sourcing (https://app.pluralsight.com/library/courses/modern-software-architecture-domain-models-cqrs-event-sourcing) DDD relationships Map DDD relationships Layers Map Layers standard segments concern Business domain layer - invariants Map domain layer - invariants Domain services Map Domain services Infrastructure Map Infrastructure Insight: what do I log/monitor Map Insight: what do I log everything that would be an event in an event-sourced system
Greg Young — A Decade of DDD, CQRS, Event Sourcing ( https://www.youtube.com/watch?v=LDW0QWie21s )
Greg Young - CQRS and Event Sourcing - Code on the Beach 2014 https://www.youtube.com/watch?v=JHGkaShoyNs Notes: test without getters: 3:28:20 / 6:31:00 don’t care about state if I call ‘Deactivate’ twice, I get an exception that’s the invariant VERSIONING Event Versioning: 4:24:22 / 6:31:00 add both methods in aggregate upcasting old to new event When do we need to versionize events? -> when they were written to production dev? just throw away your local event log...
Introducing EventStorming An act of Deliberate Collective Learning (https://leanpub.com/introducing_eventstorming) Preface - 25% About this book Who is this book for Notation Acknowledgments How to read this book Version 1. What does EventStorming look like? - 85% Challenging corporate processes Kicking off a startup Designing a new feature for a web app Quick EventStorming in Avanscoperta A deep dive into problem space 2. A closer look to the problem space - 80% Complexity in a nutshell, or less Organization silos Hierarchy The shape of the problem...
Versioning in an Event Sourced System