طبقات مكافحة الإفساد (Anti-Corruption Layers)
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
protect a clean model from a legacy or third-party model.
الموضوعات المخطط لها
- An anti-corruption layer (ACL) translates between the foreign model and your own at the boundary.
- It isolates vendor naming, quirks, and failures so they do not spread.
- Use it when the external model is poor, volatile, or hard to replace.
- It costs code and a team's attention; skip it when the external model fits well.
تفاصيل المخطط المبدئي
عرض عملي
a layout: domain code calls a CarrierGateway interface; an adapter maps carrier statuses to the domain's ShipmentStatus and handles errors and retries.
اختبر فهمك
When is an ACL not worth building?
أظهر الإجابة
When the external model already fits your domain and is stable.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.