introduction to software design. outline problems in software architectural design function, form,...

58
Introduction to Software Design

Post on 21-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Introduction to Software Design

Outline

Problems in software architectural design

Function, form, and fabrication (the Vitruvian triad)

The scope of design The psychology and philosophy of

design General methodology of design

Problems in Software Architectural Design

An ad hoc approach to design does not scale with respect to the size and complexity of the application.

As the number of functions and quality attributes grows, so does the need for more control of the application design.

Obstacles to Achieving High-Quality Architectural Design A lack of awareness of the importance of

architectural design to software development.

A lack of understanding of the role of the software architect.

A widespread view than designing is an art form, not a technical activity.

A lack of understanding of the design process.

Obstacles to Achieving High-Quality Architectural Design (Cont’d) A lack of design experience in a

development organization. Insufficient software architecture design

methods and tools. A lack of understanding of how to

evaluate designs. Poor communication among

stakeholders.

When Are the Architecture Design Activities Done?

They can be practiced during any phase of the development process.

However, to be of greatest benefit they should be done as early as possible.

These activities can be viewed as a linear set of steps that can be repeated whenever missing information or hidden assumptions are identified.

Solving These Problems Involves:

Evangelizing the importance of software architecture.

Improving software architecture education.

Using architectural methods and tools.

Function, Form, and Fabrication: The Vitruvian Triad

In hisTen Books on Architecture Vitruvius wrote that the result of architecting should be an artifact exhibiting the principles of firmitas, utilitas, and venustas.

These three principles are know as the Vitruvian Triad.

The Vitruvian Triad

“Firmitas will be observed if, whatever the building materials may be, they have been chosen with care but not with excessive frugality.” (fabrication/durability)

“Utilitas will be observed if the design allows faultless, unimpeded use through the disposition of the spaces and the allocation of each type of space is properly oriented, appropriate, and comfortable.” (function/usefulness)

“Venustas will be upheld when the appearance of the work is pleasing and elegant, and the proportions of its elements have properly developed principles of symmetry.” (form/beauty)

The Vitruvian Triad (Cont’d)

Architectural design is what brings function and form together.

Function in the architectural sense means need, purpose, utility, or intended use of the system.

An application system is constructed based on the specification of its form, which satisfies its function (i.e., need, purpose, etc.).

The form includes the specification of distinct quality attributes that, through a realization of components in a system, satisfies the function.

Function and Product Planning

An application’s architecture must address end-user needs.

The architecture must be (partially) perceivable to the users of the application.

Architecting begins with a specification of an application or system in terms of the functions, capabilities, and other qualities that it must possess.

Form and Interaction Design

According to Alan Cooper design can be divided into interaction design and program design.

Interaction design is that which directly affects the ultimate end user of the application.

All other design is called program design. Poor interface design contributes to cognitive

friction or “the resistance encountered by a human intellect when it engages with a complex system of rules that change as the problem permutes.”

The interaction design is the user’s conceptual model or virtuality.

Interaction Design: Human/Computer Interaction (HCI)

Four threads of research:1. Software engineering methodologies of

prototyping and iterative development.2. Software psychology and human

factors of computing systems.3. Computer graphics and software user

interfaces.4. Models, theories, and frameworks of

cognitive science.

The Application Domain

The application domain is that part of the world in which an application’s effects will be felt, evaluated, and approved by users.

The virtuality of a software application must be congruent with the application domain.

Use cases are an example of an application domain modeling technique.

Fabrication

Vitruvius’s firmitas is the principle of quality (soundness, durability).

The quality of a system is based on both the design of the system and the selection of technologies used to build it.

The system must be realizable; it must be possible to build the system with available resources of time, staff, budget, existing components, etc.

The Scope of Design

An design activity can be seen from many points of view: Psychological – design is a creative process that

requires knowledge in software engineering, computer science, logic, cognitive science, linguistics, programming languages, and software design methodologies as well as application domain-specific knowledge.

Systematic – design is an architecting or engineering activity that involves finding optimized solutions while balancing obstacles.

Organizational – design is a set of steps or activities of the system life cycle, beginning with needs analysis and ending with the produce end of life.

Tasks and Activities of Design

Origin of the task Organization Novelty Production Technology Horizontal domain Quality attributes

Origin of the Task

Possible origins for a design task: Product planning (especially for

commercial software) In-house software (custom systems) Systems integration Production and field testing

Organization

The design process is usually organized around the structure of the development organization.

