Top Banner
An Introduction to An Introduction to Software Software Architecture Architecture Software Engineering Lab. Software Engineering Lab. Summer 2006 Summer 2006
32

An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Dec 28, 2015

Download

Documents

Amy Richards
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

An Introduction to An Introduction to Software ArchitectureSoftware Architecture

Software Engineering Lab.Software Engineering Lab.

Summer 2006Summer 2006

Page 2: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

DefinitionDefinition

The software architecture of a The software architecture of a program or computing system is program or computing system is the the structurestructure or structures of the or structures of the system, which comprise software system, which comprise software elementselements, the , the externally visible externally visible propertiesproperties of those elements, and of those elements, and the the relationshipsrelationships among them among them..

Page 3: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Who influences SA?Who influences SA?

Page 4: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Summary: Influences on the Summary: Influences on the ArchitectArchitect

Page 5: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Why is architecture Why is architecture important?important?

►Handling complexityHandling complexity►Communication among stakeholdersCommunication among stakeholders►Early Design DecisionsEarly Design Decisions►SA is a transferable, reusable modelSA is a transferable, reusable model

Page 6: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Software Architecture Software Architecture DocumentDocument

1.1. Introduction          Introduction          2.2. Architectural RepresentationArchitectural Representation 3.3. Architectural Goals and Constraints    Architectural Goals and Constraints    4.4. Use-Case View Use-Case View 5.5. Logical ViewLogical View6.6. Process View Process View 7.7. Deployment View Deployment View 8.8. Implementation View Implementation View 9.9. Data View (optional)        Data View (optional)        10.10. Size and Performance                Size and Performance                11.11. Quality                Quality               

Page 7: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Architectural PatternsArchitectural Patterns : Definition

An architectural style or pattern is a description of the component and

connector types involved in the style the collection of rules that constrain and

relate them

Page 8: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Model-View-Controller► Context

Provides a flexible structure for developing interactive applications.

► Problem User interfaces are subject to changes. As new features are

added to the system, the UI must provide appropriate command and menus to handle them.

Different platforms support different ‘look and feel’ standards; the UI must be portable.

Different kind of users may expect different data format from the UI (bar char, spreadsheet etc.).

► Solution Divide the system into three parts: processing, output, and

input: Model: contains the processing and the data involved. View: presents the output; each view provides specific

presentation of the same model. Controller: captures user input (events-> mouse clicks,

keyboard input etc.). Each view is associated to a controller, which captures user input.

Page 9: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Model-View-Controller► Main goal:

facilitate and optimize the implementation of interactive systems, particularly those that use multiple synchronized presentations of shared information.

► Key idea: separation between the data and its presentation, which is carried

by different objects.► Controllers typically implement event-handling mechanisms that are

executed when corresponding events occur.► Changes made to the model by the user via controllers are directly

propagated to corresponding views. The change propagation mechanism can be implemented using the observer (design) pattern.

Page 10: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

A Stock Trading Application

Page 11: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.
Page 12: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Layered Pattern

►Context You are working with a large, complex system and

you want to manage complexity by decomposition.►Problem

How do you structure an application to support such operational requirements as maintainability, scalability, extensibility, robustness, and security?

►Solutions Compose the solution into a set of layers. Each

layer should be cohesive and at Roughly the same level of abstraction. Each layer should be loosely coupled to the layers underneath.

Page 13: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Layered Pattern

► Layering consists of a hierarchy of layers, each providing service to the layer above it and serving as client to the layer below.

► Interactions among layers are defined by suitable communication protocols.

► Interactions among non-adjacent layers must be kept to the minimum possible.

► Layering is different from composition higher-layers do not encapsulate lower layers lower layers do not encapsulate higher layers

(even though there is an existence dependency)

Page 14: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Three-Layered Pattern► Context

You are building a business solution using layers to organize your application.

► Problem How do you organize your application to reuse business

logic, provide deployment flexibility and conserve valuable resource connections?

► Solutions Create three layers: presentation, business logic and

data access. Locate all database-related code, including database

clients access and utility components, in the data access layer.

Eliminate dependencies between business layer components and data access components.

Either eliminate the dependencies between the business layer and the presentation layer or manage them using the Observer pattern.

Page 15: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.
Page 16: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Software Architecture Software Architecture DocumentDocument

1.1. Introduction          Introduction          2.2. Architectural Representation Architectural Representation 3.3. Architectural Goals and Architectural Goals and

ConstraintsConstraints        4.4. Use-Case View Use-Case View 5.5. Logical ViewLogical View6.6. Process View Process View 7.7. Deployment View Deployment View 8.8. Implementation View Implementation View 9.9. Data View (optional)        Data View (optional)        10.10. Size and Performance                Size and Performance                11.11. Quality                Quality               

Page 17: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Architectural Goals and Architectural Goals and Constraints    Constraints   

►The architecture will be formed by considering: functional requirements, captured in the Use-

Case Model, and non-functional requirements, quality att.

►However these are constraints imposed by constraints imposed by the environment in which the software must the environment in which the software must operateoperate that will shape the architecture : : need to reuse existing assetsneed to reuse existing assets imposition of various standardsimposition of various standards need for compatibility with existing systemsneed for compatibility with existing systems

