Unit 3 (Notes)
Unit 3 (Notes)
Def:- Software design is the process of envisioning and defining software solutions
to one or more sets of problems.
One of the main components of software design is the software requirements
analysis (SRA).
SRA is a part of the software development process that lists specifications used in
software engineering.
It is about being able to express ideas for your software with other
developers, other teams, and your clients.
Having a well-thought design makes your software easier to implement,
reduces a need for major changes later and saves you from headaches down
the line.
Software design is both a process and a model. The design process is a
sequence of steps that enables the designer to describe all aspects of the
software for building.
Ex:- operation systems, webpages, mobile devices or even the new cloud
computing paradigm.
Conceptual design and technical design:-
Conceptual Design Technical Design
It shows the conceptual model i.e, It shows the data flow and the
what should a system look like. structure of the data.
It also includes the process and sub- It includes the functioning and
processes besides the strategies. working of the conceptual design.
At the end of this phase, the solutions At the end of this phase, and after
to the problems are sent for review. analyzing the technical design, the
specification is initiated.
Modularity :-
Module Coupling:-
Coupling is the measure of the degree of interdependence between modules.
Module coupling means to couple two to more modules with each other
and with the outside world.
It generally represents how the modules are connected with another
module and the outside world. Coupling is related to cohesion
Types of Coupling:-
Data Coupling:
If the dependency between the modules is based on the fact that they
communicate by passing only data, then the modules are said to be data coupled. In
data coupling, the components are independent of each other and
communicate through data.
Stamp Coupling:
Two modules are stamp coupled if they communicate using
composite data items such as structure, objects, etc. When the module
passes non-global data structure or entire structure to another module,
they are said to be stamp coupled.
Control Coupling:
Control Coupling exists among two modules if data from one
module is used to direct the structure of instruction execution in
another.
External coupling:
External coupling occurs when two modules share an externally
imposed data format, communication protocol, or device interface. This
is basically related to the communication to external tools and devices.
Common coupling:
Common coupling is said to occur when several modules have
access to the same global data. External coupling occurs when two
modules share an externally imposed data format, communication
protocol, or device interface.
Content coupling:
Content coupling is said to occur when one module uses the code of
another module, for instance a branch. This violates information hiding –
a basic software design concept. Common coupling is said to occur
when several modules have access to the same global data.
Module Cohesion:-
Cohesion is a measure of the degree to which the elements of a module
are functionally related.In computer programming, cohesion defines to the
degree to which the elements of a module belong together. Thus, cohesion
measures the strength of relationships between pieces of functionality within a
given module. For example, in highly cohesive systems, functionality is
strongly related.
Types of cohesion:-
Functional cohesion:
Functional cohesion occurs when elements of a module are
grouped together because they are united for a single, well-defined
purpose. All of the elements in the module work together to fulfill that
purpose. Functional cohesion in a module is ideal and is the highest
type of cohesion.
Sequential cohesion:
Sequential cohesion is when parts of a module are grouped
because the output from one part is the input to another part like an
assembly line (e.g., a function which reads data from a file and
processes the data).
Procedural cohesion:
Procedural cohesion is when parts of a module are grouped
because they always follow a certain sequence of execution (e.g., a
function which checks file permissions and then opens the file).
Temporal Cohesion:
When elements of module are organized such that they are
processed at a similar point in time, it is called temporal cohesion.
Procedural cohesion - When elements of module are grouped together,
which are executed sequentially in order to perform a task, it is called
procedural cohesion.
EXTRA:
Design Notations:-
Design notations are largely meant to be used during the process
of design and are used to represent design or design decisions.For a
function oriented design, the design can be represented
Graphically or mathematically by the following:
Data flow diagrams
Data Dictionaries
Structure Charts
Structure Charts:-
Generalization in UML
In UML modeling, a generalization relationship is a relationship in
which one model element (the child) is based on another model
element (the parent). Generalization relationships are used in class,
component, deployment, and use-case diagrams to indicate that the
child receives all of the attributes, operations, and relationships that
are defined in the parent.
To comply with UML semantics, the model elements in a
generalization relationship must be the same type. For example, a
generalization relationship can be used between actors or between
use cases; however, it cannot be used between an actor and a use
case.
You can add generalization relationships to capture attributes,
operations, and relationships in a parent model element and then
reuse them in one or more child model elements. Because the child
model elements in generalizations inherit the attributes, operations,
and relationships of the parent, you must only define for the child the
attributes, operations, or relationships that are distinct from the parent.
2. Sequence Diagram:
4. Class Diagram:
The name of the diagram itself clarifies the purpose of the diagram and
other details. It describes different states of a component in a system. The
states are specific to a component/object of a system.
A Statechart diagram describes a state machine. State machine can be
defined as a machine which defines different states of an object and these
states are controlled by external or internal events.
Activity diagram explained in the next chapter, is a special kind of a
Statechart diagram. As Statechart diagram defines the states, it is used to
model the lifetime of an object
Statechart diagram describes the flow of control from one state to
another state. States are defined as a condition in which an object exists and
it changes when some event is triggered. The most important purpose of
Statechart diagram is to model lifetime of an object from creation to
termination.
The objects in sequence diagram is basic for state diagram.
Start state and stop state ===== this are pseudo state.
Stop state ==== Bulls eye
There is no need to massage for start & stop state
It have only one start state but many stop state
7. Deployment Diagram:
Nodes,processor and link between the nodes these are the main
component in deployment diagram.
Here solid line means Link.
Every node should contain name
Every link must technology === Technology is wired or wireless
but name must.
The deployment diagram visualizes the physical hardware on which
the software will be deployed. It portrays the static deployment view of a
system. It involves the nodes and their relationships.
Both the deployment diagram and the component diagram are closely
interrelated to each other as they focus on software and hardware
components. The component diagram represents the components of a
system, whereas the deployment diagram describes how they are actually
deployed on the hardware.