Examples · OOD
10 مشاريع OOD قابلة للتشغيل
10 runnable OOD katas — .NET 8 console projects + xUnit
مش مجرد snippets: كل kata ليها Console project مستقل في فولدر EXAMPLES/OOD، ومعاهم test project موحد بـ xUnit.
01
المشاريع
- Parking Lot — capacity, spot fit, allocation/release.
- Hotel Reservation — date ranges, overlap and atomic in-process reservation.
- Library Management — loans, copy availability, limits and fines.
- ATM — cash planning, balance and idempotency key.
- Elevator — requests, floor movement and door safety.
- Notification Service — channel abstraction and duplicate delivery guard.
- Rate Limiter — thread-safe token bucket and injectable clock.
- Splitwise — exact minor-unit split and deterministic remainder.
- Tic-Tac-Toe — game aggregate and terminal-state rules.
- Document Q&A — retrieval ports and tenant/user ACL filtering.
02
التشغيل
افتح terminal جوه فولدر EXAMPLES/OOD. المتطلبات: .NET 8 SDK، وأول مرة محتاج إنترنت عشان restore لحزم xUnit.
BashRun and test
dotnet run --project ParkingLot/ParkingLot.csproj
dotnet test OodKatas.slnحالة التحقق
المشاريع دي لم يتم عمل build أو test لها في بيئة تجهيز الموسوعة (مفيش .NET SDK هناك). شغّل dotnet test عندك الأول.
03
حدود الأمثلة
الأمثلة تعليمية ومكتملة من ناحية الـ domain flow الأساسي، لكنها in-memory ومش production deployments. ملف README.md جنبها بيشرح الـ trade-offs: database concurrency، outbox، distributed rate limiting، وdocument ACL enforcement.