0% found this document useful (0 votes)
26 views

Software Design Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Software Design Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Design modularity

Broadly speaking, modularity is the degree to which a


system's components may be separated and recombined, often
with the benefit of flexibility and variety in use.[1] The concept of
modularity is used primarily to reduce complexity by breaking a
system into varying degrees of interdependence and
independence across and "hide the complexity of each part
behind an abstraction and interface."[2] However, the concept of
modularity can be extended to multiple disciplines, each with
their own nuances. Despite these nuances, consistent themes
concerning modular systems arise.[3]

● modularity refers to a logical partitioning of the


"software design" that allows complex software to be
manageable for the purpose of implementation and
maintenance. The logic of partitioning may be based on
related functions, implementation considerations, data
links, or other criteria.
Complexity in software systems
1. Some software systems are not complex. Such systems are
usually specified, constructed, maintained and used by the
same person a programmer/ developer working in isolation.
2. Such systems are crude, have a very specific purpose and have
a short lifetime.
3. Such software’s are generally replaced by a new software when
the requirements change and the new functionalities have to
be added to the existing system
4. In comparison an Industrial strength software is more robust
and has a long lifetime.
5. Such software’s are more dependable and have a number of
users who depend on their working. Examples of such
softwares are railway reservations systems, air traffic routing
systems, banking software’s, insurance software’s.
6. An industrial strength software is complex and it is beyond the
human mind to comprehend all the software.
7. Understanding the software can be made simple but that does
not mean the complexity of the software will go away.

So, Software engineers have to deal with complexity and the


following methods or techniques may be applied for overcoming the
complexity and understanding the systems. The following steps also
lead to making a good software design.

Five attributes of a complex system


1. Hierarchic Structure
Frequently a complex system is composed of subsystems and
further sub subsystems. And ultimately the we reach simplest
component.
2. Relative primitives
Primitive components make up a system. The choice of
primitive components is relatively at the discretion of the
observer/designer of the system.
3. Separation of Concerns
Hierarchy systems are decomposable that is they can be divided
into smaller decomposable parts which may be independent or
nearly independent. The intracomponent dependency within
the component is high compared to the intercomponent
dependency for working of a system. Called Cohesion and
Coupling respectively.
The cohesion within the components has to be very high and
the coupling between the components has to be lower. This
help in development and studying each component in isolation.
4. Common Patterns
Hierarchic systems are generally made up of a few kind of
subsystems in various combinations and arrangements.
Complex systems have their own common patterns. Example
Animal Cell and Plant cells
5. Stable Intermediate Forms
Complex systems have evolved from very simple systems and
has worked successfully. A complex system that is patched up to
work and has not/will never work, ultimately, we have to make
a simple system and make it work, evovle.

Design will help the system to evolve.

The canonical form of a complex system

There are two different kinds of hierarchy while studying a


system. For example, an aircraft may be studied by
decomposing it into propulsion system, flight control system
and so on. This hierarchy is called part of hierarchy.
The second hierarchy is the is-a hierarchy. For example saving
banks account is-a kind of a bank account, sedan is a kind of a
car.

So both the hierarchy has-a, is-a are important from the


perspectives of hierarchies class structure and object structures
of the system.

The Limitations of the Human Mind


The human mind is not able deal with remembering more than
5 to 7 things at a time. This is due to the short term memory
problem.

Also we are also not able to comprehend things very fast.


So there is a design solution.

Software design in software engineering


1.Decomposition of the problem into smaller sub problems
The technique of mastery of complexity has been known since time.
When designing a complex system it is essential to decompose it into
smaller parts each of which can be further refined independently.
Role of decomposition
Algorithmic decomposition
one of the products of structured design a structure chart. It shows
the relationship between various functional decomposition.
Object oriented decomposition
The system will consist of interacting objects. These objects will be
instantiated from classes. Objects communicate with each other with
the help of messages
Top down Structured design
It is the oldest and most traditional. It does not address Issues of data
abstraction and information hiding. Does not provide a means of
dealing with concurrency. It also does not scale up to an extremely
complex system.
This system cannot be implemented with object based or object-
oriented languages.
Data driven design
Mapping of inputs to outputs derive the structure of the system. It
has been implemented for a number of complex domains. Less
effective for time critical systems.
Object Oriented Design
Models systems as a collection of co-operating system of objects.
Treats objects as instances of a class within the hierarchy of classes.

