ما لا يجب وضعه في البوابة
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
keep the gateway thin.
الموضوعات المخطط لها
- No business rules (pricing, discounts, order validation); they belong in services.
- No data aggregation that grows into a service of its own (see BFF).
- No shared database access, and no per-service special cases that need constant redeploys.
- Keep it stateless and fast; every request pays its cost.
- A gateway that every team must change for each feature becomes a new monolith and a bottleneck.
تفاصيل المخطط المبدئي
عرض عملي
| Concern | Gateway | Service |
|---|---|---|
| TLS, CORS, token validation | yes | no |
| Rate limits, correlation id | yes | no |
| Price calculation | no | yes |
| Order ownership check | no | yes |
اختبر فهمك
Where does "customer may only see their own orders" belong?
أظهر الإجابة
In the orders service.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.