Two common types of organization are: Product-oriented – product development and

production responsibilities are divided among different divisions based on product type.

Problem-oriented – work is organized according to a division of labor along domain boundaries such as database administration, user interface design, etc.

Each organizational type affects the choice of design activities and how they are performed.

Novelty

Some design task require much more invention and creative problem solving than others. The novelty of the problem can be categorized as follows: Original design Adaptive design Variant design

Original Design

Starts with a clean slate. May be created through the synthesis of

known solution principles and existing technology.

May require inventing something new.

Adaptive Design

Starts with known or established solution principles.

Adapts the principles to fit the current problem.

May involve some original design as new components are added to meet new requirements.

Variant Design

Starts with an existing design. Modifies the design with respect to

some nonfunctional quality attributes. For example, changes to improve

performance of certain operations, or be able to handle greater user loads.

Production

Software may be created for either: A One-off custom system Commercial software for sale

For one-off systems functionality, maintainability, performance, reliability and/or availability are typically the most important qualities.

For Commercial systems functionality, performance, extensibility, adaptability, and usability are commonly the paramount qualities.

Technology

Different technologies require different design methods. Some technology areas that affect design methods are: Information representation Data storage Data transformation Business logic User interface design Vendor platforms

Horizontal Domain

Systems can be characterized by their relative complexity.

Systems can be divided horizontally into layers or horizontal domains where each layer has its own complexities.

The demarcation of a horizontal domain is based on the types of concerns addressed by design and the patterns, methods, and tools specific to a domain.

Example of Horizontal Domains

Integrated enterprises (B2B) Enterprise integration: systems of

applications (integrated applications) Enterprise applications (point or vertical

solutions) Software libraries, databases,

application servers, operating systems (platforms)

Quality Attributes

One of the largest factors that affect the design task is the set of required quality attributes of the system.

The architect must find a balance among the competing quality attributes.

Many passes through the design process may be needed as design tradeoffs are considered and proposed designs are evaluated.

Common Quality Attributes

Functionality Buildability Cost and time to market Performance Usability Security Availability and reliability Modifiability

Architecture versus Engineering Design The difference between software architecture

design and software engineering design can be characterized based on scope and complexity.

Engineering design concentrates on implementing specific quality attributes using technologies.

Architectural design concentrates on formulating the quality attributes and system characteristics and selecting the working principles that balance many competing quality attributes.

The Psychology and Philosophy of Design

Design is a creative problem-solving activity that involves intuitive and discursive thought.

Intuitive thinking, mostly subconscious, is characterized by insight and inspiration usually triggered by some association of ideas.

Discursive thinking is conscious and deliberate, where facts and relationships are analyzed and combined in various ways, evaluated, and then disposed of.

Problems, Obstacles, and Solutions Design is the activity of finding or

creating solutions to problems given a set of obstacles to overcome.

Systematic approaches to design can add a degree of predictability with respect to the time required for design and its resulting quality.

Systematic approaches don’t hinder creativity, but rather serve as a catalyst for creative thought.

Problems, Obstacles, and SolutionsProblems, Obstacles, and Solutions

Problems, Obstacles, and Solutions

There is no one best design method. There are both good and poor choices

for which method to employ in a given set of circumstances.

Object-oriented design is a popular choice but is not always the best, especially when you are not at the level of objects and classes.

Problems, Obstacles, and SolutionsProblems, Obstacles, and Solutions (Cont’d)

Aristotelian Reasoning

In software design reason can be used as a meta-tool for both understanding and discoursing.

The three rational operations used in the formation of knowledge: definition, predication, and inference, can be used in architectural design.

Definition and predication can be used for understanding and inference can be used for discoursing.

Aristotelian Reasoning (Cont’d)

Definition and predication are the basis of abstract thinking.

Inference is used in the assessment of architectural designs.

After using the operations of definition and predication to understand the problem it still may not be represented in a way that facilitates the discovery of existing solutions.

Aristotelian Reasoning (Cont’d)

We use divide and conquer to refine our understanding and look for solutions to our new set of problems.

In order to master the art of software architecture, the architect needs to practice these techniques until they are part of his or her subconscious.

General Methodology of Design

Elements of Design Purposeful thinking Analysis Abstraction Synthesis General heuristics

Purposeful Thinking

Design requires systematic thinking. This does not preclude creativity or

intuition. But a purely intuitive approach has

disadvantages: The right solution rarely comes at the right time. The results depend on the skill of the architect. The solution might be negatively influenced by

