Sunday, April 20, 2025

Software Engineering notes UNIT V

Software maintenance: maintenance as part of software evaluation, reasons for maintenance, types of maintenance (perceptive, adoptive, corrective), designing for maintainability, techniques for maintenance.

===========================================================

1. Maintenance as Part of Software Evaluation


 What is Software Maintenance?

Software maintenance refers to the process of modifying a software product after delivery to correct faults, improve performance, or adapt it to a changed environment.


 What is Software Evaluation?

Software evaluation is the continuous assessment of a software system to ensure it still meets the required performance, functionality, and user needs over time.


 Maintenance as a Part of Evaluation:

  • Once software is deployed, it enters the maintenance phase of the software life cycle.

  • Evaluation is performed regularly to detect problems, assess performance, and identify areas for improvement.

  • If any issue or opportunity is found during evaluation, it triggers maintenance.


2. Reasons for Software Maintenance


Software maintenance becomes necessary due to various technical, business, and user-driven factors. Understanding these reasons helps in planning and budgeting for long-term software support.


Main Reasons for Maintenance:


1. Correcting Errors (Bug Fixing):

  • No software is 100% bug-free.

  • Errors found after deployment must be corrected — logic errors, runtime errors, incorrect outputs, etc.

Example: A banking app miscalculates interest due to a logic bug — needs maintenance.


2. Adapting to New Environment:

  • Software must adjust to changes in operating systems, hardware, networks, browsers, etc.

  • These changes often break compatibility.

Example: A desktop app must be updated to run on Windows 11.


3. Enhancing Performance or Functionality:

  • Improve speed, memory usage, or add new user-requested features.

  • Makes the software more efficient and user-friendly.

Example: Adding a dark mode or faster search option in an app.


4. Preventive Measures:

  • Making code more secure or maintainable before problems arise.

  • Includes refactoring, code optimization, documentation updates.

Example: Rewriting old code to follow modern standards.


5. Legal or Policy Changes:

  • Software might require changes due to new regulations or compliance laws.

Example: Updating a financial app to follow new tax rules.


  3. Types of Software Maintenance


Software maintenance is categorized based on purpose and intent. There are mainly three types:


 1. Corrective Maintenance

Definition:
Fixing bugs, errors, and faults found in the software after deployment.

 Includes:

  • Logic errors

  • Syntax errors

  • Incorrect outputs

  • Runtime failures

Example: Fixing a crash in an e-commerce app when a user applies a coupon.


 2. Adaptive Maintenance

Definition:
Modifying software so that it remains compatible with changing environments like:

  • New OS versions

  • New hardware

  • New third-party tools or libraries

Example: Updating a mobile app to work with the latest Android or iOS version.


 3. Perfective Maintenance

Definition:
Improving or enhancing the software’s performance, usability, or adding new features based on user feedback or future needs.

 Includes:

  • UI/UX improvements

  • Speed enhancements

  • Adding new functionalities

Example: Adding multi-language support in an app.


Note: Some books or references may also include Preventive Maintenance, which is done to improve maintainability and avoid problems in the future.


 4. Designing for Maintainability


 What is Maintainability?

Maintainability is the ease with which a software system can be:

  • Modified to fix faults

  • Improve performance or features

  • Adapt to a new environment

Designing with maintainability in mind means the software is structured in a way that future changes can be made quickly, safely, and with minimal effort.


 Key Principles for Designing Maintainable Software:


1. Modularity

  • Break down the system into independent modules.

  • Each module handles one specific task or functionality.

  • Easier to locate, fix, and update individual modules.

Example: Separate module for user authentication.


2. Clear Coding Standards

  • Use consistent naming, indentation, comments, etc.

  • Makes the code readable and understandable by others (or by you in the future!).



3. Proper Documentation

  • Document code, design decisions, module responsibilities.

  • Helps new developers understand the system quickly.

Include: README files, inline comments, architecture diagrams.


4. Low Coupling and High Cohesion

  • Low Coupling: Modules are independent and don’t heavily rely on each other.

  • High Cohesion: Each module has a well-defined, focused purpose.

Result: Easier to make changes in one module without affecting others.


5. Use of Design Patterns

  • Reusable solutions to common design problems.

  • Helps in writing clean, flexible, and extensible code.

Example: MVC (Model-View-Controller) for UI applications.


6. Version Control and Change Tracking

  • Maintain history of changes (e.g., using Git).

  • Helps in debugging, rolling back issues, and collaborative development.


5. Techniques for Software Maintenance


Software maintenance is not just about making changes—it involves strategies and tools to ensure changes are made safely, efficiently, and correctly. Below are the key techniques used during maintenance:


 1. Impact Analysis

  • Study of how a proposed change will affect other parts of the system.

  • Prevents unintended side effects or breaking other features.

Example: Changing the login module—check if it affects the user session, dashboard, or logout process.


 2. Reverse Engineering

  • Process of understanding existing software when documentation is missing or poor.

  • Converts code into design models, flowcharts, etc.

Helpful when: Old systems have to be updated but no one knows how they work.


3. Code Refactoring

  • Improving internal code structure without changing its external behavior.

  • Makes code cleaner, more efficient, and easier to maintain.

Example: Replacing duplicate code with a reusable function.


 4. Regression Testing

  • Testing the system to ensure new changes have not broken existing functionality.

  • Usually automated and part of every maintenance cycle.

Example: After fixing a bug in the checkout process, re-test the entire payment module.


 5. Re-engineering

  • Rebuilding or re-writing the system using modern technologies or better design.

  • More extensive than refactoring—may involve migrating platforms or languages.

Example: Migrating an old desktop app to a cloud-based web application.


 6. Configuration Management

  • Keeps track of all changes made to the software, including versions, modules, and documentation.

  • Ensures the team always works on the latest, correct version.

Tool Example: Git, SVN


 7. Monitoring and Feedback Collection

  • Using logs, crash reports, user feedback, or analytics to understand how the system performs post-deployment.

  • Helps decide where maintenance is required next.



0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home