Software Design and DevelopmentUnit 98 min read
Software Maintenance & Evolution: Types, Challenges & Strategies
Unit 9 of Software Design and Development explores the lifecycle beyond deployment—how software is updated, repaired, adapted, and optimized over time. Learn types of maintenance (corrective, adaptive, perfective, preventive), evolutionary processes, reverse engineering, maintenance challenges, and strategies for long-
Key Concepts and Definitions
What is Software Maintenance?
Software maintenance is the modification of a software product after delivery to correct faults, improve performance, or adapt to a changed environment. It is not a one-time activity but an ongoing process that ensures software remains useful, efficient, and relevant.
stateDiagram-v2
[*] --> Idle: Software Deployed
Idle --> Corrective: Fault Reported
Idle --> Adaptive: Environment Change
Idle --> Perfective: Performance Request
Idle --> Preventive: Risk Mitigation
Corrective --> Idle: Fix Applied
Adaptive --> Idle: Update Applied
Perfective --> Idle: Enhancement Applied
Preventive --> Idle: Patch AppliedTypes of Software Maintenance
| Type | Definition | Example (Nepal Context) |
|---|---|---|
| Corrective | Fixing faults or defects in the software. | eSewa app crashes when processing a payment → Developers fix the bug. |
| Adaptive | Modifying software to adapt to changes in the environment (OS, hardware, laws). | Khalti updates to comply with Nepal Rastra Bank’s new digital transaction rules. |
| Perfective | Improving software performance, usability, or functionality. | Daraz adds a "Buy Now, Pay Later" feature to compete with Khalti Pay. |
| Preventive | Preventing future problems (e.g., code refactoring, security patches). | Ncell updates its app to prevent data breaches after a cyberattack threat. |
In the Real World
eSewa (Corrective & Adaptive Maintenance)
- When users report payment failures, eSewa’s team fixes the bug (corrective).
- When Nepal’s tax laws change, eSewa updates its tax calculation logic (adaptive).
Khalti (Perfective & Preventive Maintenance)
- Khalti adds QR code payments (perfective) to improve user experience.
- After a security vulnerability is found, Khalti patches the system (preventive).
NTC (National Telecom) Network Upgrades (Adaptive Maintenance)
- When 5G technology arrives, NTC must update its infrastructure to support new speeds (adaptive).
- If old routers fail, NTC replaces them with faster models (corrective).
Software Evolution
Software evolution refers to the long-term growth and adaptation of software to meet new requirements, technologies, and business needs. It involves:
- Forward Engineering: Building software from scratch (used in initial development).
- Reverse Engineering: Analyzing existing software to understand its structure (used in maintenance).
- Redesign: Restructuring software to improve maintainability.
Reverse Engineering Example: eSewa’s Payment System
Suppose eSewa’s old payment system is hard to modify because its code is poorly documented. The team uses reverse engineering to:
- Decompile the old system to understand its architecture.
- Document key components (e.g., payment gateway, user authentication).
- Redesign the system using modular design for easier future updates.
sequenceDiagram
participant User
participant OldSystem
participant Analyst
participant NewSystem
User->>OldSystem: Reports Bug (e.g., Payment Failure)
OldSystem-->>Analyst: Undocumented Code
Analyst->>Analyst: Reverse Engineer (Decompile, Document)
Analyst->>NewSystem: Redesign with Modular Structure
NewSystem->>User: Fixed & Improved Payment FlowChallenges in Software Maintenance
| Challenge | Description | Example (Nepal) |
|---|---|---|
| High Cost | Maintenance can be expensive (30-80% of total software cost). | Nepal Rastra Bank’s old banking system requires costly updates. |
| Lack of Documentation | Poorly documented code makes changes risky. | Old government software with no user manuals → Hard to fix. |
| Unpredictable Changes | Business needs change frequently, making planning difficult. | NEPSE (stock exchange) software must update for new trading rules daily. |
| Legacy System Constraints | Old systems may not support new technologies. | NTC’s old billing system cannot integrate with AI-based fraud detection. |
| Security Risks | Older software may have vulnerabilities. | Khalti’s early versions had SQL injection risks that needed urgent fixes. |
Maintenance Strategies for Long-Term Success
| Strategy | Description | Example (Nepal) |
|---|---|---|
| Modular Design | Breaking software into independent modules for easier updates. | Daraz’s checkout system is separate from inventory → Easy to update. |
| Automated Testing | Using CI/CD pipelines to catch bugs early. | Khalti uses automated tests before every app update. |
| Version Control (Git) | Tracking changes to roll back if needed. | eSewa uses Git to manage updates without breaking existing features. |
| User Feedback Loops | Collecting real-user data to prioritize fixes. | Pathao surveys drivers to find app glitches. |
| Regular Refactoring | Cleaning up code to improve maintainability. | Ncell refactors old billing code to use cloud services. |
Worked Example: NTC’s Network Maintenance
Scenario: NTC’s old fiber-optic network is slow and unreliable in Kathmandu. The team must decide how to maintain it.
Step 1: Identify Maintenance Type
- Corrective: Fix current failures (e.g., broken cables).
- Perfective: Upgrade bandwidth for faster speeds.
- Adaptive: Integrate with 5G for future compatibility.
- Preventive: Replace old routers before they fail.
Step 2: Choose a Strategy
- Modular Upgrade: Replace only faulty routers first (cost-effective).
- Full Redesign: Migrate to a new fiber network (expensive but future-proof).
Step 3: Implement & Test
- Phase 1: Fix critical failures (corrective).
- Phase 2: Upgrade bandwidth (perfective).
- Phase 3: Test with 5G-ready hardware (adaptive).
flowchart TD
A["Old Network"] -->|"Corrective"| B["Fix Broken Cables"]
A -->|"Perfective"| C["Upgrade Bandwidth"]
A -->|"Adaptive"| D["5G Integration"]
A -->|"Preventive"| E["Replace Routers"]
B --> F["Stable Network"]
C --> F
D --> F
E --> F
F --> G["Future-Proof Network"]Exam Tip
- Define Clearly: Always distinguish between maintenance types (corrective vs. adaptive vs. perfective).
- Real-World Links: Exams often ask for Nepali examples (e.g., eSewa, Khalti, NTC). Relate theory to these.
- Diagrams Matter: Draw state diagrams for maintenance workflows or sequence diagrams for reverse engineering.
- Challenges vs. Strategies: Compare problems (high cost, poor docs) with solutions (modular design, Git).
- Worked Examples: If asked to design a maintenance plan, follow:
- Identify type (corrective/adaptive/perfective).
- Choose strategy (modular, automated testing).
- Show steps (e.g., "Phase 1: Fix bugs, Phase 2: Add features").
Based on the TU BIM syllabus for Software Design and Development (IT242), unit 9.
Discussion
Loading…