software engineering - chp5- software architecture

26
MedTech Chapter 5 – Software Architecture How to define the architecture of your software product Dr. Lilia SFAXI www.liliasfaxi.wix.com/liliasfaxi Slide 1 MedTech – Mediterranean Institute of Technology CS321-Software Engineering MedTech

Upload: lilia-sfaxi

Post on 12-Apr-2017

98 views

Category:

Technology


0 download

TRANSCRIPT

MedTech

Chapter 5 – Software Architecture

How to define the architecture of your software product

Dr. L i l ia SFAXIwww. l i l iasfax i .wix .com /l i l iasfax i

S l id e 1

MedTech – Mediterranean Institute of TechnologyCS321-Software Engineering

MedTech

MedTech

SOFTWARE ARCHITECTURE - DEFINITIONSoftware Architecture

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 2

MedTech

Software Architecture

• Architecture• « Architecture is the fundamental organization of a system, embodied in its

components, their relationships to each other and the environment, and the principles governing its design and evolution. » [ANSI/IEEE Std 1471-2000]

• Software Architecture• « The software architecture of a program or computing system is the

structure or structures of the system, which comprise software elements, the externally visible properties of those elements, and the relationshipsamong them. »[SEI]

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 3

Software Architecture - Definition

MedTech

Software Architecture

• Mainly: Architecture Defines Structure• Decomposition of system into :

• Software Elements• Elements are captured as abstractions

• Correspond to high level system modules or components

• Component interfaces• External visible properties of elements

• Describe element features exposed to others

• Typically represent services provided to other elements

• Component responsibilities• What does a component precisely do?

• Relationships of elements• How do elements interact with others?

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 4

Software Architecture - Definition

MedTech

Software Architecture Structures Examples

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 5

Software Architecture - Definition

Modules Components and Connections

MedTech

Software Architecture Structures Examples

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 6

Software Architecture - Definition

Distribution

MedTech

Structures from Multiple Views

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 7

Software Architecture - Definition

• Large software systems require structures from multiple perspectives (views)• A single view is not sufficient to address all the requirements

• Examples of views• Context View

• Focuses on the system’s functionality

• Deployment View• Reflects the physical deployment of software components to computing

hardware

MedTech

Analogy : Building Architecture Views

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 8

Software Architecture - Definition

2D Front View

Floor Plan View

Room Plan View

MedTech

Why Using Software Architecture?

• Crucial changes in software engineering have increased the importance of architecture• Scale

• Distribution

• Security

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 9

Software Architecture - Definition

Minimally Distributed System

Highly Distributed System

MedTech

A Good Software Architecture…

• Considers for the system:• The functional requirements• The non functional requirements• The entire system lifecycle

• Helps us understand the system:• Divides the system meaningfully• Abstract complicated details

• Provides the framework for:• Realization• Project Planning • Project Organization

• Integrate all the development artefacts• Provide documentation

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 10

Software Architecture - Definition

MedTech

Software Architect

The ideal Software Architect should be a man of letters, a mathematician, familiar with historical studies, a dilifent

student of philosophy, acquainted with music, not ignorant of medicine, learned in the responses of juriconsults, familiar with

astronomy and astronomical calculations.

Vitrivus (Roman author, architect and civil engineer, during the 1st century BC)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 11

Software Architecture - Definition

MedTech

Software Architect and Others

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 12

Software Architecture - Definition

MedTech

SOFTWARE ARCHITECTURE PATTERNSSoftware Architecture

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 13

MedTech

Architectural Patterns

• An architectural pattern in a proven structural organization schema for software systems

• Architectural Patterns vs Design Patterns (already seen in chapter 4)• Design Patterns offer a common solution for a common problem in the form

of classes working together• Smaller in scale than architectural patterns, where the components are

subsystems rather than classes

• Design Patterns do not influence the fundamental structure of a system• Only affect a single subsystem

• They may help implementing an architectural pattern

• Some (not all) architectural patterns are described here-after

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 14

Software Architecture Patterns

MedTech

Pattern 1: Layers Pattern

• Helps structure applications that can be decomposed into groups of subtasks, each of which is at a particular level of abstraction

• Each layer provides services to the next higher layer• Services in a layer are implemented using services from the next lower

layer• Service requests are frequently done by using synchronus procedure

calls

• Most famous example of layered systems: networking protocols

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 15

Software Architecture Patterns

MedTech

Pattern 1: Layers Pattern (Example 1)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 16

Software Architecture Patterns

Networking Protocol(OSI Model)

MedTech

Pattern 1: Layers Pattern (Example 2)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 17

Software Architecture Patterns

MedTech

Pattern 2: Client-Server Pattern

• A server component provides services to multiple client components• A client component requests services from the server component

• Servers are permanently active, listening for clients• Client and server may reside in different machines

• This pattern can be considered as a form of the layered pattern withtwo layers, the clients being the higher level and the server the lowerlevel

• Examples• Remote database access

• Remote file systems access• Web-based applications (browsers request from a web server)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 18

Software Architecture Patterns

MedTech

Pattern 2: Client-Server Pattern (Example)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 19

Software Architecture Patterns

MedTech

Pattern 3: Master-Slave Pattern

• Supports fault-tolerance and parallel computation

• The master component distributes the work among identical slave components, and computes a final result from the results they return

• Applied for instance in :• Process control

• Embedded systems

• Large scale parallel computations• Fault-tolerant systems

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 20

Software Architecture Patterns

MedTech

Pattern 3: Master-Slave Pattern (Example)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 21

Software Architecture Patterns

MedTech

Pattern 4: Pipe-Filter Pattern

• Provides a structure for systems that produce a stream of data• Each processing step is encapsulated in a filter component

• Data is passed through pipes• Pipes can be used for buffering or for synchronization

• This pattern divides the task of a system into several processing steps

• The steps are connected by the data flow• The output of a step is the input for the next step

• Common examples: • Pipe-filter in the unix shell commands

• cat fi le | grep xyz | sort | uniq > out

• Compilers

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 22

Software Architecture Patterns

MedTech

Pattern 4: Pipe-Filter Pattern (Example)

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 23

Software Architecture Patterns

Compiler

MedTech

Pattern 5: MVC Pattern

• Model-View-Controller Pattern• An interactive application is divided into three parts:

• Model• Contains core fundtionality and data

• View• Displays the information to the user

• Controller• Handles the input from the user

• Often uses the Observer design pattern• User input can invoke a change in the model, and in the displayed view

• Makes it easy to have multiple views of the same model

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 24

Software Architecture Patterns

MedTech

Pattern 5: MVC Pattern

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 25

Software Architecture Patterns

MedTech

Pattern 5: MVC Pattern

Dr. L i l ia SFAXI www. l i l iasfax i .wix .com /l i l iasfax i

S l id e 26

Software Architecture Patterns