Lec 20: Basics of System Design

Lec 20: Basics of System Design

Introduction to System Design

Overview of the Lecture

  • This lecture is part of the NTPEL MOOC course on Human-Computer Interfaces, specifically focusing on system design.
  • A recap of the interactive system development life cycle will precede the discussion on system design.

Recap of Interactive System Development Life Cycle

  • The lifecycle includes both iterative and non-iterative components, emphasizing its cyclical nature.
  • Key stages discussed include requirement gathering, analysis, specification, design, prototyping, evaluation, implementation, testing, deployment, and maintenance.

Requirement Gathering and Interface Design

Stages in Interface Design

  • The initial stage involves creating a Software Requirement Specification (SRS) document that outlines functional and non-functional requirements.
  • The design phase consists of three main stages: interface design, prototyping, and evaluation. Each stage contributes to refining the interface until a stable design is achieved.

Prototyping Techniques

  • Different types of prototypes are utilized: low fidelity (affordable), medium fidelity (moderate cost), and high fidelity (system-oriented). Understanding these helps in selecting appropriate methods for user feedback.
  • Evaluation techniques include expert evaluations and user evaluations aimed at rapid assessment without significant costs involved.

System Design Transition

Moving from Interface to System Design

  • After achieving a stable interface design through evaluation cycles, focus shifts to designing the system's components in modules during the system design phase. This leads into coding and implementation stages followed by testing for usability.
  • An empirical study is conducted post-testing to ensure usability; if issues arise during this phase, refinements are necessary before final deployment.

Key Considerations in System Design

Addressing Core Issues

  • In transitioning from interface design to system design, two primary questions arise: where to start? And how to represent? These questions guide the approach taken in developing software systems based on established designs from previous phases.

Starting Points for System Design

  • Similar to interface design processes that utilize guidelines or intuition as starting points; system designs also require clear representation strategies such as modularization for effective management of code complexity.

Importance of Manageable Code

Modular Design in System Development

Understanding Modular Design

  • Modular design allows different teams to develop system units separately before combining them, facilitating smoother overall development.
  • The primary goal of system design is to manage code development effectively and ensure the code remains manageable.

Starting the System Design Process

  • The system design process begins with the Software Requirement Specification (SRS) document, which is derived from requirement gathering and analysis.
  • There are two main phases in system design:
  • Preliminary Design: High-level overview of the entire system.
  • Detailed Design: In-depth specifications for each module.

High-Level Design Phase

  • During high-level design, modules are identified, control relationships between them are established, and interfaces for interaction are defined.
  • A modular approach helps break down complex problems into smaller, manageable parts.

Representing System Designs

  • Various languages can be used to represent system designs; one example is Data Flow Diagrams (DFD), which utilize graphical notations for clarity.
  • DFD serves as a graphical language that expresses design ideas through conventions and standards.

Example: Web-Based Newspaper Application

  • In designing a web-based newspaper application, stakeholders such as administrators and users interact with the system through labeled arrows indicating data flow.
  • Different user types have distinct interactions with the system; for instance:
  • Administrators manage content details,
  • Special users engage in discussions,
  • General users can view or search content only.

Expanding System Representation

  • While a single circle represents the whole software at a high level, it can be expanded to show lower levels of detail using DFD.

Understanding System Design: High-Level and Detailed Phases

Overview of System Design

  • The discussion begins with the design of a system related to classroom teaching, highlighting different modules such as faculty course management.
  • A second-level representation is introduced, where several databases are depicted using rectangles, indicating their role in the overall system architecture.

Data Flow Diagrams (DFD)

  • DFDs are utilized to illustrate how processes require data from databases, represented by rectangles. Interaction between modules is shown through leveled arrows indicating direction and content.
  • The lecture explains that one module can be further broken down into sub-modules in lower-level DFDs, maintaining consistent notation for processes and databases.

