An Introduction to Software Architecture Case Studies

Содержание

Слайд 2

KWIC

Key Word In Context (KWIC)


Search index
searching for keywords with context sensitive display
provides

KWIC Key Word In Context (KWIC) ● Search index searching for keywords
the user with more information

Слайд 3

Example



Clouds are white Ottawa is beautiful

Input: Titles Output: Index







are white Clouds beautiful Ottawa

Example ● ● Clouds are white Ottawa is beautiful Input: Titles Output:
is Clouds are white is beautiful Ottawa Ottawa is beautiful white Clouds are

Слайд 4

Solution 1

Main Program/Subroutine with Shared Data



Functional decomposition Components are subroutines
Master Control


Input

Circular

Solution 1 Main Program/Subroutine with Shared Data ● ● Functional decomposition Components
Shift

Output

Alphabetizer

Characters

Index

Alphabetized Index

Input Medium

Output Medium

Subprogram Call Direct Memory Access System I/O

Слайд 5

Solution 1

Strengths



Centralized data
– efficient representation of data
Modular decomposition

Weaknesses


Resistant to change
consider the impact of

Solution 1 Strengths ● ● Centralized data – efficient representation of data
data storage format
difficult to enhance the overall functionality
reuse of component is difficult

Слайд 6

Solution 2

Abstract Data Types



Similar to one with data encapsulation
data access via component

Solution 2 Abstract Data Types ● ● Similar to one with data
interface invocation
no direct data access
Components similar to solution 1

Слайд 7

Solution 2

Abstract Data Types

Master Control

Input

Characters

Output

Alphabetic Shifts

Input Medium

Output

Medium

Subprogram Call

System I/O

Circular Shift

setchar

char

word

word

setup
setchar char

alph

i-th

Solution 2 Abstract Data Types Master Control Input Characters Output Alphabetic Shifts

Слайд 8

Solution 2

Advantages



Handles change well
algorithm and data are encapsulated in individual modules
Reuse
modules interact

Solution 2 Advantages ● ● Handles change well algorithm and data are
via defined interfaces

Disadvantages


Evolution still a problem
– to add new features may require changes to existing or addition of new components

Слайд 9

Solution 3

Implicit Invocation



Similar to solution 1
shared data
Two main differences
data is more abstract
underlying

Solution 3 Implicit Invocation ● ● Similar to solution 1 shared data
storage is not exposed to components
components are invoked implicitly
e.g. when a line is added

Слайд 10

Solution 3

Master Control

Input

Circular Shift

Output

Alphabetizer

Input Medium

Output Medium

Subprogram call Implicit invocation System I/O

Lines

insert

delete

i -th

Lines

insert

delete

i

Solution 3 Master Control Input Circular Shift Output Alphabetizer Input Medium Output
-th

Calls to circular shift and alphabetizer are implicit, and are the result of inserting lines

Слайд 11

Solution 3

Advantages


Strong evolution path
functional enhancements are easy
new components can be attached and

Solution 3 Advantages ● Strong evolution path functional enhancements are easy new
removed
components are shielded from data storage representation


REALLY WHY?
Minimal component coupling/dependency
– data events are the source of all interactions

Слайд 12

Solution 3

Disadvantages



Difficult to control the ordering of processing Requires more storage capacity
– IS

Solution 3 Disadvantages ● ● Difficult to control the ordering of processing
THIS REALLY A DISADVANTAGE?

Слайд 13

Solution 4

Pipes & Filters


Four filters
input, shift, alphabetize, output
each filter can compute when

Solution 4 Pipes & Filters ● Four filters input, shift, alphabetize, output
data is available at the input
data sharing is restricted by pipes

Input

Circular Shift

Output

Alphabetizer

Input Medium

Output Medium

pipe

System I/O

Слайд 14

Solution 4

Advantages




Intuitive flow of processing Reuse
Evolution
– new filters can be easily added

Solution 4 Advantages ● ● ● Intuitive flow of processing Reuse Evolution

Слайд 15

Solution 4

Disadvantage




Virtually impossible to support an interactive system
Is this a true pipes

Solution 4 Disadvantage ● ● ● Virtually impossible to support an interactive
& filters?
– consider the data flow
What is the LCD data unit?

Слайд 16

Comparison

Comparison
Имя файла: An-Introduction-to-Software-Architecture-Case-Studies.pptx
Количество просмотров: 22
Количество скачиваний: 0