LIST

Domain Model - Architecture

(I don’t remember the source! If anyone can recognise it, let me know please!) Domain Model - Architecture OO model Aggregate - entities consistent (business rules / invariants) - persistence (one repo per aggregate) - guard access Domain Services Aggregate vs Service Repo <= Domain Service handles persistence for an aggregate Antipattern: Anemic Models

March 16, 2019

EventStore in relational DB

CQRS Documents - by Greg Young Events Column Type Comment AggregateId guid indexed, fk aggregates Data blob Version int unique within aggregate (UserId) guid (Timestamp) (CorrelationId) guid all events point to origin command (SequenceNumber) long auto-incrementingeventstore as queue Aggregates Column Type Comment AggregateId guid indexed, fk aggregates Type varchar fully qualified name Version int denormalized from Events Read event Select * from events where AggregateId =? Order by version Write event...

March 16, 2019

high level CQRS and Event sourcing

high level CQRS and Event sourcing client commands write / domain events read model dtos client

March 16, 2019

original code snippets from GregYoung 8 CQRS Class

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....

March 16, 2019

Course: CQRS in Practice

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...

March 10, 2019

Course: Clean Architecture: Patterns, Practices, and Principles

(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....

March 9, 2019

Course: Modern Software Architecture: Domain Models, CQRS, and Event Sourcing

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

March 9, 2019

Book: Toyota kata

Goal Make production Help others Overstaffed Buffers Learn One piece flow Eg. Solving the speaker wooden plating to make big and small speakers take equally long Vs Help at other workstations Kanban Kanban is used to define successive target conditions on the way to a one by one flow Inventory is reduced in a controlled fashion, and problems can resurface again. “The purpose of kanban is to eliminate the kanban.” “Anytime you start up a pull system, it will crash and burn within a short time....

January 19, 2019

Video: The 4 Key Principles of The 4-Hour Body - Tim Ferriss

(http://fourhourworkweek.com/2011/05/27/the-shortcut-to-the-shortcut-the-4-key-principles-of-the-4-hour-body/) the smallest changes in behaviour that produce the biggest results 4 Principles 1) Minimum Effective Dose less that this -> not desired effects more than thiis -> side effects 2) The extremes inform the mean, not visa-versa solve extreme use cases, and the average will solve themselves 3) tracking + loss aversion > how-to tracking: is a prescription loss aversion: failure proof the change - bets - public accountability...

April 8, 2016

Book: The Richest Man in Babylon

7 remedies for a lean purse 1) save 10% or more 2) budget thyexpenditures -> expenses will grow to equal your earnings neccessaryexpenses <-> desires habits of living desires must go unsatisfied budget with 90% of earnings necessities desires 3) make thy gold multiply: profitable investment 4) guard thy treasures from loss by investing only where: invest -> get familiar with the field thy principle is safe where it may be reclaimed if desirable where you will not fail to collect a fair rental consult thoseexperiencedin handling money for profit...

January 26, 2015