عرض عملي: طبقة مكافحة إفساد حول API شركة شحن
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
decide whether and how to isolate a carrier integration; prepares SRA-003-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Review the carrier API: statuses, error codes, rate limits, and its change history.
- Name the domain concepts we own: shipment, delivery attempt, delivery exception.
- Design the ACL: a domain-facing interface, a translator, and contract tests against the carrier sandbox.
- Decide the ownership and cost: who maintains it and how a second carrier would plug in.
- Planned mistake: pass carrier status strings straight into domain code. Fix: translate at the boundary and test the mapping, including unknown statuses.
- Record the decision in the context map as a conformist relationship softened by an ACL.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.