The Role of Abstraction


Abstraction is the fundamental way of humans dealing with
abstraction. As per Dahl, Dijkstra and Hoare suggest the abstraction
arises from a recognition of similarities between certain objects,
situations or processes in the real world,
Shaw defines an abstraction as a simplified description or
specification of a system that emphasizes systems details that are
significant to the reader or user. An abstraction denotes the essential
characteristics of an object that distinguishes it from all other objects
and thus provides the crisp boundaries, which are relative to the
viewer.
The useful abstractions from objects which closely model problem
domain entities to objects which really have no reason for existence
are as the following
1. Entity abstraction
An object that represents a useful model of a problem
domain or solution domain entity.
2. Action abstraction
An object that provides a generalised set of operations all
of which perform the same kind of function.
3. Virtual Machine abstraction
An object that groups operations that are all used by
some superior level of control or operations that all use
some junior level set of operations.
4. Coincidental abstraction
An object that packages a set of operations that have no
relation to each other. We have to strive to build entity
abstraction because they directly parallel the vocabulary
of a given domain.

All abstractions have static as well as dynamic properties.


For example, a file object takes up a certain space on a
particular memory device, it has a name as well as it has
contents, these are static properties.

The value in these properties is dynamic relative to the


lifetime of the object. A file object may grow or shrink in
size its name may change the contents will change.

In an object oriented style of programming things happen


whenever we operate on an object, ( ie when we send a
message to an object ). Thus, invoking an operation on an
object elicits some reaction from the object. When
operations we can meaningfully perform on an object and
how that object reacts constitute the entire behaviour of
the object.

The Role of Encapsulation


Abstraction and encapsulation are complementary
concepts. Abstraction focuses on the observable behaviour of an
object. Whereas encapsulation focuses on the implementation that
gives rise to this behaviour. Encapsulation is most often achieved
through the information hiding which is the process of hiding all the
secrets of an object that do not contribute to its essential
characteristics: typically, the structure of an object is hidden as well
as its implementation of its methods
Abstraction helps people to think about what they are doing
encapsulations allows the programs changes to be reliably made with
limited effort. This provide a main ability in the system
The meaning of Modularity
The act of partitioning the system into individual components can
reduce the complexity to some degree. High cohesion and low data
coupling lead to a modular design
The meaning of Design
The design encompasses the disciplined approach to invent a
solution for some problem. Purpose of a design is to construct a
system
1. Satisfies a given functional specification
2. Confirms to limitation of the target medium
3. Meets implicit or explicit requirements on performance and
resource usage.
4. Satisfies a design criteria on an artifact
5. Satisfies the restrictions on the design process.

Software design concerns the decomposition of s system into the


constituent parts. A good design is a key to successful implementation
and evolution of a system. A number of guiding principles underlie
the main design. Unlike the more classical design fields there is no
visual link between the design representation of a software system
and the ultimate product.

This complicates the communication of the design knowledge and


raises the importance of design representation. Design has a both
product and process aspect, At the global level there are very little
process guidance and the result is very much determined by the
experience of the designer. The representation is the main
communication between the designer and the other stakeholders.
There is no universal design method. The design process is a creative
one and the quality and expertise of the designers are critical
determinant for its success. The single most important property of
software design is information hiding. It exemplifies how abstraction
applies to design. Five properties that are information hiding,
complexity, modularity, abstraction affect the system structure.
Assessment of the design with respect to these properties allows us to
get an impression of design quality. Heuristics and design metrics are
specifically aimed at quality of object oriented design.

Reference :
The notes have been complied form the NPTEL Lectures on Object
oriented Design by Dr. Partha Pratim Das
Also certain material is take from the text book
Object oriented Analysis and Design with Applications by Grady
Booch, Robert A Maksimchuk, Michael W, Engle, Bobbi J, Young, Jim
Conallen, Kellia A. Houstan
Slides for cohesion and coupling have been referred from the
following book and the above link for the ppts
Software Engineering Principles and Practices By Hans Van Vliet
Wikipedia

You might also like