64
© Bedir Tekinerdogan CS 411 - Software Architecture Design Roots, Definitions and Rationale Bedir Tekinerdogan Billkent University, Department of Computer Engineering e:mail - [email protected] http://www.cs.bilkent.edu.tr/~bedir/ Phone: (290)1258 Room: EA506

CS 411 - Software Architecture Design Roots, D efinitions and Rationale

  • Upload
    brosh

  • View
    50

  • Download
    8

Embed Size (px)

DESCRIPTION

CS 411 - Software Architecture Design Roots, D efinitions and Rationale. Bedir Tekinerdogan Billkent University, Dep artment of Computer Engineering e:mail - [email protected] http://www.cs.bilkent.edu.tr/~bedir/ Phone : (290)12 5 8 Room: EA50 6. Table of Contents. - PowerPoint PPT Presentation

Citation preview

Page 1: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

© Bedir Tekinerdogan

CS 411 - Software Architecture Design

Roots, Definitions and Rationale

Bedir Tekinerdogan

Billkent University,

Department of Computer Engineeringe:mail - [email protected]

http://www.cs.bilkent.edu.tr/~bedir/Phone: (290)1258Room: EA506

Page 2: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

2© Bedir Tekinerdogan

Table of Contents History of Structure in Software Engineering Definitions of Software Architecture Architecture in Software Development Life cycle Rationale for Software Architecture Design

Page 3: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

© Bedir Tekinerdogan

Part I – History of Structure in Software Engineering

Software Crisis

Software Engineering

Evolution of Structure concept in SE

Page 4: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

4© Bedir Tekinerdogan

Architecture is ... The underlying structure of things:

Buildings Vehicles Computers ... Software

Page 5: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

5© Bedir Tekinerdogan

Early Computers Evolved during the Second

World War. Basically needed for

mathematical calculations and code breaking.

Setting switches and plugging cables into sockets.

Von Neumann Architecture: program: set of instructions, stored in memory

www.computerhistory.org

Page 6: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

6© Bedir Tekinerdogan

First Programming Languages 1951-1960 Machine language (written in binary), machine

specific Assembly languages, symbolic instructions Use of a translator to translate the assembly

language into machine language.

Problem Concern: Computing and algorithms Solution Concern: Basic applications include

calculations; calculations are based on algorithms; algorithm is a step-by-step process that manipulates data.

Page 7: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

7© Bedir Tekinerdogan

Fortran, ALGOL and LISPFORTRAN (FORmula TRANslator), 1957 high-level language introduced variables, procedures, statement labels etc

ALGOL 60 (ALGOrithmic Language), 1958 Block structure, recursion, and a formal definition. ancestor of most contemporary languages

LISP (LIST Processor), 1960 symbolic processing for AI symbolic differentiation, integration and theorem verification

Page 8: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

8© Bedir Tekinerdogan

Evolution of applications More powerful computers

transistor IC

High Level Programming Languages ‘Normal’ business started to use computer Need for data processing applications in business

COBOL – COmmon Business Oriented Language, 1960 elaborate datastructures record type introduced for the first time

Page 9: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

9© Bedir Tekinerdogan

Abstract Data Types / Objects Simula 67 An extension of Algol 60 for simulation of concurrent

processes. Introduced the concept of classes and

encapsulation; forerunner of Smalltalk and C++.

Page 10: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

10© Bedir Tekinerdogan

Early history of computing... 1940s: First computers Problems: Numerical/algorithmic applications Method:

Programming languages, Machine Languages, Assembly Language

1950s: First programming languages Algol, Fortran, LISP, COBOL.

1960s: Problems got more complex: data intensive business applications…

‘Direct’ mapping of problem to solution,No systematic methodProblems are simple, algorithmic

Page 11: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

11© Bedir Tekinerdogan

Software Crisis

Software Late

Over Budget

Low Quality

Page 12: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

12© Bedir Tekinerdogan

Software Engineering

1968: NATO Conference on Software Engineering

Software Development should be based on ENGINEERING!

Page 13: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

13© Bedir Tekinerdogan

Dijkstra & Parnas: Structure Matters Dijkstra, 1968:

‘’...Correct arrangement of the structure of software systems before simple programming...‘’

Parnas, 1972: ‘’...selected criteria for the

decomposition of the system impact the structure of the programs and several design principles must be followed to provide a good structure...’’

Focused on Structure of Programming...

Edsger Dijkstra 1930-2002

Page 14: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

14© Bedir Tekinerdogan

Dijkstra - Layered Structures 1968 Operating Systems Layered Structure

Programs are grouped into layers Programs in one layer can only

communicate with programs in adjoining layers

Conceptual integrity Each layer has its own goal

with easier development and maintenance

