Software Engineering Methodologies Overview
Software Engineering Methodologies Overview
• The Software Development Life Cycle (SDLC) is a process used by software development
teams to design, develop, test, and deploy high-quality software.
• The taxonomy of SDLC can be organized into several phases, each serving a specific
purpose.
1. Planning: Define project goals, scope, and timelines. Assess resources and conduct risk
analysis. Develop a comprehensive project plan outlining tasks and responsibilities.
2. Analysis: Gather and document user requirements through interviews and analysis.
Validate and prioritize requirements to ensure alignment with project goals. Create
detailed documentation to guide the development process.
3. Design: Develop a system architecture outlining key components and their interactions.
Create detailed design specifications for individual modules. Define data structures,
algorithms, and interfaces.
5. Testing: Execute unit tests to validate individual components. Integrate modules and
perform integration testing to identify and rectify issues. Conduct system testing to
ensure the software meets specified requirements.
6. Deployment: Release software for use by installing and configuring it in the target
environment. Monitor deployment for any issues and provide necessary support. Ensure
compatibility and proper functioning.
7. Maintenance: Address and resolve reported bugs promptly. Implement updates and
enhancements based on changing requirements. Continuously monitor and optimize the
software for improved performance.
WATERFALL MODEL
• The Waterfall model is a linear and sequential approach to software development, where
progress is seen as flowing steadily through distinct phases.
• The waterfall model is useful in situations where the project requirements are well-defined
and the project goals are clear. It is often used for large-scale projects with long timelines.
• Here are the phases of the Waterfall model:
1. Requirements: Define project goals and gather comprehensive requirements.
2. Design: Develop system architecture and detailed component designs.
3. Implementation: Translate designs into executable code using chosen programming
languages.
4. Testing: Validate software through sequential unit, integration, and system testing.
5. Deployment: Release and install fully developed software in the target environment.
6. Maintenance: Address bugs, implement updates, and provide ongoing support.
• Key Characteristics:
o Each phase must be completed before moving to the next, resembling a waterfall's
downward flow.
o The process is document-centric, with extensive documentation created at each phase.
o Changes are challenging to accommodate once the project moves beyond the
requirements phase.
o Well-suited for projects with well-defined and stable requirements.
• Advantages:
o Clear documentation and well-defined phases.
o Easy to understand and use.
• Disadvantages:
o Limited flexibility to accommodate changes.
o Client sees the product only after the final implementation phase.
o Risk of project delays if requirements are not accurately gathered initially.
SPIRAL MODEL
• The Spiral Model is a flexible and iterative approach to software development that combines
elements of both the waterfall model and prototyping.
• It is based on the idea of a spiral, with each iteration of the spiral representing a complete
software development cycle, from requirements gathering and analysis to design,
implementation, testing, and maintenance.
• It provides support for Risk Handling.
• Here are the phases of the Spiral Model:
PROTOTYPE MODEL
• The Prototype Model is an iterative software development model that involves creating a
partial or complete working model of the system during the early stages of the project.
• In this model, a prototype of the end product is first developed, tested, and refined as per
customer feedback repeatedly till a final acceptable prototype is achieved which forms the
basis for developing the final product.
• Here are the phases of the Prototype Model:
AGILE MODEL
• The Agile Model is an iterative and flexible approach to software development that
prioritizes adaptability and customer satisfaction by rapid delivery of working software
product.
• The main aim of the Agile model is to facilitate quick project completion.
• Agile Methods break the product into small incremental builds. These builds are provided in
iterations.
• The Agile model consists of the following phases:
1. Requirements Gathering: Define project requirements, assess feasibility, and plan
resources.
2. Design the Requirements: Collaborate with stakeholders to detail requirements using
diagrams like user flow or high-level UML.
3. Development: Development begins based on defined requirements, aiming for a
working product with minimal functionality.
4. Testing/Quality Assurance: Quality Assurance examines the product for performance
and identifies bugs.
5. Deployment: Release the product to the user environment.
6. Feedback: Gather and incorporate feedback from users to improve the product.
• Key Characteristics:
o Emphasizes incremental development with regular, short-term goals (sprints).
o Customer feedback is prioritized, allowing for quick adjustments to changing
requirements.
o Cross-functional teams collaborate closely throughout the development process.
o Adaptable to changes in project scope and requirements.
• Advantages:
o Customer involvement and feedback lead to customer satisfaction.
o Flexibility to accommodate changing requirements.
• Disadvantages:
o Requires active and consistent participation from all team members.
o Initial learning curve for teams new to the Agile methodology.
TSP [TEAM SOFTWARE PROCESS]
• TSP, or Team Software Process, is a framework for software process improvement that
focuses on enhancing the effectiveness of software development teams.
• TSP builds on the principles of the Personal Software Process (PSP) and extends them to the
team level.
• TSP is designed to help teams organize projects and produce software.
• It focuses on disciplined processes, measurement, and continuous improvement.
• The goal is to create a high-performance team that consistently delivers high-quality
software on time and within budget.
• Key features of TSP include:
1. Structured Process: TSP defines a structured process that teams follow for planning,
tracking, and managing their work.
2. Team Planning: Teams use TSP to plan their projects, considering resources,
schedules, and quality goals.
3. Incremental Development: Like other process improvement models, TSP promotes
incremental and iterative development.
4. Metrics and Measurement: TSP emphasizes the use of metrics to measure and track
the progress of the team and the quality of the software being developed.
5. Risk Management: TSP incorporates risk management practices, helping teams
identify and address potential issues early in the development process.
6. Formal Inspections: Formal inspections of work products are conducted to ensure
quality and identify defects.
EXTREME PROGRAMMING
SCRUM
• Scrum is an Agile framework for managing and developing complex products. It emphasizes
collaboration, adaptability, and iterative progress.
• Scrum is based on incremental development, consisting of a series of sprints lasting from
two to four weeks in length. During each sprint, the goal is to focus on the highest-value
features, ideally ending up with a deliverable product. Between sprints, the development
team meets with stakeholders and customers for feedback. This feedback is incorporated into
the planning process for the next sprint.
• Key Scrum roles and terms include:
1. Product Backlog: A dynamic list of features, enhancements, and fixes prioritized by
the product owner. It represents the work that needs to be done on a project.
2. Increment: The sum of all completed product backlog items at the end of a sprint. It
is a potentially shippable product version that adds value to the existing product.
3. ScrumMaster: A facilitator and servant-leader for the Scrum team. The ScrumMaster
helps the team understand and follow Scrum practices, removing obstacles to
maximize efficiency.
4. Sprint: A time-boxed iteration, typically two to four weeks long, during which the
Scrum team works on a set of prioritized product backlog items. It results in a
potentially shippable increment.
5. Velocity: A metric measuring the amount of work a Scrum team can complete in a
sprint. It helps in estimating future capacity and improving planning accuracy.
• Advantages of Scrum:
o Adaptability: Flexibility for changing requirements.
o Transparency: Clear communication and visibility.
o Customer Satisfaction: Continuous delivery aligns with customer expectations.
• Disadvantages of Scrum:
o Learning Curve: Initial challenges for teams new to Scrum.
o Overemphasis on Meetings: Potential time consumption.
o Not Suitable for All Projects: May not fit well with highly stable requirements.
REQUIREMENTS
• Understanding requirements involves analyzing and defining the needs, constraints, and
expectations of a system or product. It's a crucial phase to ensure that the developed solution
meets stakeholders' objectives.
o Functional and Non-Functional Requirements
o User and System Requirements
o Requirements Elicitation
o Requirements Specification
• Functional Requirements: Specify what the system must do. For example, in an e-commerce
system, functional requirements might include user registration, product browsing, and
checkout functionalities.
• Non-Functional Requirements: Define the characteristics of the system, such as
performance, reliability, and security. These requirements focus on "how" the system should
behave.
Functional Requirements Non-Functional Requirements
A functional requirement defines a system or A non-functional requirement defines the
its component. quality attribute of a software system.
Functional requirement is specified by User. Non-functional requirement is specified by
technical peoples e.g., Architect, Technical
leaders and software developers.
It is mandatory. It is not mandatory.
It is captured in use case. It is captured as a quality attribute.
Defined at a component level. Applied to a system as a whole.
Helps you verify the functionality of the Helps you to verify the performance of the
software. software.
Functional Testing like System, Integration, Non-Functional Testing like Performance,
End to End, API testing, etc. are done. Stress, Usability, Security testing, etc. are
done.
They are easy to define. They are hard to define.
Examples of the functional requirements Examples of the non-functional
are - Authentication of a user on trying requirements are - The background
to log in to the system. color of the screens should be light blue.
Requirements Elicitation:
• User Requirements: Represent the needs of end-users and stakeholders. These requirements
focus on functionalities and experiences that will meet user expectations.
• System Requirements: Define the technical aspects and constraints that the system must
adhere to. These include performance metrics, security protocols, and integration
specifications.
Aspects User Requirements System Requirements
Definition Express needs and expectations from an Specify functionalities, constraints, and
end-user perspective technical details
Focus Emphasizes user experience and high- Focuses on technical and system-level details
level functionalities
Level of Detail Relatively high-level, describing what More detailed, specifying how the system will
users want meet needs
Language Uses user-friendly and non-technical Involves technical terminology and
language specifications
Stability May evolve or change during the project More stable once established, with changes
requiring rigor
Change Control May be subject to more frequent changes Changes typically require careful
consideration and control
Acceptance Used to evaluate if the system meets user Used to assess if the system meets technical
Criteria expectations specifications
Example "The system should provide an intuitive "The system should process transactions at a
user interface." rate of 1000 per second."
Requirements Specification:
• Software design is a critical phase in the software development lifecycle where the
conceptualized system takes shape.
• In this phase, key elements such as actors, use cases, and actions are identified to lay the
foundation for the system's structure and behavior.
• Identifying actors, use cases, and actions is a fundamental step in software design, aligning
the system's functionalities with user needs and setting the stage for the subsequent design
and development activities.
• Actors:
o Definition: Actors are entities that interact with the system, typically external to it.
They can be users, other systems, or external components.
o Identification: Actors are identified by analyzing who or what interacts with the
system to achieve specific goals.
• Use Cases:
o Definition: Use cases represent specific functionalities or features the system must
provide to meet user or system goals.
o Identification: Use cases are identified by understanding the different ways in which
actors interact with the system to achieve specific outcomes.
• Actions:
o Definition: Actions represent the specific operations or tasks performed by actors or
the system within a use case.
o Identification: Actions are identified by breaking down each use case into discrete
steps or operations, defining how the system responds to actor interactions.
• Significance of Identifying Actors, Use Cases, and Actions:
o Clarity in Functionality: Identifying actors, use cases, and actions provides clarity
on the system's functionality by defining who interacts with it, what functionalities are
needed, and how these functionalities are executed.
o User-Centric Design: By understanding actors and their goals, the design process
becomes user-centric, ensuring that the system is tailored to meet the needs and
expectations of its users.
o Basis for Interaction Design: The identification of actions within use cases becomes
the basis for designing the system's interactions, helping in creating intuitive and
efficient user interfaces.
o Foundation for System Architecture: Actors and use cases lay the foundation for the
system's architecture and help in defining the boundaries and responsibilities of
various components.
GENERALIZATION
SPECIALIZATION
RELATIONSHIPS
• Modular design is an approach to software design that emphasizes breaking down a system
into smaller, independent, and interchangeable modules or components.
• Two key principles in modular design are coupling and cohesion, which are crucial for
creating maintainable, scalable, and flexible systems.
COUPLING
COHENSION
• In software engineering, cohesion refers to the measure of how closely the responsibilities of
a module or component are related to each other.
• It's a fundamental concept used to assess the quality of software design.
• High cohesion is desirable because it indicates that a module or component is focused and
has a well-defined purpose, while low cohesion suggests that a module is trying to do too
many unrelated things.
• Cohesion is often categorized into different types based on the nature of relationships within
a module:
1. Functional Cohesion: Elements within a module contribute to a single well-defined
task, promoting clarity and ease of maintenance.
2. Sequential Cohesion: Tasks in a module are arranged in a specific sequence, with the
output of one task serving as the input for the next, providing a logical order of
execution.
3. Communicational Cohesion: Elements within a module are grouped based on shared
data, even if their functions are not directly related, enhancing data integrity.
4. Procedural Cohesion: Modules are organized based on the order in which tasks are
executed, potentially indicating the need for better organization of responsibilities.
5. Temporal Cohesion: Elements within a module need to be executed at the same time,
reflecting a temporal relationship rather than a functional one.
6. Logical Cohesion: Elements within a module are grouped based on a logical
relationship, though the nature of that relationship may not be immediately clear.
7. Coincidental Cohesion: Elements within a module lack a logical relationship,
indicating haphazard development or the accumulation of unrelated functionality over
time.
• Benefits of High Cohesion:
o Easier to understand and maintain.
o Changes are localized within the module.
o Promotes reusability of modules.
STUPID Principles:
STUPID is an acronym that highlights anti-patterns and poor practices to avoid in software
design:
• Singleton Abuse:
o Avoid excessive use of singleton patterns, as it can lead to global state and make the
code difficult to test and maintain.
• Tight Coupling:
o Avoid tight coupling between classes and components, as it makes the system less
flexible and harder to modify.
• Untestability:
o Code should be designed to be easily testable. Avoid practices that hinder the ability to
write unit tests for components.
• Premature Optimization:
o Avoid optimizing code prematurely. Focus on creating a clean, maintainable design
before worrying about performance.
• Indescriptive Naming:
o Use clear and descriptive names for classes, methods, and variables to enhance code
readability and understanding.
• Duplication:
o Avoid code duplication. Reuse code where possible to minimize maintenance efforts
and improve consistency.
SOLID Principles:
SOLID is a set of five design principles aimed at creating robust, scalable, and maintainable
software:
GRASP Principles:
GRASP (General Responsibility Assignment Software Patterns) provides nine principles to
guide the assignment of responsibilities in object-oriented design:
• Information Expert:
o Assign a responsibility to the class with the required information to fulfill that
responsibility.
• Creator:
o Assign the responsibility for creating an instance of class A to class B if one or more
of the following is true: B creates A objects, B uses the information that is necessary
to initialize A, B holds the initializing data for A.
• Controller:
o Assign the responsibility for handling system events to a controller class.
• Low Coupling:
o Assign the responsibility to avoid tight coupling between two classes.
• High Cohesion:
o Assign the responsibility to achieve high cohesion within a class.
• Polymorphism:
o Assign the responsibility to handle variations in behavior to a polymorphic operation.
• Pure Fabrication:
o Assign a fictional or artificial responsibility to a class that does not represent a concept
in the problem domain.
• Indirection:
o Assign the responsibility for achieving indirection and location transparency to an
intermediate object.
• Protected Variations:
o Assign the responsibility for preventing variations in other parts of the system from
having an impact on the protected variations.
IMPORTANCE OF SOFTWARE QUALITY ASSURANCE
• Software quality assurance (SQA) is a methodology to ensure that the quality of the software
product complies with a predetermined set of standards.
• It is a systematic and proactive way to ensure that software processes and products meet
specified requirements and are developed with a high level of quality.
• SQA works parallel to software development, an ongoing activity applied throughout the
software development life cycle.
• SQA helps organizations to minimize defects, improve customer satisfaction, and increase
the reliability and scalability of software products.
• The importance of SQA can be highlighted in various aspects:
o Defect prevention: It is always better to prevent defects and errors in the software
product than to correct them later. The first principle of SQA emphasizes the
importance of identifying and addressing potential issues early in the software
development lifecycle. Unlike quality control, SQA focuses on fixing the root cause of
defects and errors, and not just the symptoms.
o Continuous improvement: SQA is not a one-time thing. It is more like an ongoing
process you need to integrate into your software development lifecycle. Continuous
improvement underlines the need to consistently monitor and improve the quality of
the software product.
o Stakeholder involvement: SQA must involve all stakeholders in the software
development process, including customers, developers, testers, QA team leads, and
project managers. It involves the importance of collaboration and communication
between the involved parties to ensure a smooth software development process.
o Risk-based approach: SQA must focus on identifying and addressing the most
significant risks in the software product. This principle emphasizes the importance of
prioritizing risks based on their potential impact on the software product.
SOFTWARE REVIEWS
• Software reviews are systematic evaluations of software artifacts such as code, design
documents, or requirements to identify defects, improve quality, and ensure adherence to
standards.
• Reviews can include various types, such as code reviews, design reviews, and requirements
reviews, each targeting specific aspects of the software development process.
• The primary objectives of software reviews are defect identification, knowledge sharing, and
improvement of the overall software quality.
• Participants in software reviews typically include developers, testers, and other relevant
stakeholders who collaboratively examine and discuss the software artifacts.
• Reviews provide early defect detection, knowledge transfer among team members, improved
communication, and continuous process improvement.
• Code reviews focus on examining source code for correctness, maintainability, and
adherence to coding standards. They help catch errors before they impact the entire system.
• Design reviews assess the architecture and design of the software, ensuring it aligns with
requirements, is scalable, and follows best practices.
• Requirements reviews ensure that documented requirements are clear, complete, and
feasible, helping prevent misunderstandings and scope creep.
• Formal reviews follow a structured process with defined roles and checklists, while informal
reviews are more flexible and collaborative, emphasizing discussion.
• Roles in reviews include the author (developer or document creator) and reviewers (peers or
subject matter experts), fostering a collaborative and constructive environment.
• Various tools, such as code review tools or collaborative platforms, can facilitate and
automate the review process, enhancing efficiency and documentation.
• Challenges in software reviews include scheduling constraints, potential resistance from
team members, and the need for a balance between finding defects and maintaining a
positive team culture.
• Software reviews are integral to quality assurance, fostering collaboration, knowledge
sharing, and continuous improvement throughout the software development life cycle.
TEST-DRIVEN DEVELOPMENT
UNIT TESTING
• Black box testing is a software testing method where the internal workings, code structure,
and implementation details of a system are not known to the tester. The focus is on testing
the system's functionality.
• Testers approach black box testing from the end user's perspective, assessing whether the
software behaves according to specified requirements.
• Test cases are designed based on the system's expected behavior, and the tester evaluates the
output generated by the system for a given set of inputs.
• Tools Used for Black Box Testing: Appium, Selenium, Applitools, HP QTP, etc.
• Black Box testing techniques:
o Syntax-Driven Testing
o Equivalence partitioning
o Boundary value analysis
o Cause effect Graphing
o Requirement-based testing
o Compatibility testing
• Black Box Testing Types:
o Functional Testing
o Regression Testing
o Nonfunctional Testing (NFT)
• Advantages of Black Box Testing:
o Ensures unbiased validation of user requirements.
o Testers do not need knowledge of internal code, facilitating independence.
o Supports end-to-end testing, simulating real user interactions.
• Disadvantages of Black Box Testing:
o Limited coverage may miss certain code paths or scenarios.
o Testers may lack insight into internal code structures and potential issues.
o Dependency on accurate and comprehensive requirement specifications.
• White box testing, also known as clear box or glass box testing, is a testing method where
the internal structure, code, and logic of the software application are known to the tester.
• Testers approach white box testing with knowledge of the internal workings of the system,
allowing them to design test cases based on the internal code structure.
• White box testing aims to achieve high code coverage, ensuring that all paths through the
code are exercised during testing.
• Tools required for White box Testing: PyUnit, Sqlmap, Nmap, Bugzilla, etc.
• White Box testing types:
o Statement coverage
o Branch coverage
o Condition coverage
o Basis path testing
o Loop testing
• Advantages of White Box Testing:
o Provides detailed coverage of internal code paths and logic.
o Enables early detection of code-related issues and structural errors.
o Facilitates thorough unit testing for individual components.
• Disadvantages of White Box Testing:
o May not cover all possible external behaviors or user scenarios.
o Requires knowledge of internal code, limiting tester independence.
o Focus on internal logic may overlook higher-level integration issues.
Verification:
• Ensures that the software system meets specified requirements by conducting activities like
inspections, reviews, and walkthroughs throughout the development process.
• Concentrates on the development phase, checking that each development stage aligns with
the defined requirements and standards.
• Examples: Code reviews, design inspections, requirements analysis, and testing during
development constitute verification activities.
Validation:
• Ensures that the software system satisfies the user's needs and expectations by evaluating the
final product against the specified requirements.
• Primarily directed at the end of the development process, validating that the completed
software fulfills the user's requirements.
• Examples: User acceptance testing (UAT), system testing, and beta testing are examples of
validation activities, ensuring that the software meets user needs.
1. Timing:
o Verification occurs during the development phase, ensuring each step complies with
specifications. Validation takes place after development to confirm the product meets
user expectations.
2. Focus:
o Verification concentrates on the process of building the software correctly, while
validation is concerned with building the correct software.
3. Type:
o Verification is static testing while validation is the dynamic testing.
4. Activities:
o Verification activities include inspections, reviews, and testing during development.
Validation activities involve user testing, acceptance testing, and system testing.
5. Documentation:
o Verification often leads to extensive documentation, ensuring that each phase adheres
to predefined standards. Validation focuses on the user experience and may involve
less formal documentation.
6. Collaboration:
o Verification requires collaboration among development teams, ensuring that everyone
follows specified processes. Validation involves collaboration with end-users,
gathering feedback to refine the software.
7. Changes and Corrections:
o During verification, changes and corrections are made to align with requirements and
standards. In validation, adjustments are made based on user feedback and real-world
usage.
8. Error Detection:
o Verification identifies errors and issues within the development process. Validation
uncovers errors related to user expectations, functionality, and usability.
9. Iterative Nature:
o Both verification and validation can be iterative processes, with continuous refinement
based on feedback from each phase of development.
[Link]:
o Verification ensures compliance with predefined standards and specifications.
Validation checks compliance with user needs, often outlined in functional
requirements.