High-Level vs. Detailed Design

  • The high-level design focuses on modules and their interactions without detailing implementation specifics; it outlines what modules exist and how they interact with databases.
  • In contrast, the detailed design phase identifies specific data structures and algorithms necessary for implementing each module.

Characteristics of Good Design

Coverage

  • A good design must implement all functionalities specified in the Software Requirement Specification (SRS). Missing functionalities indicate a poor design.

Correctness

  • Correctness refers to the ability of a design to produce desired outputs based on given inputs. This ensures that all functionalities work as intended.

Understandability

  • Designs should be easily understandable by team members not involved in the initial creation. This facilitates collaboration across different teams during implementation.

Efficiency

  • Efficiency emphasizes optimal resource usage during implementation. A good design should not demand resources that are unavailable or excessive for its execution.

Maintainability

Design Evaluation and Key Characteristics

Essential Characteristics of Good Design

  • A good design allows for local changes without requiring a complete redesign, emphasizing flexibility.
  • If the five essential characteristics are absent, refinement is necessary to achieve a good design.
  • Understanding cohesion and coupling is crucial in evaluating system designs and achieving modularity.

Cohesion: The Property of Modules

  • Cohesion refers to how closely related the functions within a single module are; it is vital for effective modular design.
  • There are several types of cohesion:
  • Logical Cohesion: Functions perform similar operations (e.g., error handling).
  • Temporal Cohesion: Functions executed at the same time span (e.g., initialization tasks).

Types of Cohesion Explained

  • Procedural/Functional Cohesion: Functions that form part of the same procedure or algorithm (e.g., decoding algorithms in image processing).
  • Communication Cohesion: Functions that operate on the same data structure (e.g., functions manipulating a linked list).
  • Sequential Cohesion: Output from one function serves as input to another (e.g., input validation followed by sorting).

Coupling Between Modules

Understanding Coupling

  • Coupling describes relationships between two or more modules, contrasting with cohesion which focuses on individual modules.

Types of Coupling

  • Data Coupling: Modules communicate through data items (e.g., passing integers between modules).
  • Control Coupling: Data from one module controls flow in another module (e.g., using flags to direct operations).

Understanding Cohesion and Coupling in Modular Design

Key Concepts of Modular Design

  • Cohesion and Coupling: Two essential properties of modules are discussed—cohesion (a property of a single module) and coupling (a property between modules). High cohesion and low coupling lead to functionally independent modules.
  • Objective of Clean Composition: The goal is to achieve a clean composition of the problem into modules, represented hierarchically. This is feasible with functionally independent modules.
  • Design Goals: Achieving high cohesion within modules and low coupling between them is crucial for effective modular design. If these conditions are met, high-quality modular design can be achieved.
  • Minimizing Coupling and Maximizing Cohesion: The aim should be to minimize coupling while maximizing cohesion to ensure a robust modular design.

Approaches to System Design

  • Function-Oriented Approach: This approach uses functions as the basic abstraction for system design. It relies on Data Flow Diagrams (DFDs) for representation.
  • Data Flow Diagrams (DFD): DFD serves as a graphical language used in function-oriented designs, which will be discussed in detail later.
  • Object-Oriented Design Approach: In contrast, this approach utilizes objects as the fundamental abstractions, which are instances of classes.
  • Unified Modeling Language (UML): UML is typically employed to express object-oriented designs, providing a structured way to represent systems.

Summary of Lecture Content

  • Reviewing Key Learnings: The lecture covered the main ideas behind system design, focusing on where to start (the SRS document post-requirement specification stage).
  • Phases of Design: System design occurs in two phases—high-level design and detailed design—with an emphasis on achieving manageable code through modularity.
  • Cohesion vs. Coupling Recap: A recap emphasizes that cohesion pertains to individual module properties while coupling relates to inter-module relationships; both must be optimized for effective modularity.
Video description

Design & Implementation of Human-Computer Interfaces Course URL: https://onlinecourses.nptel.ac.in/noc22_cs125/preview Prof. Samit Bhattacharya Department of Computer Science and Engineering IIT Guwahati