E.W. Dijkstra, The structure of "THE"-multiprogramming system. Comm. ACM 11, 5 (May 1968), 341-346.

Page 15: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

15© Bedir Tekinerdogan

Parnas – Design principles Information-hiding modules (1972)

Identify design decisions that are likely to change Isolate these in separate modules (separation of concerns) Different design decisions might require different decompositions.

Software Structures (1974) Hierarchical structures (stepwise refinement) in programs

Program Families (1975) ‘’A program family is a set of programs for which it is profitable or

useful to consider as a group. ‘’D. Parnas, "On the Criteria to Be Used in Decomposing Systems into Modules.“, Comm. ACM 15, 12 (December 1972), 1053-1058. 1972.

D. Parnas, “On a ‘Buzzword’: Hierarchical Structure” IFIP Congress ‘74. North Holland Publishing Company, 1974 pp. 336-339

D. Parnas, “On the design and development of program families”IEEE Trans. On SE., vol. SE-2, pp.1-9, Mar. 1976

Page 16: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

16© Bedir Tekinerdogan

Structured Design Methods Aimed to develop structured programs By applying design principles

Information hiding Modularization Stepwise refinement Etc…

Page 17: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

17© Bedir Tekinerdogan

Object-Orientation In the beginning software was written without any

structure… … data and procedures were separated … data and procedures that belonged together were

put into subsystems (modules) … these subsystems were layered and finally objects encapsulated data for the sake

of structure.

Page 18: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

18© Bedir Tekinerdogan

Structure in Software 1960s - Structured Programming

Adopted into programming languages because it’s a better way to think about programming

1970s - Structured Design Methodology/guidelines for dividing programs into subroutines.

1980s – Modular programming languages Modular (object-based) programming

Grouping of sub-routines into modules with data.

1990s – Towards Software Architectures Object-Oriented Analysis/Design/Programming started being

commonly used Software Architecture Design

Page 19: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

19© Bedir Tekinerdogan

Structure in Software

Programming any-which-way

Programming in-the-world - software architecture

Programming in-the-large - object-oriented design - CASE tools - libraries

Programming in-the-small - information hiding, modularization

1950

1960

1970

1980

1990

2000

2010

APPROACH PROBLEMS SOLVED

Simple, algorithmic

Data intensive, business applications

Large, complex, distributed

Mega programs

Page 20: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

20© Bedir Tekinerdogan

Summary on Structure in History Increased consciousness on structure of software Structure idea did not stop at programming level but

moved up to design methods. This has finally culminated in Software Architecture Successfully applied in industry which have specific

architecture design teams/divisions. Software Architecture is a logical step in the

evolution of structure concept. Is one of the most fundamental concepts in software

engineering.

Page 21: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

21© Bedir Tekinerdogan

Very intuitive notion of software architecture Software Architecture represents the gross level

structure of a software system. Design : Implementation = Software Architecture : Design

Page 22: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

22© Bedir Tekinerdogan

Software Architecture - Example

<<Concept>>

Database

<<Concept>>

Database Manager

<<Concept>>

Query Manager

<<Concept>>

User Manager

<<Concept>>

Submission Manager

<<Concept>>

Ontology

<<Concept>>

Network Manager

<<Concept>>

Editor

AccessesApplies to

Uses Uses Uses

Uses

Adapts

Adapts

ConnectsConnects Connects

Software Architecture Design for Multi-User Biological Pathway Knowledge Acquisition and Inquiry Environment

Fatih Akgul, Caglar Gunel, Erhan Giral

Page 23: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

23© Bedir Tekinerdogan

Software Architecture - ExampleSoftware Architecture Design for Distributed Newsgroup System

Ali Çakmak Duygu UçarEren Aydın Tankut Barış Aktemur

Page 24: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

© Bedir Tekinerdogan

Part II - Definitions

What is a Software Architecture?

Page 25: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

25© Bedir Tekinerdogan

What is Software Architecture? Evolution of Software Architecture concept Resulted in different definitions in the history

Page 26: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

26© Bedir Tekinerdogan

Booch 1991 ”The Logical and physical structure of a system,

forged by all the strategic and tactical design decisions applied during development”

Architecture is high level structure of software system

Page 27: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

27© Bedir Tekinerdogan

Perry and Wolf 92 We distinguish three different classes of architectural

elements: processing elements; data elements; and connection elements. The processing elements are those components that supply the transformation on the data elements; the data elements are those that contain the information that is used and transformed; the connecting elements (which at times may be either processing or data elements, or both) are the glue that holds the different pieces of the architecture together.

explicitly considers the interpretation on the elements of software architecture

Page 28: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

28© Bedir Tekinerdogan

Garlan and Shaw 1993 ...beyond the algorithms and data structures of the computation;

