Skip to content

Latest commit

 

History

History
294 lines (225 loc) · 14 KB

Software Modelling.md

File metadata and controls

294 lines (225 loc) · 14 KB

Introduction to Software Engineering

1. What and Why Software Engineering

Software engineering is the systematic application of engineering principles to the development, operation, and maintenance of software. It aims to produce reliable, efficient, and maintainable software systems.

Why Software Engineering?

  • Complexity Management: Software systems are increasingly complex; software engineering practices help manage this complexity.
  • Reliability and Quality: Ensures that software meets user requirements and performs consistently.
  • Cost-Effectiveness: Minimizes development and maintenance costs.
  • Scalability: Provides methodologies to create systems that can grow with user needs.
  • Maintenance and Evolution: Facilitates the ongoing adaptation and improvement of software over time.

2. Role and Responsibility of Software Engineers

Software engineers are responsible for designing, developing, testing, deploying, and maintaining software solutions. Key roles include:

  • Requirement Analysis: Understanding user needs and documenting functional and non-functional requirements.
  • System Design: Architecting software solutions that meet specified requirements.
  • Development: Writing and implementing efficient, maintainable, and error-free code.
  • Testing and Debugging: Ensuring software reliability and performance through rigorous testing.
  • Deployment: Facilitating software release and deployment into production environments.
  • Maintenance: Updating and refining software to address issues, improve performance, or adapt to changing requirements.
  • Collaboration: Working with stakeholders, including clients, project managers, and other developers, to ensure project success.

3. Fundamental Qualities of a Software Product

A high-quality software product exhibits the following fundamental attributes:

  • Functionality: The software must fulfill the intended purpose.
  • Reliability: Consistent performance without failures under specified conditions.
  • Usability: Easy to use and learn for the intended audience.
  • Efficiency: Optimal use of system resources, including time and memory.
  • Maintainability: Easy to fix bugs, update features, and adapt to new requirements.
  • Portability: Ability to operate across various platforms and environments.

4. Software Quality Model: ISO and CMM

ISO (International Organization for Standardization):

  • ISO 9126 is a widely recognized model defining software quality attributes, including functionality, reliability, usability, efficiency, maintainability, and portability.

CMM (Capability Maturity Model):

  • A framework for assessing and improving software development processes, divided into five maturity levels:
    1. Initial: Processes are ad hoc and chaotic.
    2. Repeatable: Basic project management processes are established.
    3. Defined: Processes are standardized and documented.
    4. Managed: Processes are quantitatively measured and controlled.
    5. Optimizing: Continuous process improvement is emphasized.

5. Kinds of Software Life-Cycle Models and Case Study

Common Software Life-Cycle Models:

  1. Waterfall Model: Sequential stages including requirement analysis, design, implementation, testing, and maintenance.
  2. Iterative Model: Development occurs through repeated cycles, refining with each iteration.
  3. Spiral Model: Combines iterative development with risk analysis, emphasizing prototypes.
  4. V-Model: Verification and validation steps are explicitly defined alongside development stages.
  5. Agile Model: Focuses on iterative development, collaboration, and customer feedback.

Case Study Example: Developing an e-commerce platform:

  • Waterfall: Suitable for fixed requirements and long-term projects.
  • Agile: Best for rapidly changing requirements and frequent releases.
  • Spiral: Ideal when risk management is critical, such as for payment security.

6. Software Development Methodologies

1. Waterfall Methodology:

  • Linear and sequential approach.
  • Suitable for projects with well-defined requirements.

2. Agile Methodology:

  • Iterative and incremental development.
  • Emphasizes collaboration, flexibility, and customer feedback.

3. Scrum Framework:

  • Subset of Agile focusing on time-boxed iterations called sprints.
  • Roles include Scrum Master, Product Owner, and Development Team.

4. Kanban Method:

  • Visualizes workflows to improve efficiency and minimize bottlenecks.
  • Continuous delivery and process optimization.

5. DevOps:

  • Integrates development and operations teams for continuous delivery and automation.
  • Focus on CI/CD pipelines and infrastructure as code.

