Types of Software Products
قبل ما نجمع requirements، لازم نعرف الـ software اللي بنبنيه نوعه ايه. النوع بيحدد كل الخطوات بعد كده.
Software مخصص لـ عميل محدد — بيتبني حسب احتياجاته الفريدة.
مثال: نظام محاسبي لشركة معينة.
Product narrow بيستهدف شركات معينة (clients محددين).
مثال: Salesforce, SAP.
Product / Platform عام للجمهور العريض.
مثال: Word, Uber, Google Docs (cloud-based), WhatsApp.
Pre-Project Activities — قبل ما نبدأ المشروع أصلاً
4 أنشطة لازمة قبل ما نكتب أول سطر كود. كتير من المشاريع بتفشل لإنها بتتخطى الخطوات دي.
Market Analysis: تشوف كيف الناس في دول تانية بتحل المشكلة دي.
- Global Practices: مثال — تبني تطبيق دفع، بص على كينيا (M-Pesa) ومصر (Vodafone Cash).
- Local Practices: الـ landscape المحلي — مثلاً في مصر: mobile wallets, government initiatives.
Gap Analysis: بيحدد الفجوات بين الـ current state والـ desired future state.
افهم مين هم العملاء الـ target:
- Customer Segmentation: مين متأثر؟ (unbanked، أهالي، طلاب جامعة، SMEs، رِيف/مدينة).
- Demographics: العمر، الدخل، التعليم، عادات استخدام الـ tech.
| النوع | السؤال اللي بيجاوب عليه |
|---|---|
| Technical | هل ممكن نبنيه بالـ technology والـ tools والـ skills المتاحة؟ |
| Economic | هل المشروع مربح؟ (Cost vs Revenue, ROI) |
| Legal & Regulatory | هل بيلتزم بالقوانين واللوائح؟ |
| Schedule | هل ممكن نخلصه في الوقت المتاح؟ |
🎯 Project Goals (لازم تكون SMART)
Specific · Measurable · Achievable · Relevant · Time-bound
💎 Value Proposition
ايه اللي بيخليك different عن المنافسين؟
💰 Financial Outlook
- Dev Costs: $150K
- Ongoing: $50K/year (hosting, support, marketing)
- Revenue: $5/month × 20K users = $1.2M/year
Domain Analysis — افهم المجال قبل ما تبني
قبل ما تجمع requirements، لازم تفهم الـ domain اللي شغّال فيه (طب، تعليم، بنوك، إلخ).
العملية اللي بيها الـ software engineer بيتعلم عن الـ domain علشان يفهم المشكلة:
- الـ domain = المجال العام بتاع البيزنس أو الـ tech اللي العميل هيستخدم فيه الـ software.
- الـ domain expert = شخص عنده فهم عميق للـ domain.
✨ فوائد Domain Analysis
⚡ Faster Dev
تطوير أسرع.
🎯 Better System
نظام أحسن.
🚫 No Misunderstanding
تجنب سوء الفهم.
🔮 Anticipate Extensions
توقع التوسعات المستقبلية.
| القسم | المحتوى |
|---|---|
| A. Introduction | خلفية عامة + الغرض من الـ doc |
| B. Glossary | تعريفات للمصطلحات الخاصة بالـ domain (Open event, Fixed event, Recurrent event...) |
| C. General knowledge | قوانين الـ domain العامة |
| D. Customers and users | مين هم الـ clients (organizations) و users (staff, admins...) |
| E. The environment | البيئة المحيطة (HW, SW, network, regulatory) |
| F. Tasks and procedures currently performed | كيف بيشتغلوا دلوقتي بدون الـ software الجديد |
| G. Competing software | المنتجات المنافسة الموجودة |
| H. Similarities to other domains | أي domains تانية شبه ده ممكن نستفيد من خبرتها |
Requirements Engineering Process — 5 مراحل
RE = تعريف، توثيق، وصيانة الـ requirements. 5 مراحل بترتيب: Elicit → Analyze → Specify → Validate → Manage.
أول خطوة. الـ goal: نفهم الـ needs والـ desires والـ constraints من الـ stakeholders. الـ techniques:
- Interviews — مقابلات فردية. اسأل عن الـ details، الـ vision، الـ alternatives، مصادر المعلومات. مش كافي لوحدها.
- Surveys — استبيانات للوصول لعينة كبيرة.
- Workshops / Brainstorming — جلسات جماعية. moderator + trigger question، وكل واحد يكتب إجابة ويمرر للجاي بعده.
- Focus Groups — مجموعات صغيرة لمناقشة عميقة.
- Observation of Users — تشوف الـ users بيشتغلوا في الحياة الحقيقية.
- Prototyping — mockups أو pictures للنظام لتوضيح الفكرة. مش بيعمل computations حقيقية، بس بيوضح الـ UI.
بعد ما جمعنا الـ requirements، نحللها ونتفاوض عليها:
- Identify conflicting requirements.
- Categorize requirements (FR, NFR, etc.).
- Prioritize based on importance (MoSCoW: Must, Should, Could, Won't).
- Address ambiguity.
التوثيق الرسمي. طرق ممكنة:
- Textual (Natural language, User Stories, Use Cases, EARS).
- Models (UML diagrams).
- Formal languages or logic (Z notation, pseudocode).
- Prototypes / mockups (للـ UI).
نتأكد إن الـ requirements بتطابق احتياجات الـ stakeholders الحقيقية:
- Reviews and inspections — مراجعة من فريق خارجي ("4 eyes are better than 2").
- Prototyping — لإظهار الفكرة قبل التنفيذ.
- Simulations / walkthroughs مع الـ stakeholders.
- User feedback.
- Change Management: تتبع وموافقة على التغييرات.
- Traceability: كل requirement بنرجعه لمصدره ولينكه بـ design elements و tests.
- Ambiguity — متطلبات غامضة → سوء فهم.
- Conflicting Requirements — stakeholders عندهم احتياجات متعارضة.
- Incomplete Requirements — متطلبات ناقصة → gaps في الـ functionality.
- Changing Requirements — المتطلبات بتتغير.
- Communication Barriers — لغات/مصطلحات مختلفة بين stakeholders.
Types of Requirements — أنواع المتطلبات
5 أنواع رئيسية. ركز على الفرق بين Functional و Non-functional، وأيضاً Business، Transition، Stakeholder.
بتحدد الـ behavior والـ functions اللي النظام يعملها.
// R1.1
The system must allow users to create
a new account by entering email,
username, and password.
// R1.2
User must be able to log in with
registered credentials and reset
password via email link.
// R3.2
System should calculate and display
shipping costs and taxes before
completing the purchase.
بتوصف كيف النظام بيؤدي وظايفه، مش ايه اللي بيعمله.
| النوع | مثال |
|---|---|
| Performance | Speed, responsiveness |
| Security | Access control, encryption |
| Scalability | Handle 10K concurrent users |
| Usability | User-friendly, accessible |
| Accessibility | ALT text for blind users |
| Compliance | GDPR, HIPAA |
أهداف عالية المستوى من الـ organization. بتعبر عن الـ vision.
مثال: "Develop mobile app to increase customer engagement by 20% in the first year."
عادةً بيكتبها product owners, sponsors, marketing.
متطلبات مؤقتة خاصة بالانتقال من الـ current state للـ future state.
بتشمل: training, data conversion, reformatting, parallel system runs.
بعد التنفيذ، ما تبقاش محتاجة.
احتياجات وتوقعات وقيود الأطراف المختلفة (users, customers, sponsors, regulators).
مثال: "Ambulance drivers should receive audio instructions about next case NOT on screen."
Characteristics of Good Requirements — 5 صفات لازمة
كل requirement لازم يحقق الـ 5 صفات دي. لو ناقص واحدة، بيبقى ضعيف.
بيدي كل المعلومات اللازمة للتنفيذ والاختبار.
تفسير واحد بس، مش مفتوح لتفسيرات متعددة.
ما بيتعارضش مع متطلبات تانية.
ممكن نقيس / نختبر تحققه (fully or partially).
بنرجعه لمصدره ولينكه بـ design و tests.
R1: "System shall allow one-click shopping by clicking purchase button and using stored credit card."
R2: "System should NOT store credit card details after purchase."
الاتنين ما يقدرش يتحققوا في نفس الوقت.
GDPR-001).6 Methods for Specifying Requirements
كل طريقة ليها استخدام مختلف. اللي بيتسأل عليه في الامتحان: User Stories, Use Cases, EARS.
| Method | الخصائص | الاستخدام |
|---|---|---|
| 1. Natural Language | بسيط لكن غامض | للنقاشات الأولية والـ general audience |
| 2. Formal Specs (Z, pseudocode) | دقيق، machine-readable | Critical systems / formal analysis |
| 3. IEEE 830 SRS Template | مفصل ومنظم | المشاريع الكبيرة |
| 4. User Stories | User-centric + acceptance criteria | Agile teams, backlog |
| 5. Use Cases | تفاعل user-system بخطوات | OO design |
| 6. EARS | Structured natural language | متطلبات دقيقة وtestable |
3 أقسام رئيسية:
- Introduction: Purpose, Scope, Definitions, References, Overview
- Overall Description: Product Perspective, Functions, User Characteristics, Constraints, Assumptions
- Specific Requirements: External interfaces, FR, Performance, Design constraints, Quality, Other
Structure ثابت بـ 5 كلمات: When · then · If · then · Else
When a user enters their username and password,
then the system checks the credentials.
If the credentials are valid,
then the user is granted access to the dashboard.
Else the system displays an error message and allows retry.
الـ structure: When <trigger>, then <response>. If <cond>, then <response>. Else <opposite>.
User Stories & INVEST Criteria ⭐
أهم سؤال متكرر في الامتحان. لازم تعرف الـ format والـ INVEST كويس جداً.
As a [user role],
I want [some functionality]
so that [I achieve some benefit / value].
مثال:
As a user,
I want to log into the application
so that I can access my dashboard securely.
Acceptance Criteria:
1. System should accept username & password.
2. System should authenticate credentials.
3. If valid → redirect to dashboard.
4. If invalid → display error message.
User Story + prototype + data dictionary + textual use case + acceptance criteria — كل ده في document واحد.
الميزة: Enhanced team communication — كل اللي محتاجه الـ dev team والـ stakeholders في مكان واحد.
بيشمل:
- Description, Focal point, Other Actors
- Location (path في الـ UI), Pre/Post-conditions
- Main Path table (2-column: Actor Action / System Response)
- Data dictionary (Field name, Type, Validation, Business Rules)
- UI Mockup
Use Cases — تفصيلي
أهم Diagram في الامتحان (Question 2 في كل امتحان فيه use case modeling). 3 خطوات: Actors → Use Cases → Diagram.
- تسلسل الـ actions اللي الـ user بيعملها لإتمام مهمة معينة.
- بيغطي الـ full sequence من البداية للنهاية.
- بيوصف user-system interaction، مش الحسابات الداخلية.
- مكتوب بشكل independent من UI design.
- بس user-computer actions، مش manual أو internal.
الـ Actor = كيان (شخص أو نظام) بيتفاعل مع الـ system. اسأل:
- Who uses / starts / maintains / shuts down the system?
- What other systems use this system?
- Who gets information from / provides information to the system?
بعد ما عرفت الـ actors، اسأل لكل واحد:
- What functions will the actor want?
- Does the system store information? Who CRUDs it?
- Does the actor need to be informed of state changes?
- External events?
عناصر الـ Use Case Diagram:
| العنصر | المعنى |
|---|---|
| Actor (stick figure) | كيان خارجي بيتفاعل مع الـ system |
| Use Case (oval) | وظيفة بيقدر الـ user يعملها |
| System Boundary (rectangle) | حدود الـ system |
| Generalization (solid arrow with open triangle) | Actor/Use case بيرث من أب |
| <<Include>> (dashed arrow) | Use case دايماً بتستخدم use case تانية (مثل Login مع كل use case) |
| <<Extend>> (dashed arrow) | Use case ممكن أحياناً تستخدم use case تانية (شرط معين) |
| # | العنصر | المحتوى |
|---|---|---|
| A ⭐ | Name | اسم قصير ووصفي |
| B | Actors | مين بيعمل الـ use case |
| C | Goals | ايه اللي الـ actor بيحاول يحققه |
| D | Preconditions | حالة النظام قبل الـ use case |
| E | Summary | وصف غير رسمي قصير |
| F | Related use cases | include / extend |
| G ⭐ | Steps | 2-column: Actor Actions / System Responses |
| H | Postconditions | حالة النظام بعد الانتهاء |
- Actor: Clerk
- Goal: Lend a book to a borrower
- Preconditions: User is allowed to borrow
- Postconditions: Item is checked out & recorded on user's borrowing records
| Actor | System |
|---|---|
| 1- Enter user's ID (or scan) | 2- Open user page |
| 3- Choose "borrow an item" | |
| 4- Enter book's barcode & click borrow | 5- Add book to user's records, due date displayed |
Exceptional Flow — User suspended:
| Actor | System |
|---|---|
| 1- Enter/Scan user ID | 2- Open user page (Suspended / Max num reached) |
| 3- Borrow option disabled | |
| 4- Cancel |
Exam Question Bank — Lecture 3
10 أسئلة حقيقية من امتحانات 2021 → 2025 · User Stories, INVEST, SRS, Use Cases, Verifiability
(a) View Grades: "As a student, I can see grades online as soon as they are posted, so I don't have to wait until I go to school."
(b) Upgrade Grades: "As a teacher, I want to enter grades online so I no longer need to fill students' reports by hand."
(c) Monitoring Students' Progress: "As a school manager, I want to monitor the progress of students so I know if the school is doing well or not."
1. Scrum development process must be followed.
2. The system should support the popular mobile platforms now.
3. The game server should be able to handle up to 1000 players simultaneously.
4. The web server should be fast and respond quickly to requests.
- 1 (V) — ممكن نتأكد بمراجعة عملية التطوير.
- 2 (NV) — "popular mobile platforms now" غامض. "popular" ايه معايير؟ "now" يعني امتى؟
- 3 (V) — رقم محدد: 1000 players. اختبار load testing.
- 4 (NV) — "fast and respond quickly" مفيش معيار. كان لازم يكون "response time < 200ms".
1. Scrum development process must be followed.
2. The system should support two mobile platforms: iOS and Android.
3. The game server should handle up to 1000 players.
4. The web server should be fast.
I. The user should be able to update his profile picture with a new one.
II. The system should support 1000 simultaneous users.
III. The system should work in the same way on the most popular web browsers.
IV. The UI should be easy to understand and quick to learn.
- I ✅ واضح — تغيير صورة البروفايل.
- II ✅ واضح — 1000 simultaneous users. رقم محدد.
- III ❌ غامض — "most popular browsers"؟ ايه هم؟ Chrome? Safari? IE6؟
- IV ❌ غامض — "easy to understand" و "quick to learn" مفيش معيار.
1. Stakeholder surveys and user observation
2. Role-playing user scenarios
3. Creating UML diagrams for design
4. Prototyping to clarify concepts
include بيستخدم لما الـ use case الإضافية إلزامية دايماً. هنا مش الحالة. ·
C — extend صح بس على الـ Customer العادي غلط — الـ extra بيدفعه bad credit بس.
Cheat Sheet — مذاكرة سريعة
كل المصطلحات والمعايير والصيغ اللي محتاجها لاتقان الـ requirements engineering.
🎯 INVEST Criteria
✅ Good Requirement = 5 صفات
🔄 RE Process — 5 Stages
📚 Types of Requirements
🎬 Use Case Quick Ref
📝 EARS Method
Rapid Revision
Flashcards · Common Mistakes · What the doctor loves to ask.
🎴 Flashcards
🚨 Common Mistakes
⭐ What Dr. El-Ramly Loves to Ask
- INVEST evaluation — بيدي 3 user stories و يسأل أيهم كويس. السر: الـ vague/high-level بيفشل.
- Verifiable vs Non-verifiable — بيدي 4 requirements و يسأل أيهم verifiable. كلمات زي "fast" دايماً NV.
- نوع الـ requirement — Functional? Transition? Stakeholder? اقرا الكلمات الـ trigger.
- Use Case relations — Include vs Extend. لو في "should pay if/when..." → extend.
- Question 2 (UML Modeling) — كل امتحان فيه سؤال 20 مارك على بناء use case diagram + class diagram لـ system معين (car rental, email server, etc.). ركز على ده!