yazanalaboudi.devThe Last Event-Sourced Repository You'll Ever NeedIntroduction In Domain-Driven Design (DDD), repositories play a crucial role—they represent a boundary between the domain model and the underlying infrastructure. But in event-sourced systems, developers often fall into one of two traps: either overs...Apr 5, 2025·6 min read
yazanalaboudi.devAvoid the Variant PropDeveloping great contracts is one of the most crucial parts of software engineering. The components exported from your design system are no exception. In a React application, this means designing thoughtful and opinionated component APIs. Yet, there’...Apr 1, 2025·5 min read
yazanalaboudi.devIn Defence of Typescript EnumsIn the past few years, there’s been a growing trend of criticizing TypeScript’s enum feature. Videos, blog posts, and tweets call for avoiding them entirely, and many developers are now defaulting to union types or const objects instead. And yes—Type...Mar 31, 2025·6 min read
yazanalaboudi.devSharing IDs Across AggregatesIn the world of Domain-Driven Design (DDD), certain principles often feel like ironclad rules—one of which is that every aggregate must have a unique identity. But what if I told you that sharing IDs across aggregates isn’t inherently wrong and, in f...Mar 31, 2025·3 min read
yazanalaboudi.devMisusing the DRY PrincipleI still remember the very first time when the DRY principle was preached to me. "Whenever you find yourself writing duplicate code, always remember DRY. Don't Repeat Yourself" they said. I can only imagine that the majority of us has received this in...Dec 25, 2021·6 min read