designing and specifying the overall system structure emerges as a new kind of problem. Structural issues include gross organization and global control structure; protocols for communication, synchronization, and data access; assignment of functionality to design elements; physical distribution; composition of design elements; scaling and performance; and selection among design alternatives. This is the software architecture level of design.

This definition provides additional specializations of the structural issues.

Page 29: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

29© Bedir Tekinerdogan

Garlan 1995 The structure of the components of a

program/system, their interrelationships, and principles and guidelines governing their design and evolution over time.

design information in the architectural specification

Page 30: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

30© Bedir Tekinerdogan

Bass et al 98 The software architecture of a program or

computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships among them.

more than one structure and includes the behavior of the components as part of the architecture. The term component here is used as an abstraction of varying components.

Page 31: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

31© Bedir Tekinerdogan

Architecture:

Abstractions and their relations, which form a concept.

& relations

concept

abstractions

Architectures must have a well defined structure.

General definition

Page 32: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

32© Bedir Tekinerdogan

Concept:

A well-established definition within a given domain.

A concept is an essential abstraction, usable, andgenerally corresponds to an inherently complexstructure and/or behavior.

An abstraction of an architecture can also be an architecture (concept) thereby allowing hierarchicalarchitectural structures.

What is a concept?

Page 33: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

33© Bedir Tekinerdogan

Summary on Definitions Definition of Software Architecture Design has

evolved together with technical developments Gross Structure Specialization on definition of components Different structures

Different definitions but a common agreement on Architecture is structure including components and connections among these components

Concept of software architecture is important

Page 34: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

© Bedir Tekinerdogan

Part III – Architecture in the Software Development Life Cycle

Problem Solving

Architecture design and implementation

Page 35: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

35© Bedir Tekinerdogan

Engineering as Problem Solving

Problem

Solution

Software engineering

Page 36: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

36© Bedir Tekinerdogan

Problem

Solution

Software Engineering=Problem Solving

Phases

Requirements Analysis What? (client)

Analysis What? (domain)

Design How? (Detailed)

Implementation Do

Testing Test

Page 37: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

37© Bedir Tekinerdogan

Example: Student Registration System Application: Student Registration System

University consists of several departments. If students fulfill the requirements, students can enroll in the university. Every student can register/withdraw for/from a course.

Page 38: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

38© Bedir Tekinerdogan

Use Case Diagram

register for course

withdraw from course

Student

enroll in university

Page 39: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

39© Bedir Tekinerdogan

Student Registration Class Diagram

Computer Science

Electrical Engineering

Transcript

courseGrades

gradeForCourse()

Department

namedeaninstructorsstudents

...()

Course

namenumberdepartmentprerequisitecredit

Student

nametranscriptschedule

gradeInCourse()setId()getId()

Registrar

Page 40: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

40© Bedir Tekinerdogan

States of a Student

EnrollInClass ( Add a Transcript )

EnrolledApply [ Must be accepted first ]

Graduate [ All courses must be completed ]

AddCourseRegisteredWithdraw

Page 41: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

41© Bedir Tekinerdogan

theRegistrar aSection theTranscriptaStudent

state of prereqhave prereq

enrolled

enrollInSection:

return sections

getSectionsFor:

addStudent:

enrolled

takenCourse: prerequisite

takenCourse: prerequisite

Sequence Diagram: Registering for Course

Page 42: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

42© Bedir Tekinerdogan

Example – Java Implementationpublic class Student {

private String name;private int id;

public String getName (){

return name;}

public void setName (String str){

name = str; }

public int getId(){

return id; }

public void setId(int i){

id = i; }

}

Page 43: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

43© Bedir Tekinerdogan

Software Architecture

Where is Architecture

Design?

Page 44: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

44© Bedir Tekinerdogan

Software Architecture Design Phase

Problem

Solution

Requirements Analysis What? (client)

Analysis What? (domain, arch. comp)

Design How? (Detailed)

Implementation Do

Testing Test

Software Architecture What? (domain, gross-level)

Phases

Page 45: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

45© Bedir Tekinerdogan

Design, Realize and Test Architecture

Software Architecture Design

Requirements Analysis

Analysis & Design

Design

Realize (Implement)

Evaluate (Test)

Page 46: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

46© Bedir Tekinerdogan

Design, Realize and Test Architecture

Software Architecture Design

Requirements Analysis

Implementation

....... ....... ....... .......

public class Student {private String name;private int id;public String getName ()return name}public void setName (String str){name = str;}public int getId(){return id; }public void setId(int i){id = i; }}

Analysis & DesignComputer Science

Electrical Engineering

Transcript

courseGrades

gradeForCourse()

Department

namedeaninstructorsstudents

...()

Course

