Domain-Driven Design (DDD)
DDD was introduced in Eric Evans’ classic book “Domain-Driven Design: Tackling Complexity in the Heart of Software”. It explained a methodology to model a complex business. There is a lot of content in this book, so I'll summarize the basics.
The composition of domain objects:
- Entity: a domain object that has ID and life cycle.
- Value Object: a domain object without ID. It is used to describe the property of Entity.
- Aggregate: a collection of Entities that are bounded together by Aggregate Root (which is also an entity). It is the unit of storage.
The life cycle of domain objects:
- Repository: storing and loading the Aggregate.
- Factory: handling the creation of the Aggregate.
Behavior of domain objects:
- Domain Service: orchestrate multiple Aggregate.
- Domain Event: a description of what has happened to the Aggregate. The publication is made public so others can consume and reconstruct it.
Congratulations on getting this far. Now you know the basics of DDD. If you want to learn more, I highly recommend the book. It might help to simplify the complexity of software modeling.
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/RibM5u7UxP
It’s insane that you can build a project for $0 and scale infinitely for cheap. We’re talking tens of thousands of users for dollars a month
Deployment: @vercel - first 1 MILLION edge requests free, next 1m $0.65
DB: @planetscaledata - mysql for modern devs, $1 per BILLION row reads
Auth: @clerk - 5k free MAUs, $20 per additional 1k users
Logging: @axiomhq will ingest 500gb of logs for free, 5TB for $99/month
Ratelimiting: @upstash $2 per 1 MILLION Redis commands (10k/day for free)
Did I mention the DX is also the best I’ve ever had? Feels good to be AWS free.
🎁Give Away 100 System Design Books🎁
🔹 10 signed physical books (vol1+vol2 +ML, winners get all 3)
🔹 90 1-year ByteByteGo online course
How to participate:
✅ Follow
✅ Like & RT
✅ Subscribe free newsletter: https://t.co/ssb0DDW1rR
⏰ Giveaway ends in 72 hours
Since Zod seems to be all the rage right now, wanted to share a pattern that I've really enjoyed using.
Just create `env.ts` at the base of your app and validate all your environment variables with Zod!
It's basically `env.local.example` on steroids
Today is a huge day for developers. 🤯
- ChatGPT API released (10x cheaper)
- Whisper available in the API
- Overhauled data usage policy
- Focus on stability
And more!
Here’s a quick thread on everything we shipped today @OpenAI 🧵
🎉 We are proud to announce the release of Laravel 10!
Laravel 10 is packed with new and improved features, including:
✔️ Types for the application skeleton and starter kits.
✔️ The Process facade — process management with wonderful DX.
✔️ Laravel Pennant — simplified feature flag package.
Discover all of the exciting details in our release notes. Let's build something amazing!
https://t.co/WbToex7Kls
Laravel Pennant is out, and this is the official logo ✨
Checkout the official documentation for the 1st party feature flag package from @LaravelPHP 🚩
👉 https://t.co/qtOccd3gEd
A key dev team role: Architect.
Duties:
-Foster reuse
-Enforce consistency
-Standardize solutions
-Select technologies and patterns
-Review changes with a holistic view
-Automate time-consuming and redundant tasks
-Consider the long-term implications of key decisions