Unit4 - Software Architectur&Desing
Unit4 - Software Architectur&Desing
Software Architecture
Architecture serves as a blueprint for a system. It provides an
abstraction to manage the system complexity and establish a
communication and coordination mechanism among components.
Architecture View :
It is generally used to represent entire architecture that is useful and
meaningful to one or more stakeholders in system. Architecture view or
viewpoint is set of representations of an architecture that covers
stakeholder issues. It also represents functional and non-functional
requirements of software application. View is basically partial expression
of system from specific perspective. A viewpoint is generally collection of
patterns, templates, and even conventions for developing one type of
view.
Design View –
A design view generally means to organize design information and
addresses basic structure and also functionality of solution. It simply
explains architecturally important and significant features. It is used to
organize design information. It also describes overall design entities and
attributes.
Process View –
It generally deals with dynamic aspects of system, describes processes of
system, and even how they communicate and emphasizes behavior of
system during run time. It simply describes different activities of system. It
also describes control thread relationships between components of design
and deployment views. It also describes synchronization aspects of the
design.
Component View –
It addresses source code realization of system software from perspective of
integrators and developers of project. It simply explains structure and design
of implementation set. It has basically three different views i.e. conventional
view, process-related view, and also object-oriented view.
Deployment View –
It generally explains distribution of processing across set of nodes in system,
along with physical distribution of processes and fields. It simply explains
structure and design of deployment set. It also shows physical distribution of
processing within system. It basically describes and explains environment
within which system is runner and executed.
Component and Connector View
A C&C view of the system defines the components, and which component is
connected to which and through what connector. A C&C view describes a
runtime structure of the system—what components exist when the system is
executing and how they interact during the execution. The C&C structure is
essentially a graph, with components as nodes and connectors as edges. C&C
view is perhaps the most common view of architecture and most box-and-line
drawings representing architecture attempt to capture this view.
Components:-
Connectors: -
Architectural styles :
The architectural styles that are used while designing the software as
follows:
1. Data-centered architecture
The data store in the file or database is occupying at the center of the
architecture.
Store data is access continuously by the other components like an update,
delete, add, modify from the data store.
Data-centered architecture helps integrity.
Pass data between clients using the blackboard mechanism.
The processes are independently executed by the client components.
2. Data-flow architecture
This architecture is applied when the input data is converted into a series of
manipulative components into output data.
A pipe and filter pattern is a set of components called as filters.
Filters are connected through pipes and transfer data from one component to
the next component.
The flow of data degenerates into a single line of transform then it is known as
batch sequential.
4. Object-oriented architectures
5. Layered architectures
The different layers are defined in the architecture. It consists of outer and
inner layer.
The components of outer layer manage the user interface operations.
Components execute the operating system interfacing at the inner layer.
The inner layers are application layer, utility layer and the core layer.
In many cases, It is possible that more than one pattern is suitable and the
alternate architectural style can be designed and evaluated.
Function Oriented Design :
Function Oriented Design is an approach to software design where the design
is decomposed into a set of interacting units where each unit has a clearly
defined function.
Generic Procedure:
Start with a high level description of what the software / program does. Refine
each part of the description one by one by specifying in greater details the
functionality of each part. These points lead to Top-Down Structure.
2. Data Dictionaries:
Data dictionaries are simply repositories to store information about all data
items defined in DFDs. At the requirement stage, data dictionaries contains
data items. Data dictionaries include Name of the item, Aliases (Other
names for items), Description / purpose, Related data items, Range of
values, Data structure definition / form.
3. Structure Charts:
It is the hierarchical representation of system which partitions the system
into black boxes (functionality is known to users but inner details are
unknown). Components are read from top to bottom and left to right. When a
module calls another, it views the called module as black box, passing
required parameters and receiving results.
Pseudo Code:
Pseudo Code is system description in short English like phrases describing
the function. It use keyword and indentation. Pseudo codes are used as
replacement for flow charts. It decreases the amount of documentation
required.
Principles of Software Design:
Software design principles are concerned with providing means to
handle the complexity of the design process effectively. Effectively
managing the complexity will not only reduce the effort needed
for design but can also reduce the scope of introducing errors
during design.
1Problem Partitioning
For small problem, we can handle the entire problem at once but for the
significant problem, divide the problems and conquer the problem it means
to divide the problem into smaller pieces so that each piece can be
captured separately.
For software design, the goal is to divide the problem into manageable
pieces.
1. Functional Abstraction
2. Data Abstraction
Functional Abstraction
i. A module is specified by the method it performs.
ii. The details of the algorithm to accomplish the functions are not
visible to the user of the function.
Data Abstraction
Details of the data elements are not visible to the users of data. Data
Abstraction forms the basis for Object Oriented design approaches.
3.Modularity
Advantages of Modularity
Disadvantages of Modularity
4.Strategy of Design
1. Top-down Approach
2. Bottom-up Approach
]
Coupling and Cohesion
Module Coupling
In software engineering, the coupling is the degree of
interdependence between software modules. Two modules that are
tightly coupled are strongly dependent on each other. However, two
modules that are loosely coupled are not dependent on each
other. Uncoupled modules have no interdependence at all within
them.
A good design is the one that has low coupling. Coupling is measured
by the number of relations between the modules. That is, the coupling
increases as the number of calls between modules increase or the
amount of shared data is large. Thus, it can be said that a design with
high coupling will have more errors.
Types of Module Coupling
Module Cohesion
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.
Data-flow diagrams are a useful and intuitive way of describing a system. They
are generally understandable without specialized training, notably if control
information is excluded. They show end-to-end processing. That is the flow of
processing from when data enters the system to where it leaves the system
can be traced.
Data-flow design is an integral part of several design methods, and most CASE
tools support data-flow diagram creation. Different ways may use different
icons to represent data-flow diagram entities, but their meanings are similar.
Data Dictionaries
A data dictionary lists all data elements appearing in the DFD model of a
system. The data items listed contain all data flows and the contents of all data
stores looking on the DFDs in the DFD model of a system.
A data dictionary lists the objective of all data items and the definition of all
composite data elements in terms of their component data items. For
example, a data dictionary entry may contain that the data grossPay consists
of the parts regularPay and overtimePay.
grossPay = regularPay + overtimePay
For the smallest units of data elements, the data dictionary lists their name
and their type.
Structured Charts
It partitions a system into block boxes. A Black box system that functionality is
known to the user without the knowledge of internal design.
Structured Chart is a graphical representation which shows:
Pseudo-code
Pseudo-code notations can be used in both the preliminary and detailed
design phases. Using pseudo-code, the designer describes system
characteristics using short, concise, English Language phases that are
structured by keywords such as If-Then-Else, While-Do, and End.
Design specifications are precise and complete enough to be
used as a basis for further development by other
programmers. They provide:
Object-Oriented Design
In the object-oriented design method, the system is viewed as a collection of
objects (i.e., entities). The state is distributed among the objects, and each
object handles its state data. For example, in a Library Automation Software,
each library representative may be a separate object with its data and
functions to operate on these data. The tasks defined for one purpose cannot
refer or change data of other objects. Objects have their internal data which
represent their state. Similar objects create a class. In other words, each object
is a member of some class. Classes may inherit features from the superclass.