Lecture Six System Analysis and Design
Lecture Six System Analysis and Design
Software development methodologies provide structured approaches to planning, implementing, and maintaining
software projects. Two of the most widely used methodologies are Waterfall and Agile. Each has its own
principles, processes, advantages, and disadvantages.
1. Requirement Analysis
2. System Design
3. Implementation
4. Integration and Testing
5. Deployment
6. Maintenance
Advantages of Waterfall:
Clear structure and well-defined stages.
Disadvantages of Waterfall:
Agile Methodology
Agile methodology is an iterative and incremental approach to software development. It emphasizes
flexibility, customer collaboration, and frequent delivery of small, functional pieces of the software.
Agile projects are typically organized into short cycles called sprints, usually lasting 2-4 weeks.
2|Page
3|Page
Example: Developing a Mobile App Using Agile
1. Sprint Planning:
o Define the sprint goal and select user stories (features or tasks) from the product
backlog to work on during the sprint. For example, implementing user
authentication and profile management.
2. Sprint Execution:
o Developers and designers collaborate to implement the selected user stories. Daily
stand-up meetings help track progress and address any issues.
3. Review and Retrospective:
o At the end of the sprint, conduct a sprint review where the team demonstrates the
working features to stakeholders. Gather feedback and discuss what went well and
what can be improved in the sprint retrospective.
4. Next Sprint:
o Plan the next sprint based on the feedback and remaining backlog. Continuously
improve the product through successive iterations.
Advantages of Agile:
Disadvantages of Agile:
Waterfall:
4|Page
User Involvement: Low, mainly during requirements and final testing.
Delivery: Single final product delivery.
Agile:
Coding:
Coding, in the context of software development, refers to the process of writing instructions in a
programming language to create software applications, websites, or other digital products. It
involves translating the logical steps of an algorithm or design into a language that a computer
can understand and execute.
Example:
python
# Python code to calculate the factorial of a number
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
result = factorial(5)
print("Factorial of 5:", result)
In this Python example, the factorial function calculates the factorial of a number using
recursion. The function is called with factorial(5), and the result is printed.
2. Coding Techniques:
5|Page
Coding techniques are strategies and best practices used by developers to write high-quality,
efficient, and maintainable code. These techniques encompass various aspects of coding,
including readability, performance optimization, error handling, and code organization.
a. Modularization:
b. Commenting:
Technique: Adding comments within the code to explain its functionality, logic, and
purpose.
Example: # Calculate the factorial of a number before the factorial function declaration
in the previous Python example.
c. Error Handling:
python
try:
result = 10 / 0
except ZeroDivisionError:
print("Error: Division by zero!")
d. Code Reusability:
Technique: Writing code in a way that promotes reuse across different parts of the
application or in future projects.
6|Page
Example: Creating utility functions or libraries for common tasks, such as date
formatting or data validation, that can be reused across multiple modules.
e. Optimization:
f. Version Control:
Technique: Using version control systems (e.g., Git) to track changes to code,
collaborate with other developers, and manage project history.
Example: Committing code changes with meaningful messages and branching for
feature development or bug fixes.
Technique: Writing tests before writing the actual code to ensure that code meets
requirements and behaves as expected.
Example: Writing unit tests using frameworks like unittest in Python to verify the
functionality of individual components.
h. Code Reviews:
Technique: Conducting peer reviews of code to identify issues, provide feedback, and
ensure adherence to coding standards.
Example: Using tools like GitHub Pull Requests for collaborative code reviews before
merging changes into the main codebase.
i. Naming Conventions:
7|Page
Example: Using descriptive names like calculate_factorial instead of cryptic
abbreviations or single-letter variable names.
j. Security Measures:
k. Documentation:
l. Code Refactoring:
Technique: Restructuring and optimizing existing code without changing its external
behavior to improve readability, maintainability, and performance.
Example: Identifying duplicated code blocks and extracting them into reusable functions
or classes.
8|Page
6.2 Testing and Quality Assurance
Testing and Quality Assurance (QA) are critical components of software development, ensuring
that products meet requirements, function as intended, and are reliable and user-friendly. Here's
an overview of testing and QA:
Testing:
Testing is the process of evaluating a system or its components with the intent to find whether it
satisfies the specified requirements or not. There are various types of testing, including:
9|Page
3. Continuous Improvement: Identifying areas for improvement in processes, tools, and
methodologies to enhance overall quality.
4. Training and Skill Development: Providing training to team members to enhance their
skills and knowledge.
5. Risk Management: Identifying and mitigating risks that could impact the quality or
success of the project.
10 | P a g e
3. Changing Requirements: Rapidly changing requirements can make it difficult to keep
testing efforts aligned with project goals.
4. Tool and Technology Selection: Choosing the right tools and technologies for testing
can be daunting due to the wide array of options available.
5. Communication and Collaboration: Effective communication and collaboration among
cross-functional teams are essential for successful testing and QA.
For instance, to test the checkout process, integration tests might include:
Testing whether a registered user can add items to the shopping cart.
Testing whether the selected items are correctly displayed in the checkout page.
Testing whether the payment process is successfully initiated after confirming the order.
In a banking system, integration testing ensures that different modules like account management,
transaction processing, and customer service work together smoothly.
11 | P a g e
Testing whether the account management system updates account details after a
transaction, such as updating the transaction history.
Testing whether customer service tools can access and provide accurate information
about a customer's account status.
For example:
Testing whether user interactions on the mobile app (such as button clicks) trigger the
expected backend processes.
Testing whether data entered by the user in the app's forms is correctly stored in the
database.
Testing whether updates made in the database reflect accurately in the app's UI.
1. Big Bang Integration: All components are integrated simultaneously, and the entire
system is tested as a whole.
2. Top-Down Integration: Testing starts from the top-level modules, with lower-level
modules simulated using stubs or mock objects.
3. Bottom-Up Integration: Testing starts from the lower-level modules, with higher-level
modules simulated using drivers.
4. Incremental Integration: Modules are integrated and tested incrementally until the
entire system is integrated.
12 | P a g e
6.3 SYSTEM DEPLOYMENT
Example: An e-commerce company planning to deploy a new version of their website. They
prepare by setting up a staging server that mirrors the production environment to test the
deployment process.
Example: A software development team compiles their Java application into a WAR file, which
is a package used to deploy web applications on Java application servers.
3. Testing
13 | P a g e
Before deploying to production, it's crucial to test the deployment package in an environment
similar to production.
4. Deployment
Deployment can be done using different strategies depending on the project’s requirements:
Manual Deployment: Involves manually transferring files and configuring settings. It’s
time-consuming and prone to errors but sometimes necessary for smaller projects.
Automated Deployment: Uses scripts and tools to automate the deployment process,
reducing errors and speeding up the process.
Blue-Green Deployment: Running two identical production environments (blue and
green). The new version is deployed to the blue environment while the green
environment continues serving users. After testing, traffic is switched to the blue
environment.
Canary Deployment: Deploying the new version to a small subset of users before rolling
it out to the entire user base.
Example: A financial services company uses an automated deployment tool like Jenkins to
deploy their new trading platform. They initially use a canary deployment strategy to release the
new features to 5% of users, monitoring for any issues before a full rollout.
14 | P a g e
Configuration: Setting up environment-specific settings such as database connections,
API keys, and file paths.
Data Migration: Transferring data from the old system to the new system.
Service Initialization: Starting up the services and ensuring they are running correctly.
Example: An education platform deploys a new learning management system. They configure it
with the correct database connections, migrate data from the old system, and initialize services to
ensure it’s operational.
Once deployed, continuous monitoring and support are essential to ensure the system runs
smoothly:
Monitoring: Using tools to monitor the system’s performance, error logs, and user
activity.
Incident Management: Having a process in place to handle any issues that arise post-
deployment.
User Support: Providing support to users for any issues or questions they have about the
new system.
Example: After deploying a new customer relationship management (CRM) system, a company
uses monitoring tools like New Relic to track system performance and error rates. They also
have a support team ready to assist users with any issues.
Deployment Strategies
Deployment strategies are methods and practices used to release new software or updates into
production environments. These strategies aim to minimize downtime, reduce risk, ensure
smooth transitions, and provide a positive user experience. Here are some common deployment
strategies, each with detailed explanations and examples:
1. Recreate Deployment
15 | P a g e
Description: The recreate strategy involves shutting down the old version of the application
completely before deploying the new version. This method ensures that only one version is
running at any time, but it can cause significant downtime.
Use Case: Suitable for small applications or non-critical systems where downtime is acceptable.
Example: A small blog website might use a recreate deployment strategy, where the site is taken
offline briefly to apply updates and then brought back online.
2. Rolling Deployment
Description: In a rolling deployment, new versions of the application are gradually rolled out to
a subset of servers or instances, replacing the old version incrementally. This approach helps in
reducing downtime and minimizing risks.
Use Case: Ideal for applications with multiple instances, like web services or microservices.
Example: A cloud-based email service might use a rolling deployment strategy, updating one
server at a time. This ensures that the service remains available even during updates, as not all
servers are taken offline simultaneously.
3. Blue-Green Deployment
Use Case: Best for applications where zero downtime and quick rollback capabilities are crucial.
Example: An online banking platform might use blue-green deployment to ensure zero
downtime during updates. Users are switched to the new environment (green) only after
thorough testing, and if issues are detected, traffic can quickly revert to the old environment
(blue).
4. Canary Deployment
16 | P a g e
Description: Canary deployment releases the new version to a small subset of users or servers
initially. This approach allows monitoring of the new version's performance and impact before a
full rollout.
Use Case: Useful for applications where changes need to be tested in a live environment without
affecting all users immediately.
Example: A social media platform might use a canary deployment to release new features to 5%
of its user base. This way, developers can observe how the new features perform and gather user
feedback before making the features available to all users.
Description: A/B testing deployment involves running two different versions of the application
(A and B) simultaneously to different user groups. This strategy is used to compare the
performance and user acceptance of both versions.
Use Case: Effective for applications where user experience and behavior need to be tested and
analyzed.
Example: An e-commerce website might use A/B testing to deploy two different checkout
processes. By analyzing user interactions and conversion rates, the company can determine
which process is more effective.
6. Shadow Deployment
Description: In a shadow deployment, the new version is deployed alongside the old version, but
only receives a copy of the real user traffic. This allows for thorough testing without affecting
the actual user experience.
Use Case: Ideal for testing the new version under real-world conditions without impacting users.
Example: A financial trading platform might use shadow deployment to test a new trading
algorithm. The new version processes real-time data and transactions without influencing the
actual trades, allowing developers to ensure its accuracy and performance.
17 | P a g e
7. Feature Toggles (Feature Flags)
Description: Feature toggles involve deploying new features in the codebase but keeping them
hidden or disabled by default. The features can be toggled on for specific users or groups for
testing and gradually rolled out.
Use Case: Suitable for applications requiring frequent updates and testing of new features
without full deployment.
Example: A software as a service (SaaS) application might use feature toggles to release new
reporting features to beta testers. The feature is integrated into the main codebase but is only
visible and usable by selected users until fully tested.
User training and documentation are crucial components of software deployment and adoption.
They ensure that end users can effectively use the new system and understand its features,
ultimately leading to higher productivity and satisfaction. Here’s a detailed look at user training
and documentation, including best practices and examples:
User Training
Purpose: User training aims to equip users with the necessary knowledge and skills to operate
the software efficiently. Effective training minimizes user frustration, reduces errors, and
maximizes the benefits of the software.
18 | P a g e
they understand how to use the system for patient care.
19 | P a g e
2. E-Learning
o Description: Online courses that users can take at their own pace.
o Advantages: Flexible, cost-effective, and can be accessed anytime, anywhere.
o Example: A software company might provide an e-learning platform with courses
and modules on using their customer relationship management (CRM) software,
allowing sales teams to learn at their convenience.
3. Workshops and Hands-On Training
o Description: Interactive sessions where users can practice using the software in a
controlled environment.
o Advantages: Practical, provides hands-on experience, and immediate feedback.
o Example: A manufacturing company introducing a new inventory management
system might hold workshops where employees can practice using the system to
manage stock levels and track orders.
4. Webinars
o Description: Online seminars or presentations that can be live or recorded.
o Advantages: Reach a large audience, can be recorded for future reference, and
cost-effective.
o Example: A financial services firm might host webinars to train employees on
new compliance software, with sessions recorded for those who cannot attend
live.
5. One-on-One Training
o Description: Personalized training sessions tailored to individual user needs.
o Advantages: Highly customized, allows for in-depth learning, and direct support.
o Example: A new hire at a tech company might receive one-on-one training on the
company’s proprietary software, ensuring they understand how to use it
effectively in their role.
Understand User Needs: Tailor the training content to the specific needs and skill levels
of the users.
Interactive Content: Incorporate hands-on activities, simulations, and Q&A sessions to
engage users.
20 | P a g e
Feedback Mechanism: Allow users to provide feedback on the training to continually
improve the process.
Follow-Up Support: Offer ongoing support and refresher courses to reinforce learning.
Documentation
Purpose: Documentation provides users with reference materials that explain how to use the
software, troubleshoot issues, and understand the system's functionalities. It serves as a long-
term resource for users to refer to when needed.
Types of Documentation
1. User Manuals
o Description: Comprehensive guides that cover all aspects of using the software.
o Content: Installation instructions, feature descriptions, step-by-step usage
instructions, and troubleshooting tips.
o Example: A user manual for a project management tool might include sections on
creating projects, assigning tasks, tracking progress, and generating reports.
2. Quick Start Guides
o Description: Concise documents that help users get started with the software
quickly.
o Content: Basic setup instructions, key features, and initial configuration steps.
o Example: A quick start guide for a new email client might include steps for
setting up email accounts, sending emails, and organizing the inbox.
3. FAQs and Knowledge Bases
o Description: Collections of frequently asked questions and their answers, along
with a searchable database of articles.
o Content: Common user questions, troubleshooting steps, and best practices.
o Example: A knowledge base for an e-commerce platform might include articles
on managing product listings, processing orders, and handling customer inquiries.
4. Online Help Systems
o Description: Integrated help systems within the software that provide context-
sensitive assistance.
o Content: Tooltips, help buttons, and searchable help topics.
21 | P a g e
o Example: An accounting software might have an online help system that offers
explanations and tips when users hover over specific fields or options.
5. Video Tutorials
o Description: Visual and audio guides that demonstrate how to use the software.
o Content: Step-by-step demonstrations, feature overviews, and common tasks.
o Example: A video tutorial for a graphic design tool might show users how to
create a new project, use various design tools, and export their work.
Clear and Concise: Use simple language and clear instructions to make the
documentation easy to understand.
Well-Organized: Structure the documentation logically with a clear table of contents and
index for easy navigation.
Visual Aids: Include screenshots, diagrams, and videos to complement the text and
enhance understanding.
Regular Updates: Keep the documentation up-to-date with the latest software features
and changes.
Accessible Formats: Provide documentation in multiple formats (PDF, web-based,
mobile-friendly) to accommodate different user preferences.
22 | P a g e
6.4 SYSTEM MAINTENANCE
System maintenance refers to the activities involved in ensuring that a software system remains
functional, reliable, and up-to-date after it has been deployed. Maintenance is crucial for the
longevity and performance of any system, addressing issues that arise and adapting the system to
changing requirements. Here’s a detailed explanation of system maintenance, including its types,
processes, and best practices:
Maintenance Processes
23 | P a g e
1. Issue Tracking and Management
o Description: Using tools to log, track, and manage issues reported by users or
identified during monitoring.
o Example: Using a system like Jira or GitHub Issues to track bugs, feature
requests, and improvements.
2. Diagnosis and Analysis
o Description: Investigating reported issues to understand their root causes and
determine appropriate solutions.
o Example: Conducting a code review or using debugging tools to identify why a
particular feature is not working as expected.
3. Implementation of Changes
o Description: Developing and deploying fixes, updates, or new features to address
identified issues or enhancements.
o Example: Writing and testing new code, followed by deploying the update to the
production environment.
4. Testing and Validation
o Description: Ensuring that the changes made do not introduce new issues and that
they resolve the original problem.
o Example: Running unit tests, integration tests, and user acceptance tests (UAT)
on the updated software to validate the changes.
5. Release Management
o Description: Managing the deployment of updates and changes to the production
environment in a controlled and systematic manner.
o Example: Using deployment strategies like rolling updates or blue-green
deployments to minimize disruption during the release of new updates.
6. Documentation Updates
o Description: Keeping user manuals, help files, and system documentation current
with the latest changes.
o Example: Updating the user guide to include new features or changes made to
existing functionalities.
7. Monitoring and Feedback
o Description: Continuously monitoring the system for performance, reliability,
and user feedback to identify areas for further improvement.
24 | P a g e
o Example: Using monitoring tools like New Relic or Datadog to track system
performance metrics and error rates, and collecting user feedback through surveys
or support tickets.
Software Updates
Software updates are crucial for maintaining the security, functionality, and performance of
software applications. These updates can range from minor patches to major version upgrades
and typically address bug fixes, security vulnerabilities, and feature enhancements.
25 | P a g e
Types of Software Updates
1. Patch Updates
o Purpose: Fix specific bugs or vulnerabilities without introducing new features.
o Example: A security patch that addresses a recently discovered vulnerability in a
web browser.
2. Minor Updates
o Purpose: Include bug fixes, small feature enhancements, and performance
improvements.
o Example: A minor update to a mobile app that improves battery efficiency and
adds a couple of new functionalities.
3. Major Updates
o Purpose: Introduce significant new features, redesigns, and improvements.
o Example: A major update to an operating system that includes a new user
interface, enhanced security features, and numerous new applications.
26 | P a g e
o Implement automated update systems to ensure users receive updates without
manual intervention.
o Example: Automatic updates for antivirus software to ensure users are protected
from the latest threats.
5. Rollback Mechanism
o Have a rollback mechanism in place to revert to a previous version if an update
causes significant issues.
o Example: A backup and restore feature in cloud services allowing users to revert
to an earlier state.
Version Control
Version control is a system that manages changes to software code, allowing multiple developers
to collaborate efficiently and track the history of changes. It is an essential tool in modern
software development, ensuring consistency and enabling team collaboration.
1. Repository
o A storage location for software code and its revision history.
o Example: A Git repository hosted on GitHub containing the codebase for a web
application.
2. Commit
o A snapshot of changes made to the codebase at a specific point in time.
27 | P a g e
o Example: A commit that adds a new feature or fixes a bug in the application.
3. Branch
o A parallel version of the codebase, allowing for the development of features,
fixes, or experiments independently from the main codebase.
o Example: A feature branch for developing a new login module while the main
branch remains stable.
4. Merge
o The process of integrating changes from one branch into another.
o Example: Merging a feature branch into the main branch after the new feature
has been completed and tested.
5. Pull Request (PR)
o A request to merge changes from one branch into another, often accompanied by
a code review process.
o Example: A developer submits a pull request to merge the new authentication
feature into the main branch.
6. Conflict Resolution
o Addressing conflicts that arise when different changes to the same part of the
codebase are made in parallel branches.
o Example: Manually resolving conflicts when two developers have modified the
same function in different branches.
1. Frequent Commits
o Commit changes frequently with meaningful messages to keep the revision
history detailed and manageable.
o Example: Commit each small feature or bug fix separately with descriptive
messages.
2. Branching Strategy
o Use a clear branching strategy to manage development, such as GitFlow or trunk-
based development.
o Example: Using feature branches for new features, a develop branch for
integration, and a main branch for stable releases.
28 | P a g e
3. Code Reviews
29 | P a g e
o Implement code reviews to ensure code quality and share knowledge
among team members.
o Example: Reviewing pull requests before merging to the main branch.
4. Continuous Integration (CI)
o Use CI tools to automatically test and build the codebase with
each commit, ensuring that changes do not break the application.
o Example: Using Jenkins or GitHub Actions to run tests and build the
application on each commit.
5. Tagging and Versioning
o Use tags to mark specific points in the history as important releases or
milestones.
o Example: Tagging commits with version numbers like v1.0.0 for major
releases.
Recommended Textbooks: