Professional Documents
Culture Documents
door
manufacturer
model number
type
swing direction
inserts
lights
type
number
weight
opening mechanism
Data Abstraction:
This is a named collection of data that describes a data object
Procedural Abstraction
Instructions are given in a named sequence
Each instruction has a limited function
open
details of enter
algorithm
walk to door;
reach for knob;
open door; repeat until door opens
turn knob clockwise;
walk through; if knob doesn't turn, then
close door. take key out;
find correct key;
insert in lock;
endif
pull/push door
move out of way;
end repeat
Refactoring
• A reorganization technique that simplifies the design (or
internal code structure) of a component without changing its
function or external behaviour.
It can be represent by
• Data-centered architecture
• Data flow architecture
• Call and return architecture
• Object oriented architecture
• Layered architecture.
Data-centered architecture
Data-centered architecture
• A data store (e.g., a file or database) resides at the center of this
architecture and is accessed frequently by other components that
update, add, delete, or otherwise modify data within the store.
• Client software accesses a central repository which is in passive
state (in some cases).
• client software accesses the data independent of any changes to
the data or the actions of other client software.
• So, in this case transform the repository into a “Blackboard”.
• A blackboard sends notification to subscribers when data of
interest changes, and is thus active.
• Data-centered architectures promote integrability.
• Existing components can be changed and new client components
can be added to the architecture without concern about other
clients.
• Data can be passed among clients using the blackboard
mechanism. So Client components independently execute
processes
Data Flow architecture
Batch Sequential
Data Flow architecture
Common
Control
Loose
Stamp
Data
Uncoupled
Low
Data coupling
Sequential
Communicational
Procedural
Temporal
Logical
Coincidental Low
Functional Cohesion
Function A
Function B
Function C
Procedural
Related by order of functions
Examples of Cohesion-2
Function A Function A
Function B Function B
Function C Function C
Communicational Sequential
Access same data Output of one is input to another
Function A part 1
Function A part 2
Function A part 3
Functional
Sequential with complete, related functions