انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-018-L02

تصميم عناوين URL

  • الدرس 2 من 6
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

write URLs that are predictable.

الموضوعات المخطط لها

  • Use plural nouns for collections: /products, /categories.
  • Identify one item by its ID: /products/5.
  • Nest only one or two levels: /categories/3/products is fine; deeper is hard to use.
  • Lowercase, hyphens for words (/order-items), no trailing slash, no file extensions.
  • Filters, sorting, and paging go in the query string: /products?category=3&sort=price.
تفاصيل المخطط المبدئي

عرض عملي

text
GET    /products           list
POST   /products           create
GET    /products/5         read
PUT    /products/5         replace
DELETE /products/5         remove

اختبر فهمك

Where does ?page=2 belong?

أظهر الإجابة

In the query string.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.