Maintenance: Managing the Long Haul الصيانة: إدارة المدى الطويل (Maintenance)

The longest and most expensive phase of the SDLC. Fixing bugs, adding features, and keeping the lights on. أطول مراحل دورة حياة النظام (SDLC) وأكثرها تكلفة. تشمل إصلاح الأخطاء، إضافة الميزات، وضمان استمرارية العمل.

Corrective Maintenance Adaptive Maintenance Perfective Maintenance Preventive Maintenance MTBF

The Process العملية (The Process)

Maintenance typically begins immediately after system installation. It is an iterative process similar to the SDLC itself (Request $\to$ Analyze $\to$ Design $\to$ Implement). تبدأ الصيانة عادة فور تثبيت النظام. وهي عملية تكرارية تشبه الـ SDLC نفسها (طلب $\leftarrow$ تحليل $\leftarrow$ تصميم $\leftarrow$ تنفيذ).


1. Maintenance Request 1. طلب صيانة (Maintenance Request)

2. Transform to Change Request 2. التحويل لطلب تغيير (Change Request)

3. Design & Implement 3. التصميم والتنفيذ (Design & Implement)

4. Release New Version 4. إصدار نسخة جديدة (Release New Version)

Types of Maintenance أنواع الصيانة (Types of Maintenance)

1. Corrective 1. Corrective (التصحيحية)

70% of effort (Historically) 70% من الجهد (تاريخياً)

Repairing defects (bugs). Fixing things that are broken or causing errors. إصلاح العيوب (البرمجية). إصلاح الأشياء المعطلة أو التي تسبب أخطاءً.

2. Adaptive 2. Adaptive (التكيفية)

Changing Environment تغير البيئة

Modifying the system to adapt to changes in the environment (e.g., New OS version, New Tax Laws). تعديل النظام للتكيف مع التغيرات في البيئة (مثل: إصدار جديد لنظام التشغيل، قوانين ضريبية جديدة).

3. Perfective 3. Perfective (التحسينية)

Value Add إضافة قيمة

Evolving the system to add new features or improve performance. Makes the system "better". تطوير النظام لإضافة ميزات جديدة أو تحسين الأداء. تهدف لجعل النظام "أفضل".

4. Preventive 4. Preventive (الوقائية)

Future Proof حماية المستقبل

Changes made to avoid future problems (e.g., Refactoring code, optimizing DB index before it gets slow). تغييرات تُجرى لتجنب المشاكل المستقبلية (مثل: إعادة هيكلة الكود Refactoring، أو تحسين فهارس قواعد البيانات قبل أن تتباطأ).

Managing Maintenance إدارة الصيانة (Managing Maintenance)

What Drives Cost? ما الذي يحرك التكلفة؟

  • Latent Defects:العيوب الكامنة: Unknown bugs.أخطاء غير معروفة.
  • Number of Customers:عدد العملاء: More users = more requests.مستخدمون أكثر = طلبات أكثر.
  • Documentation Quality:جودة التوثيق: Poor docs = slower fixes.توثيق ضعيف = إصلاحات أبطأ.
  • Personnel:الأفراد: Staff turnover kills knowledge.دوران الموظفين يقضي على المعرفة بالنظام.

Key Metrics المقاييس الرئيسية (Key Metrics)

MTBF (Mean Time Between Failures)

Measure of reliability. Higher is better. مقياس للموثوقية. الأعلى هو الأفضل.

MTTR (Mean Time To Repair)

Measure of maintainability. Lower is better. مقياس لقابلية الصيانة. الأقل هو الأفضل.

Website Maintenance صيانة مواقع الويب

Websites require 24/7 availability ("The store never closes"). Maintenance is often continuous. تتطلب المواقع توافراً على مدار الساعة ("المتجر لا يغلق أبداً"). الصيانة غالباً ما تكون مستمرة.

Broken Links Must perform periodic checks using automated tools (e.g., LinkAlarm). يجب إجراء فحوصات دورية باستخدام أدوات آلية (مثل: LinkAlarm).
Re-registration Update search engines when content changes significantly. تحديث محركات البحث عند تغير المحتوى بشكل كبير.
Future Editions Avoid confusing frequent visitors with constant drastic UI changes. تجنب إرباك الزوار الدائمين بتغييرات جذرية مستمرة للواجهة.

The Exam Vault خزنة الاختبار

Professor's Secrets & Trap Avoidance أسرار البروفيسور وتجنب الفخاخ

TRAP: Maintenance Cost فخ: تكلفة الصيانة

"Is Implementation the most expensive phase?"
NO. Maintenance is. It accounts for 60-80% of the total lifecycle cost of a system.
"هل مرحلة التنفيذ هي الأغلى؟"
لا. الصيانة هي الأغلى. فهي تمثل 60-80% من إجمالي تكلفة دورة حياة النظام.

TRAP: Corrective vs Adaptive فخ: Corrective مقابل Adaptive

Corrective: Fixing a bug (e.g., "The calculation is wrong"). Adaptive: Reacting to environment (e.g., "The government changed the tax rate to 15%"). The system wasn't "broken", the world changed. Corrective: إصلاح خطأ (مثل: "الحساب خاطئ"). Adaptive: التفاعل مع البيئة (مثل: "غيرت الحكومة معدل الضريبة إلى 15%"). النظام لم يكن "معطلاً"، بل العالم هو الذي تغير.

SECRET: Separate Teams سر: فرق العمل المنفصلة

Many organizations have a separate Maintenance Group vs. Development Group. Pros: Formal transfer of ownership. Cons: Maintenance team lacks the original knowledge. العديد من المنظمات تمتلك Maintenance Group منفصلة عن الـ Development Group. الإيجابيات: نقل رسمي للملكية. السلبيات: فريق الصيانة يفتقر للمعرفة الأصلية بالتصميم.

KEY CONCEPT: Configuration Management مفهوم مفتاحي: إدارة التهيئة (Configuration Management)

You must control access to the code library. If two programmers check out the same file and modify it, one's changes might overwrite the other's (The "Lost Update" problem). Tools like Git prevent this. يجب عليك التحكم في الوصول لمكتبة الكود. إذا قام مبرمجان بسحب نفس الملف وتعديله، فقد تمحو تغييرات أحدهما تغييرات الآخر (مشكلة "التحديث المفقود - Lost Update"). أدوات مثل Git تمنع ذلك.