Professional Documents
Culture Documents
LEVEL DESIGN
OBJECTIVES:
WHAT IS A COMPONENT?
DESIGNING CLASS BASED COMPONNETS
CONSTRUCTING COMPONNET LEVEL DESIGN
DESIGNING CONVENTIONAL COMPONENTS
• Component level design defines the data structures, algorithms,
interface, characteristics and communication mechanisms allocated to
each and every component.
• A complete set of software components are defined during the
architectural design.
But internal data structures and processing details of each component
Component:
A component is a modular, deployable and replaceable part of a
system that encapsulates implementation and exposes set of
interfaces.
A software component is a modular building block for
computer software.
The meaning of the component will differ depending
upon the point of view software engineer who use it.
Three important view are
An object oriented view
A process related view
Conventional view
An object oriented view of a component
component level design for object oriented system cohesion implies that a
Utility cohesion
Components, classes, or operations that exists within the same category are grouped together.
Temporal cohesion
Operations that are performed to reflect a specific behavior or state are grouped together.
Procedural cohesion
Components are grouped to allow one can be invoked immediately after
the preceding one was invoked with or without passing data
Communicational cohesion
All operations that access the same data are defined within one class.
Sequential cohesion
Components or operations are grouped in a manner that allows the first
to provide input to the next and so on.
Layer cohesion
This type of cohesion occurs when a higher level layer accesses the
services of a lower layer, but lower level layers do not access higher level
layer services
Functional cohesion
This cohesion occurs when a module performs one and only one function.
Coupling:
Coupling is a qualitative measure of the degree to which classes are
connected to one another.
As classes become more interdependent coupling increases.
An important objective in component level design is to keep
coupling as low as possible.
The following are the different types of coupling.
Data coupling
Occurs when long strings of arguments are passed between components
Stamp coupling
Occurs when Class B is declared as a type of argument of operation of a Class A
Control coupling
Occurs when operation A() invokes operation B() and passes control to B().
External coupling:
Occurs when a component communicates or collaborates with infrastructure
component (e.g., database, operating system functions)
Common coupling :
Occurs when several components make use of a global variable
Content coupling
Occurs when one component modifies the data that is internal to another
component.
Routine call coupling:
Occurs when one operation invokes another operations.