intro to sd

CpE 418: SOFTWARE DESIGN

Topic Contents

  • History

  • Software Crisis

  • Emergence of Software Engineering / Design

  • Types of Software

  • What is Software Design?

  • Software Design Objectives

  • Structured Design and Procedural Paradigm

  • Modern Software Design Approaches

  • Software Development

  • Importance of Learning Software Design

Historical Context of Software Development

  • Early Days of Computing (1940s–1960s):

    • Software was primarily developed for specific hardware and written in machine or assembly language.

    • Programs were small, developed by individual programmers, with short lifespans.

    • Formal design was unnecessary because:

    • Software complexity was low.

    • Users and developers were often the same people.

    • Maintenance and scalability were not major concerns.

  • Tom Kilburn:

    • Computer scientist responsible for writing the world’s first piece of software.

    • First executed on June 21, 1948, at the University of Manchester, computing the greatest divisor of $2^{18}$ (262,144) in 52 minutes.

  • Fortran:

    • One of the earliest high-level programming languages, published in 1957.

    • Term “software” was coined in 1958 by statistician John Tukey in an article on computer programming.

The Personal Computing Era (1970s & 1980s)

  • Rise of personal computers marked a significant change in software development.

  • Apple II:

    • Released in April 1977, hailed as revolutionary.

  • VisiCalc:

    • First spreadsheet software for professional computing, known as the Apple II's killer app, written in specialized assembly language and released in 1979.

  • Open-source Software:

    • Emerged in the 1990s as a major development trend.

    • Linux kernel was released in 1991, becoming the basis for the open-source Linux operating system.

    • Java was released by Sun Microsystems in 1995.

The Mobile Device Revolution

  • 1973: The first mobile phone call was made.

  • 1993: IBM released the first publicly available smartphone.

  • 1996: Palm OS was introduced, popularizing PDAs.

  • 1999: Release of Blackberry 850, rapidly growing in popularity.

  • 2007: Apple's release of the iPhone altered computing profoundly.

The Software Crisis

  • By the late 1960s and 1970s, the software crisis emerged, characterized by widespread issues:

    • Projects frequently delivered late and over budget.

    • Software often failed to meet user requirements.

    • Systems became difficult to maintain or extend.

    • High failure rates in large-scale software projects.

  • The industry recognized that coding without systematic design was unsustainable, leading to the application of disciplined engineering principles.

  • Introduction of Software Engineering:

    • Formally addressed the software crisis by applying engineering principles, methods, and tools to software development.

    • Introduced crucial concepts:

    • Structured programming

    • Formal documentation

    • Modular design

    • Stepwise refinement

  • Software design became a recognized and essential activity rather than an informal precursor to coding.

Human Characteristics in Software Design

  • Humans inherently create and utilize tools, making design activity implicit in artifact production.

  • Translating a design into a product requires clear communication of the designer's vision to the development team.

Definition and Importance of Design Artifacts

  • Artifact:

    • A byproduct of software development that describes the architecture, design, and function of software.

    • Artifacts serve as roadmaps for developers to track the software development process (e.g., databases, data models, printed documents, scripts).

The Complementary Nature of Scientific and Engineering Activities

  • Science:

    • Involves observation, measurement, and experimentation to study the natural world.

  • Engineering:

    • Involves constructing new things based on scientific principles, leading to innovations such as pyramids, ships, cars, and telephones.

The Nature of Scientific Analysis

  • Process of Scientific Inquiry:

    1. Initial observations

    2. Conduct experiments

    3. Predict outcomes from theories

    4. Test theories through further experimentation

    5. Refine theories based on results

Model of the Design Process

  • Steps:

    1. Requirement Specification - understanding the external requirements of the system.

    2. Analysis - determining needs and creating a 'black box' model of the problem.

    3. Design Solution - postulating a 'white box' design solution.

    4. Validation - validating the solution, including through prototypes.

    5. Implementation - executing the design plan using appropriate software.

  • The designer's primary task is to specify the best solution to a problem and describe its organization.

Communication in Software Design

  • Designers must communicate:

    • Requirements specifications

    • Constraints

    • Domain knowledge

    • Plans for realization of the design

Examples of Design Viewpoints

  • Design Models:

    • Entity-Relationship Diagram (ERD)

    • State Transition Diagram (STD)

    • Data-Flow Diagram (DFD)

Purpose of Software Design

  • The ultimate goal of software design is to develop a solution to a problem.

  • Abstraction plays a critical role in this process, as it hides unnecessary details and focuses on relevant attributes of objects.

Definition of Software Types

  • Types of Software:

    • System Software:

    • Operating Systems (e.g., Linux, Windows).

    • Language Processors and Device Drivers (e.g., interpreters, compilers).

    • Application Software:

    • General-purpose applications (e.g., MS Word, Photoshop).

    • Customized software (e.g., railway reservation systems).

The Essence of Software Design

  • Software design is a fundamental activity bridging problem understanding (requirements) and solution realization (implementation).

  • It transforms abstract needs into logical, structured, and implementable solutions, functioning as a blueprint for software development.

  • Good software design ensures:

    • Understandability

    • Maintainability

    • Reusability

    • Adaptability to change

Objectives of Software Design

  1. Correctness

  2. Efficiency

  3. Understandability

  4. Completeness

  5. Maintainability

Structured vs. Object-Oriented Design

  • Structured Design:

    • Focused on top-down decomposition and control flow using sequence, selection, and iteration.

    • Used flowcharts and structure charts but struggled with larger systems.

  • Object-Oriented Design (OOD):

    • Emerged in the 1980s and 1990s, organizing software around objects encapsulating both data and behavior.

    • Benefits of OOD include:

    • Enhanced modularity through encapsulation

    • Code reuse via inheritance

    • Flexibility through polymorphism

    • UML standardized software design documentation.

Modern Approaches to Software Design

  • Contemporary software design combines multiple methodologies:

    • Agile and iterative development for adaptability and continuous improvement.

    • Component-based and service-oriented design for reuse and interoperability.

    • Event-driven and concurrent design for responsive and scalable systems.

  • Non-functional requirements like performance, security, usability, and sustainability are also key considerations.

Software Development Process and Phases

  • Software Development involves:

    • Understand the problem

    • Propose a software solution

    • A cooperative interaction between humans and computers (Grady Booch).

  • Key Steps in Software Development:

    1. Requirements Gathering

    2. Design Solution

    3. Implement Solution

    4. Testing

    5. Deployment

    6. Maintenance and Support

Importance of Software Design

  • Essential for computer engineers to build robust systems interacting with hardware and users, preventing:

    • High maintenance costs

    • System failures

    • Limited scalability

  • Benefits of good design include:

    • Reduced development effort

    • Support for future enhancements

    • Long-term reliability

  • Reasons to value learning software design:

    • Innovation and technological advancement

    • Problem-solving skills

    • Job security and opportunities

    • Global connectivity

    • Automation and efficiency

    • Creativity and expression

    • Adaptability to change

    • Critical thinking and logical reasoning

    • Entrepreneurial prospects

    • Community collaboration

Reflective Questions

  • What would systems like Google Maps or Grab be without formal software design?

  • Should software development be treated like traditional engineering fields? Why or why not?

  • Is it possible to build 'good software' without formal design?