تخطَّ إلى المحتوى

فن الـ Prompting: UI و Logic

الدرس 5 من 55

الهدف

بعد هالدرس تقدر تكتب prompts محددة للـ UI (ألوان، components، responsive، accessibility) وتقسّم features معقدة لـ 5 prompts تسلسلية بدل prompt وحدة تفشل.

ليش هذا الحين؟

عندك الأدوات. المشكلة الحين: كيف تتكلم معها؟ الـ prompt الغامض = ناتج عشوائي. الـ prompt المحدد = ناتج احترافي. هالدرس يعطيك القواعد.

الفكرة

قانون الـ Prompting:

Vague prompt  →  vague output
Specific prompt → specific output

الـ AI ما يخمّن نيّتك — يطلع اللي تطلبه حرفيا.

لـ UI: 5 قواعد:

  1. Specific style: hex codes، border radius، font weight — مو "nice looking"
  2. Named components: <PricingCard> مو "a card"
  3. Exact colors: #3B82F6 مو "blue"
  4. Responsive hints: "على mobile (< 640px) كذا، على desktop كذا"
  5. Accessibility: "semantic HTML، ARIA labels، focus rings"

لـ Logic: 5 steps:

  1. Schema: عدّل الـ database أولا
  2. UI: أضف الـ interface
  3. Logic: الـ business logic والـ sorting/filtering
  4. Tests: اكتب test cases
  5. Review: تأكد من الأمان والـ edge cases

محتاج مساعدة؟ راسلنا على mj@shakesbeard.net