Page 18: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Software Architecture Software Architecture DocumentDocument

1.1. Introduction          Introduction          2.2. Architectural Representation Architectural Representation 3.3. Architectural Goals and Constraints    Architectural Goals and Constraints    4.4. Use-Case View Use-Case View 5.5. Logical ViewLogical View6.6. Process View Process View 7.7. Deployment View Deployment View 8.8. Implementation View Implementation View 9.9. Data View (optional)   Data View (optional)             10.10. Size and Performance                Size and Performance                11.11. QualityQuality                               

Page 19: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Architectural Structures and Architectural Structures and ViewsViews

In construction, there are In construction, there are blueprintsblueprints of of Plan , Different sides of construction , Electrical wiring , Plan , Different sides of construction , Electrical wiring ,

Plumbing, …Plumbing, …

Each of these views specifies a single entity (i.e. the Each of these views specifies a single entity (i.e. the construction) from a different perspective (used by a construction) from a different perspective (used by a different person, for a different goal).different person, for a different goal).

Similarly there are different structures and views in Similarly there are different structures and views in SA.SA.

► View is a representation of software architecture View is a representation of software architecture based on an structure as written by the architect and based on an structure as written by the architect and read by stakeholders (an instance of the structure)read by stakeholders (an instance of the structure)

► SA is documented by a number of views.SA is documented by a number of views.

Page 20: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

The “4+1” Views of Architecture

Page 21: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Use-case ViewUse-case View►Contains only architecturally significant use

cases (whereas the final use case model contains all the use cases). The logical view is derived using the use cases

identified in the architectural view of the use case model.

►Architecturally significant use cases: critical use cases, those that are most important to

the users of the system (from a functionality perspective)

use cases that carry the major risks use cases that have the most important quality

requirements, such as performance, security, usability, etc.

Page 22: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Use-case View : ExampleUse-case View : Example

Page 23: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Logical ViewLogical View

► The Logical View is a subset of the The Logical View is a subset of the Design Design ModelModel which presents architecturally which presents architecturally significant design elements significant design elements

► describes the most important classesdescribes the most important classes► their organization in packages and their organization in packages and

subsystemssubsystems► organization of these packages and organization of these packages and

subsystems into layerssubsystems into layers► It also describes the most important use-It also describes the most important use-

case realizations, for example, the dynamic case realizations, for example, the dynamic aspects of the architecture aspects of the architecture

Page 24: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Logical View : Class DiagramLogical View : Class Diagram

Page 25: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Logical View : Collaboration Logical View : Collaboration Diagram Deposit Use caseDiagram Deposit Use case

Page 26: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Logical View : Package Logical View : Package DiagramDiagram

Page 27: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Process View

►Consists of the processes and threads that form the system’s concurrency and synchronization mechanisms, as well as their interactions

Page 28: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Deployment ViewDeployment View

►This section describes one or more physical This section describes one or more physical network (hardware) configurations on which network (hardware) configurations on which the software is deployed and run. the software is deployed and run.

Page 29: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Implementation View Implementation View

►Describes the organization of static software modules (source code, data files, executables, documentation etc.) in the development environment in terms of Packaging and layering

►Are modeled using UML Component Diagrams.►UML components are physical and replaceable

parts of a system that conform to and provide the realization of a set of interfaces

Page 30: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Software Architecture Software Architecture DocumentDocument

1.1. Introduction          Introduction          2.2. Architectural Representation Architectural Representation 3.3. Architectural Goals and Constraints    Architectural Goals and Constraints    4.4. Use-Case View Use-Case View 5.5. Logical ViewLogical View6.6. Process View Process View 7.7. Deployment View Deployment View 8.8. Implementation View Implementation View 9.9. Data View (optional)        Data View (optional)        10.10. Size and Performance                Size and Performance                11.11. QualityQuality                               

Page 31: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

Size and Performance Size and Performance 

► The number of key elements the system will have to The number of key elements the system will have to handle (the number of concurrent online users for handle (the number of concurrent online users for an airline reservation system, …)an airline reservation system, …)

► The key performance measures of the system, such The key performance measures of the system, such as average response time for key eventsas average response time for key events

Most of these qualities are captured as Most of these qualities are captured as requirements; they are presented here because requirements; they are presented here because they shape the architecture in significant ways and they shape the architecture in significant ways and warrant special focus. For each requirement, warrant special focus. For each requirement, discuss how the architecture supports this discuss how the architecture supports this requirement.requirement.

Page 32: An Introduction to Software Architecture Software Engineering Lab. Summer 2006.

QualityQuality

►Operating performance requirements, Operating performance requirements, such as such as mean-time between failure mean-time between failure (MTBF). (MTBF).

►Quality targets, such as "no unscheduled Quality targets, such as "no unscheduled down-time" down-time"

►Extensibility targets, such as "the Extensibility targets, such as "the software will be upgradeable while the software will be upgradeable while the system is running". system is running".

►Portability targets, such as hardware Portability targets, such as hardware platforms, operating systems, languagesplatforms, operating systems, languages