namenumberdepartmentprerequisitecredit

Student

nametranscriptschedule

gradeInCourse()setId()getId()

Registrar

theRegistrar aSection theTranscriptaStudent

state of prereqhave

prereqenroll

ed

enrollInSection:

return sections

getSectionsFor:

addStudent:

enrolled

takenCourse: prerequisite

takenCourse: prerequisite

Page 47: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

47© Bedir Tekinerdogan

Software Architecture Architecture is at a higher abstraction level of

software development than analysis and design. To comprehend the gross level structure of the

system it is necessary to design the architecture Realizing architecture implies mapping it to detailed

design.

Page 48: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

© Bedir Tekinerdogan

Part IV – Rationale for Software Architecture

Page 49: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

49© Bedir Tekinerdogan

Example – Conveyor Line Sorting System Design the software for a conveyor

sorting line system (CLSS) which sorts boxes moving along a conveyor line. Each box is identified by a bar code and is sorted into one of six bins at the end of the line. The boxes pass by a sorting station that contains a bar code reader and a PC. The sorting station PC is connected to a shunting mechanism that sorts the boxes into the bins.

Page 50: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

50© Bedir Tekinerdogan

Conveyor/Assembly Line

11000 1100011 1110011 0101111

Sorting Station

Shunt

Page 51: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

51© Bedir Tekinerdogan

Architecture Design CLSS

Software Architecture Design

Requirements Analysis

Analysis & Design

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Page 52: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

52© Bedir Tekinerdogan

Abstract Specification

--------------------------------------------------------------C O D E----------------------------------------- --------------------

Architecture represents a common high level abstract specification.

Abstraction helps to cope with complexity

Abstraction improves understanding of the software system.

Question is how to define the right architectural abstractions.

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Page 53: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

53© Bedir Tekinerdogan

Abstract Specification

Engine Chassis

Wheels Break

carries

rotates

stops

carries

carries

Page 54: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

54© Bedir Tekinerdogan

Stakeholder Communication

Stakeholder is any person who has interest in the architecture, i.e. analyst, designers, implementers, managers, testers etc.

Software architecture provides a common medium for communication among stakeholders

This will improve understanding/ development and maintenance of the system.

/

Page 55: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

55© Bedir Tekinerdogan

Guides development process Architecture is explicit Focus on Architectural

Components. Analyse and Design based

on architectural components.

Can predict performance

Software Architecture

/

DesignAnalysis Implementation

Computer Science

Electrical Engineering

Transcript

courseGrades

gradeForCourse()

Department

namedeaninstructorsstudents

...()

Course

namenumberdepartmentprerequisitecredit

Student

nametranscriptschedule

gradeInCourse()setId()getId()

Registrar

public class Student {private String name;private int id;public String getName ()return name}public void setName (String str){name = str;}public int getId(){

theRegistrar aSection theTranscriptaStudent

state of prereqhave

prereqenroll

ed

enrollInSection:

return sections

getSectionsFor:

addStudent:

enrolled

takenCourse: prerequisite

takenCourse: prerequisite

Page 56: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

56© Bedir Tekinerdogan

Refining Architecture

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Sort Algorithm

ComparisonCriteria

Range

Updating

Page 57: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

57© Bedir Tekinerdogan

Management of SE activities

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Page 58: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

58© Bedir Tekinerdogan

Large Scale Reuse Architectural description can be reused to produce

different systems.

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Report Formatting

Bar Code

Reader

SorterBar Code

Decoder

Actuator/Shunt Control

Database

Page 59: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

59© Bedir Tekinerdogan

Large Scale Reuse

Engine Chassis

Wheels Break

carries

rotates

stops

carries

carries

Car Architecture

Page 60: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

60© Bedir Tekinerdogan

Controls Impact of Change

DesignSoftware

ArchitectureProblem

understandingAnalysis

Program

Problem

Implementation

Page 61: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

61© Bedir Tekinerdogan

Controls Impact of Change

DesignSoftware

ArchitectureProblem

understandingAnalysis

Program

Problem

Implementation

Problem2

Program2

Requires changes to the analysis, design,and program

Page 62: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

62© Bedir Tekinerdogan

Control Impact of Change Architecture is at the higher abstraction level and includes the earliest design decisions Getting the right architecture will help to cope with

impact of changes.

Page 63: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

63© Bedir Tekinerdogan

Rationale for Software Architecture Improved understanding because of a higher level

abstract specification Guides construction since it embodies earliest

design decisions Supports stakeholder communication Support for large-grained reuse Enables to evaluate system before it is implemented Controls impact of change Management of software development activities

Page 64: CS 411 -  Software  Architecture Design Roots, D efinitions and Rationale

© Bedir Tekinerdogan

End

Questions…