6. Extreme Programming (XP):

  • Promotes engineering practices like pair programming, test-driven development, and continuous integration.

7. Software Requirement Engineering

Traditional Methods for Requirement Determination:

  1. Interviews: Conducting discussions with stakeholders to gather requirements.
  2. Questionnaires: Distributing structured forms to collect input from users.
  3. Observation: Monitoring users performing tasks to understand workflows and requirements.
  4. Document Analysis: Reviewing existing documentation, such as manuals or process descriptions, to extract requirements.

Modern Methods for Requirement Determination:

  1. Joint Application Development (JAD): Collaborative workshops involving stakeholders and developers.
  2. Prototyping: Building early versions of the software to gather user feedback.
  3. Use Case Analysis: Developing scenarios that describe system interactions from a user’s perspective.
  4. Storyboarding: Creating visual narratives or diagrams to illustrate workflows and user interactions.

Process Modeling using DFD:

  • Data Flow Diagram (DFD): A graphical representation of data processes within a system.
    • Elements:
      • Processes: Represented by circles or rounded rectangles, indicating transformations of data.
      • Data Stores: Depicted as open rectangles, storing data within the system.
      • External Entities: Represented as squares, denoting sources or destinations of data outside the system.
      • Data Flows: Arrows showing movement of data between processes, data stores, and external entities.

Data Modeling using ERD:

  • Entity-Relationship Diagram (ERD): A visual representation of data and its relationships.
    • Key Elements:
      • Entities: Objects or concepts represented as rectangles.
      • Attributes: Characteristics of entities shown as ovals.
      • Relationships: Connections between entities depicted as diamonds.
    • Example: A system managing students and courses could have entities like "Student" and "Course," with relationships such as "Enrolled In."

Requirement Documentation:

  • Comprehensive documentation capturing all requirements for a software project.
  • Common formats include:
    1. Software Requirements Specification (SRS): A detailed description of functional and non-functional requirements.
    2. User Stories: Brief, narrative descriptions of user needs and goals.
    3. Functional Specification Document (FSD): Outlines the functionality of the system in technical terms.

Case Study Example: Developing a Hospital Management System:

  • Traditional Method: Conducting interviews with hospital staff to understand workflows.
  • Modern Method: Prototyping a scheduling module to gather feedback from doctors and administrators.
  • DFD Usage: Illustrating processes such as patient registration, appointment scheduling, and billing.
  • ERD Usage: Modeling entities like "Patient," "Doctor," "Appointment," and their relationships.
  • Documentation: Preparing an SRS detailing all system functionalities, including user roles, data flow, and performance requirements.

8. Coding

Programming Practices:

  • Write clear, concise, and maintainable code.
  • Follow consistent coding standards and naming conventions.
  • Use version control systems like Git for collaborative development.
  • Document code to enhance readability and comprehension.
  • Conduct regular code reviews to ensure quality and adherence to best practices.

Top-Down and Bottom-Up Approaches:

  1. Top-Down Approach:
    • Starts from the highest-level system components and breaks them down into smaller, more detailed parts.
    • Suitable for systems with clearly defined goals and requirements.
  2. Bottom-Up Approach:
    • Begins with the development of small, independent modules, which are later integrated to form the complete system.
    • Ideal for projects leveraging reusable components or libraries.

Structured Programming:

  • A programming paradigm that emphasizes:
    • Modularity: Dividing a program into distinct functions or procedures.
    • Control Structures: Using loops, conditionals, and sequences for logical flow.
    • Avoidance of GOTO statements to enhance readability and maintainability.

Information Hiding:

  • The principle of restricting access to internal details of a module or class.
  • Promotes abstraction, reduces complexity, and minimizes the impact of changes.
  • Commonly implemented using private or protected access modifiers in object-oriented programming.

Paired Programming:

  • A collaborative technique where two developers work together at one workstation:
    1. Driver: Writes the code.
    2. Observer/Navigator: Reviews each line of code as it is written, offering suggestions.
  • Benefits include improved code quality, knowledge sharing, and faster problem-solving.

