الواجهة الخلفية للواجهة الأمامية (Backend for Frontend)
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
explain BFF and when to use it.
الموضوعات المخطط لها
- A backend for frontend (BFF) is an API tailored to one client type (web, mobile, partner).
- It aggregates and reshapes data so each client makes fewer calls and gets the right payload.
- Each BFF is owned by the team of its client, so it can change with the UI.
- It is not the generic gateway: the gateway handles edge concerns; the BFF handles presentation needs.
- Avoid duplicating business logic across BFFs; call services for it.
تفاصيل المخطط المبدئي
عرض عملي
diagram: web app → web BFF, mobile app → mobile BFF, both behind the gateway, both calling the services.
اختبر فهمك
What problem does a BFF solve?
أظهر الإجابة
Different clients need different shapes of data without bloating one generic API.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.