Software Engineering - Software Design

Software Design Notes

Effective Modular Design

  • Definition: Modularization is the process of dividing a software system into discrete, independent modules capable of performing tasks independently.
  • Key Features:
  • Each module can be executed, compiled, and modified separately without impacting other modules significantly.
  • The strategy follows the 'divide and conquer' approach, making complex systems easier to manage.

Characteristics of Modularization

  • Structure:
  • Software is composed of systems that contain sub-systems, which can further contain more sub-systems.
  • Full system design at once is error-prone due to its complexity.
  • Breaking down into modules simplifies the design and development process.

Modules in Software Design

  • Definition: Modules are unique, addressable components of software that can be modified without affecting other modules.
  • Effective Modular Design Requirements:
  • Modules should be solvable, modifiable, and compilable independently.
  • Changes in modules shouldn't require recompiling the entire software system.

Advantages of Modularization

  • Maintainability: Smaller components are easier to maintain.
  • Functional Organization: Programs can be divided based on their functionality.
  • Abstraction: Allows for desirable levels of abstraction in the program.
  • Cohesion and Reusability: Higher cohesion leads to better reusability of components.
  • Concurrency: Concurrency allows for simultaneous execution of related processes.
  • Security: Enhances security by isolating modules.

Concurrency in Software Design

  • Historical Context: Earlier software execution was sequential, executing one instruction at a time.
  • Modern Approach: Concurrency allows multiple modules to run simultaneously, increasing efficiency.
  • Requirements: Designers must recognize which modules can execute concurrently.

Coupling and Cohesion

  • Coupling: It refers to the inter-dependability of modules. Lower coupling leads to better software design.

  • Types:

    • Content Coupling: Direct access to another module's details.
    • Common Coupling: Multiple modules share global data.
    • Control Coupling: One module controls the execution flow of another.
    • Stamp Coupling: Sharing of a data structure among modules.
    • Data Coupling: Interaction through data passed as parameter.
  • Cohesion: It refers to the degree of dependency within a module. Higher cohesion is better for software design.

  • Types:

    • Coincidental Cohesion: Random grouping, generally avoided.
    • Logical Cohesion: Elements grouped logically.
    • Temporal Cohesion: Grouping of elements that are processed at the same time.
    • Procedural Cohesion: Grouping based on sequential execution.
    • Communicational Cohesion: Elements that work on the same data.
    • Sequential Cohesion: Output of one element serves as input to another.
    • Functional Cohesion: Highest degree of cohesion, all elements contribute to a single function.

Design Verification

  • Importance: Verification ensures the outputs of the design are correct and meet requirements before implementation.
  • Outputs of Design Phase: Includes design documentation, pseudocode, diagrams, and function descriptions.
  • Methods:
  • Use formal notation tools for verification if available.
  • Conduct thorough design reviews to detect errors not found in earlier stages.
  • Good reviews enhance the software's design quality and accuracy.

References

  • Key resources for further reading include articles from Tutorialspoint and GeeksforGeeks on software design basics and processes.