preconceived ideas.

Purposeful Thinking (Cont’d)

The architect should analyze the design for errors or weak points in the early stages of development.

A discursive design approach helps reduce errors by enforcing systematic testing of design ideas and assumptions early.

Purposeful Thinking (Cont’d)

Creativity is inhibited or encouraged by different influences.

Some techniques for encouraging creativity are: Interrupt the activity to create incubation

periods (but be careful; too many interruptions can be disruptive).

Apply different solution-finding methods. Move from abstract to concrete ideas.

Purposeful Thinking (Cont’d)

Some techniques for encouraging creativity (Cont’d): Find and collect information form design

catalogues (such as design patterns). Divide work among architecture team

members. Make realistic plans: Realistic planning is

found to encourage motivation and creativity, while unrealistic planning is inhibiting.

Analysis

Analysis is the decomposition of complex systems into elements and their relationships.

Activities include identification, definition, and structuring for the purpose of acquiring information about a subject that can be transformed into knowledge.

Analytic methods are use at all stages of software design.

Analysis (Cont’d)

Structured analysis in software emphasizes a functional hierarchy.

Object-oriented analysis emphasizes an object hierarchy.

Weak-spot analysis of a design can be done by evaluating it with respect to metamodels.

Most software design problems are the result of a lack of understanding of the problem being solved.

Abstraction

Abstraction reduces the complexity of a problem while emphasizing the essential characteristics of it.

Abstractions aid in the discovery of solutions.

Abstractions are sometimes invented but often discovered.

A given problem may have many abstractions.

Synthesis

Synthesis is the combining of individual elements or parts to produce a new effect.

With respect to design it is the integration of subproblem solutions and the evaluation of the resulting system.

General Heuristics

Heuristics are techniques that are characterized as the searching for suitable solutions. Some heuristics are: Persistent questions Negation Forward steps Backward steps Factorization Systematic variation Division of labor and collaboration

The Method of Persistent Questions

Requirements are almost never complete.

The architect must engage in persistent questioning to stimulate ideas and remove preconceived notions.

Architects may keep a database of questions for various purposes.

The Method of Negation

The method starts with a known solution that is divided into (truthful) statements about its parts.

These statements are negated, one by one, to stimulate the creation of alternate solutions.

The Method of Forward Steps

This method starts with a first solution attempt and tries to follow as many solution paths as possible, by making decisions that lead to implementation.

This is a good brainstorming technique.

The Method of Backward Steps

In this method the architect starts with a goal in mind rather than the initial problem.

All possible paths that could have led up to the goal are retraced.

This method is useful for organizing and engineering department around the product’s architecture and for preparing an engineering process.

The Method of Factorization

The method involves breaking a complex system into less complex elements or factors.

This technique is used to find the essential problems being solved.

This may involve taking what appears to be an indivisible component and finding a way to divide it into two components and a interface.

The Method of Systematic Variation

The method starts with a generalized classification structure that represents the various problem characteristics and possible solutions.

By systematically varying a single characteristic, the architect may discover more optimized solutions.

Summary

Design is a creative problem-solving activity that involves finding or creating solutions to problems given a set of obstacles.

The three Aristotelian operations of reason can be used in formulating problems and rationalizing about their solutions.

The operations of definition and predication are used to gain understanding of the problem.

Division of Labor and Collaboration

Implementing large and complex tasks requires a division of labor.

Software development tasks are commonly based not only on functional areas but also on the technology used.

This division causes an information exchange problem.

Systematic methods and the creation of models can help overcome this problem.

Summary (Cont’d)

Inference is used to find new solutions and evaluate existing solutions.

There are three principles of architecture: utilitas (function), firmitas (fabrication, quality), and venustas (form).

Function is expressed as problems and, through analysis, is divided into subproblems.

Analysis involves the rational operators of definition and predication.

Summary (Cont’d)

Product planning, the first phase of design, transforms the subproblems into a functional specification.

During conceptual design the functional specification is used to elaborate the functional design and the structural design.

The functional design corresponds to the externally facing or interaction design of the system (aimed at reducing cognitive friction).

Summary (Cont’d)

The structural design is concerned with the internal physical design of the software itself.

Heuristic design methods are applied to produce several candidate structural architectural designs.

The architecture design candidates are evaluated, disposed of, or further refined during embodiment design.

Summary (Cont’d)

The same rational operators and design methods are applied, but now the focus is on elaboration.

Detail design involves implementation and testing.