9. Software Design

Software Design Process and Design Objectives:

  • Process: Involves requirement analysis, conceptual design, architectural design, detailed design, and validation.
  • Objectives:
    • Meet functional and non-functional requirements.
    • Ensure maintainability, scalability, and robustness.
    • Optimize performance and resource utilization.

Structured Design Methodologies:

  • Focus on modularity and hierarchical organization.
  • Techniques include:
    • Data Flow-Oriented Design: Using DFDs to derive system modules.
    • Object-Oriented Design: Emphasizes encapsulation, inheritance, and polymorphism.

Module Coupling and Cohesion:

  • Coupling: Degree of dependency between modules. Types include:

    1. Content Coupling: Direct access or modification of another module’s content (worst).
    2. Common Coupling: Shared global data.
    3. Control Coupling: Passing control information between modules.
    4. Data Coupling: Sharing data through parameters (best).
  • Cohesion: Degree of relatedness of a module’s internal components. Types include:

    1. Coincidental Cohesion: Randomly grouped tasks (worst).
    2. Logical Cohesion: Related by logic, not functionality.
    3. Functional Cohesion: Performs a single, well-defined task (best).

Structured Chart:

  • A hierarchical diagram representing system modules and their relationships.
  • Illustrates module control flow, data flow, and hierarchy.

Qualities of Good Software Design:

  • Modularity, simplicity, scalability, robustness, adaptability, and efficiency.

10. Software Testing

Introduction to Software Testing:

  • The process of verifying and validating software to ensure it meets specified requirements.
  • Detects and resolves defects to improve quality.

Levels of Testing:

  1. Unit Testing: Tests individual components or modules.
  2. Integration Testing: Verifies the interaction between integrated modules.
  3. System Testing: Validates the entire system against requirements.
  4. Acceptance Testing: Confirms software readiness for deployment.

Characteristics of Software Testing:

  • Ensures reliability, accuracy, and functionality.
  • Systematic and repeatable.
  • Covers all functional and non-functional requirements.

Testing Techniques:

  1. Black-Box Testing:

    • Focuses on input-output behavior without internal knowledge.
    • Includes equivalence partitioning, boundary value analysis.
  2. White-Box Testing:

    • Examines internal logic and code structure.
    • Techniques include statement, branch, and path coverage.

Alpha, Beta, and Gamma Testing:

  • Alpha Testing: Performed by developers at the development site.
  • Beta Testing: Conducted by end-users in a real-world environment.
  • Gamma Testing: Final stage ensuring readiness post-beta testing.

11. Software Project Management and Quality Assurance

Software Project Planning:

  • Involves defining scope, objectives, timelines, resources, and risks.
  • Includes task scheduling, resource allocation, and risk mitigation.

Software Metrics:

  • Quantitative measures to assess software quality and performance.
    • Cost Metrics: Estimate project expenses.
    • Size Metrics: Measure software size (e.g., lines of code, function points).

Cost and Size Metrics:

  1. Function Points (FP): Based on functionality delivered.
  2. COCOMO (Constructive Cost Model): Estimates effort, time, and cost.

Configuration Management:

  • Tracks and controls changes to software artifacts.
  • Includes version control, change control, and status reporting.

Software Maintenance and Types of Maintenance:

  • Corrective: Fixing defects.
  • Adaptive: Adjusting to environmental changes.
  • Perfective: Enhancing performance or functionality.
  • Preventive: Preventing future issues.

Constraints of Software Product:

  • Time, budget, resources, and technical limitations.

Quality Assessment:

  • Evaluating software against quality standards.

Quality and Productivity Relationship:

  • High-quality software enhances productivity and reduces costs.

Software Quality Management:

  • Processes ensuring adherence to quality standards.
  • Includes defect prevention, detection, and correction.

Quality Management System (QMS):

  • Structure comprising policies, procedures, and resources for quality assurance.
    • Pillars of QMS: Customer focus, leadership, engagement, process approach, improvement.
    • Key Aspects: Consistency, efficiency, and compliance.