Docstoc

Software Design

Document Sample
Software Design Powered By Docstoc
					Software Design
    – General definition of design
        • “… the process of applying various techniques and
          principles for the purpose of defining a device, a process, or
          a system in sufficient detail to permit its physical
          realization.”
    – Goal:
        To produce a model or representation that will later be built.
•         Once the s/w requirements have been analyzed and
          specified, s/w design is first of 3 activities- design, code and
          test that are required to build and verify the s/w.
•         Using any one of the number of design methods, the design
          step produces a
    •      data design,
    •      architectural design and
    •      procedural design.
  Software Design Model


   Functional       Information
     model             model


  Behavioral                Data design
    model
                Design    Architectural
                             design


                                          Code
   Other                                                          Integrated
requirements              Procedural             Program          & validated
                            design               modules   Test
                                                                   software
 General Design Guidelines



– Exhibit a hierarchical organization that make
  intelligent use of control among components.
– Logically partitioned into components that
  perform specific tasks and subtasks.
– Distinct representation of data and procedure.
– Lead to interfaces that reduce complexity.
– Derived using a repeatable method driven by
  information gathered during requirements.
•Data Design: Transforms information domain model created
during analysis into data structure that will be required to
implement the software.

•Architectural Design: Defines relationship among major
structural components of the program.

•Procedural Design: Transforms structural components into
procedural description of the software.


•The importance of software design is that it provides us with
representation of software that can be assessed for quality.
The Design Process

•Any design may be modeled as a directed graph made up
of entities with attributes which participate in
relationships.

•The system should be described at several different levels
of abstraction.

•Design takes place in overlapping stages.

•It is artificial to separate it into distinct phases but some
separation is usually necessary.
                     Phases in the Design Process




                  e
           Re quir me nts
                       a
           spe c if iction

                                                                     vitie
                                                          De sign a c ti s

 c
Ar hite c turl
           a                   a
                        Abstr ct          I nter fac e            Compone nt           Data           Algorithm
  design               spe c if ictio
                                   a        design                 design                    e
                                                                                     struc tur         design
                            n                                                         design



                       Sof tw rea                                                      Da  ta
   Sy stem                               I nter fac e             Compone nt                          Algorithm
                                  a
                      spe c if iction                                                struc tur e
  c         e
a r hite c tur                          spe c if ic a
                                                   tion                      a
                                                                 spe c if iction                                tion
                                                                                                     spe c if ic a
                                                                                               a
                                                                                   spe c if iction

                                                                  oduc
                                                          De sign pr ts
Challenges in Design

    Design is considered to be a wicked problem that can
     be clearly defined by solving it.(defined: what the needs
     actually are?)

    Process is Sloppy
     ◦ Mistakes
     ◦ Wrong, dead-end paths
     ◦ Stop when “good enough”

•    Goodness of a design dependent on priorities
        Fast development time? Scalable? High-performance?
         Adaptable
        Designer’s task to strike the right balance
     And priorities can change
   Restrictions are necessary
    ◦ Constraints improve the result
    ◦ Force simplifications and generalizations

   Nondeterministic process
    ◦ Not one “right” solution

   A Heuristic process
    ◦ Rules of thumb vs. fixed process

   Design is an emergent process
               Good Design Characteristics



   Minimal complexity          Favor “simple” over “clever”
               Good Design Characteristics



   Minimal complexity          Imagine what maintainer of
                                code will want to know
   Ease of maintenance         Be self-explanatory
               Good Design Characteristics



   Minimal complexity          Keep connections between
                                parts of programs
   Ease of maintenance         minimized
   Loose coupling                  Avoid n2 interactions!
                                Abstraction, encapsulation,
                                information hiding
               Good Design Characteristics



   Minimal complexity          Should be able to add to
                                one part of system without
   Ease of maintenance         affecting others
   Loose coupling
   Extensibility
             Good Design Characteristics



 Minimal complexity          Design so code could be
                              “lifted” into a different
 Ease of maintenance         system
 Loose coupling              Good design, even if never
                              reused
 Extensibility
 Reusability
             Good Design Characteristics



 Minimal complexity          For a given class, have it
                              used by many others
 Ease of maintenance         Indicates reuse effective
 Loose coupling
 Extensibility
 Reusability
 High fan-in
            Good Design Characteristics



 Minimal complexity         Do not use too many other
                             classes
 Ease of maintenance        Complexity management
 Loose coupling
 Extensibility
 Reusability
 High fan-in
 Low-to-medium fan-out
             Good Design Characteristics



 Minimal complexity         Consider what will happen
                             if moved to another
 Ease of maintenance        environment
 Loose coupling
 Extensibility
 Reusability
 High fan-in
 Low-to-medium fan-out
 Portability
            Good Design Characteristics



 Minimal complexity         Don’t add extra parts
                             Extra code will need to be
 Ease of maintenance        tested, reviewed in future
 Loose coupling             changes

 Extensibility
 Reusability
 High fan-in
 Low-to-medium fan-out
 Portability
 Leanness
            Good Design Characteristics



 Minimal complexity         Design so that you don’t
                             have to consider beyond
 Ease of maintenance        the current layer
 Loose coupling             Layered configuration

 Extensibility
 Reusability
 High fan-in
 Low-to-medium fan-out
 Portability
 Leanness
 Stratification
            Good Design Characteristics


 Minimal complexity
 Ease of maintenance        Use of common
                             approaches make it easier
 Loose coupling             to follow code later
 Extensibility              Avoid unneeded exotic
                             approaches
 Reusability
 High fan-in
 Low-to-medium fan-out
 Portability
 Leanness
 Stratification
 Standard Techniques
                Design Fundamentals


– Abstraction
– Refinement
– Modularity
– Software Architecture
– Control Hierarchy
– Information Hiding

				
DOCUMENT INFO