Se Unit4 Software Engineering
Se Unit4 Software Engineering
UNIT 4
ARCHITECTURAL DESIGN
Architectural design is a process for identifying the sub-systems making up a system and the
framework for sub-system control and communication. The output of this design process is a
description of the software architecture. Architectural design is an early stage of the system
design process. It represents the link between specification and design processes and is often
carried out in parallel with some specification activities. It involves identifying major system
components and their communications.
Systems in the same domain often have similar architectures that reflect domain concepts.
Application product lines are built around a core architecture with variants that satisfy particular
customer requirements. The architecture of a system may be designed around one of
more architectural patterns/styles, which capture the essence of an architecture and can be
instantiated in different ways.
The particular architectural style should depend on the non-functional system requirements:
Architectural views
Each architectural model only shows one view or perspective of the system. It might show how a
system is decomposed into modules, how the run-time processes interact or the different ways in
which system components are distributed across a network. For both design and documentation,
you usually need to present multiple views of the software architecture.
4+1 view model of software architecture:
A logical view, which shows the key abstractions in the system as objects or object
classes.
A process view, which shows how, at run-time, the system is composed of interacting
processes.
A development view, which shows how the software is decomposed for
development.
A physical view, which shows the system hardware and how software components
are distributed across the processors in the system.
Related using use cases or scenarios (+1).
Architectural patterns
Patterns are a means of representing, sharing and reusing knowledge. An architectural
pattern is a stylized description of a good design practice, which has been tried and
tested in different environments. Patterns should include information about when they are
and when the are not useful. Patterns may be represented using tabular and graphical
descriptions.
Layered architecture
Repository architecture
Name Repository
All data in a system is managed in a central repository that is accessible to all
Description system components. Components do not interact directly, only through the
repository.
You should use this pattern when you have a system in which large volumes of
information are generated that has to be stored for a long time. You may also use
When used
it in data-driven systems where the inclusion of data in the repository triggers an
action or tool.
Components can be independent--they do not need to know of the existence of
other components. Changes made by one component can be propagated to all
Advantages
components. All data can be managed consistently (e.g., backups done at the
same time) as it is all in one place.
The repository is a single point of failure so problems in the repository affect the
Disadvantages whole system. May be inefficiencies in organizing all communication through the
repository. Distributing the repository across several computers may be difficult.
Client-server architecture
Distributed system model which shows how data and processing is distributed across
a range of components, but can also be implemented on a single computer.
Set of stand-alone servers which provide specific services such as printing, data
management, etc.
Set of clients which call on these services.
Network which allows clients to access servers.
Name Client-server
In a client-server architecture, the functionality of the system is organized into
Description services, with each service delivered from a separate server. Clients are users of
these services and access servers to make use of them.
Used when data in a shared database has to be accessed from a range of locations.
When used Because servers can be replicated, may also be used when the load on a system is
variable.
The principal advantage of this model is that servers can be distributed across a
Advantages network. General functionality (e.g., a printing service) can be available to all
clients and does not need to be implemented by all services.
Each service is a single point of failure so susceptible to denial of service attacks
or server failure. Performance may be unpredictable because it depends on the
Disadvantages
network as well as the system. May be management problems if servers are
owned by different organizations.
A system context is a structural model (e.g., a class diagram) that demonstrates the other
systems in the environment of the system being developed.
An interaction model is a dynamic model (e.g., a use case diagram + structured natural
language description) that shows how the system interacts with its environment as it is used.
data sent are the maximum, minimum, and average ground and air temperatures; the
maximum, minimum, and average air pressures; the maximum, minimum, and
average wind speeds; the total rainfall; and the wind direction as sampled at five-
minute intervals.
The weather information system establishes a satellite communication link with the
Stimulus
weather station and requests transmission of the data.
Response The summarized data is sent to the weather information system.
Weather stations are usually asked to report once per hour but this frequency may
Comments
differ from one station to another and may be modified in the future.
Architectural design
Once interactions between the system and its environment have been understood, you use this
information for designing the system architecture. You identify the major components that
make up the system and their interactions, and then may organize the components using an
architectural pattern (e.g. a layered or client-server model).
Identifying object classes is often a difficult part of object oriented design. There is no 'magic
formula' for object identification. It relies on the skill, experience
and domain knowledge of system designers. Object identification is an iterative process. You are
unlikely to get it right first time. Approaches to object identification include:
Use a scenario-based analysis. The objects, attributes and methods in each scenario
are identified.
Design models
Design models show the objects and object classes and relationships between these
entities. Static models describe the static structure of the system in terms of object classes and
relationships. Dynamic models describe the dynamic interactions between objects.
Subsystem models show logical groupings of objects into coherent subsystems. These are
represented using a form of class diagram with each subsystem shown as a package with
enclosed objects. Subsystem models are static (structural) models.
Sequence models show the sequence of object interactions. These are represented using a UML
sequence or a collaboration diagram. Sequence models are dynamic models.
State machine models show how individual objects change their state in response to events.
These are represented in the UML using state diagrams. State machine models are dynamic
models. State diagrams are useful high-level models of a system or an object's run-time behavior.
Interface specification
Object interfaces have to be specified so that the objects and other components can be designed
in parallel. Designers should avoid designing the interface representation but should hide this in
the object itself. Objects may have several interfaces which are viewpoints on the methods
provided. The UML uses class diagrams for interface specification but Java may also be used.
Design patterns
A design pattern is a way of reusing abstract knowledge about a problem and its solution. A
pattern is a description of the problem and the essence of its solution. It should be sufficiently
abstract to be reused in different settings. Pattern descriptions usually make use of object-
oriented characteristics such as inheritance and polymorphism.
Design pattern elements:
Name
A meaningful pattern identifier
Problem description
A common situation where this pattern is applicable
Solution description
Not a concrete design but a template for a design solution that can be instantiated in
different ways
Consequences
The results and trade-offs of applying the pattern
Example: the Observer pattern
Implementation issues
1 REUSE :
From the 1960s to the 1990s, most new software was developed from scratch, by writing all code
in a high-level programming language. The only significant reuse or software was the reuse of
functions and objects in programming language libraries.
Levels of reuse:
The abstraction level: don't reuse software directly but use knowledge of successful
abstractions in the software design.
The object level: directly reuse objects from a library rather than writing the code
yourself.
The component level: components (collections of objects and object classes) are
reused in application systems.
The system level: entire application systems are reused.
Costs of reuse:
The costs of the time spent in looking for software to reuse and assessing whether or
not it meets your needs.
Where applicable, the costs of buying the reusable software. For large off-the-shelf
systems, these costs can be very high.
The costs of adapting and configuring the reusable software components or systems
to reflect the requirements of the system that you are developing.
The costs of integrating reusable software elements with each other (if you are using
software from different sources) and with the new code that you have developed.
2. Configuration management
Configuration management is the name given to the general process of managing a changing
software system.
Configuration management activities include:
Problem tracking, where support is provided to allow users to report bugs and other
problems,
3. Host-target development
Most software is developed on one computer (the host, development platform), but runs on a
separate machine (the target, execution platform). A platform is more than just hardware; it
includes the installed operating system plus other supporting software such as a database
management system or, for development platforms, an interactive development environment
(IDE). Development platform usually has different installed software than execution platform;
these platforms may have different architectures. Mobile app development (e.g. for Android) is a
good example.
Typical development platform tools include:
An integrated compiler and syntax-directed editing system that allows you to create,
edit and compile code.
A language debugging system.
Graphical editing tools, such as tools to edit UML models.
Testing tools, such as JUnit that can automatically run a set of tests on a new version
of a program.
Project support tools that help you organize the code for different development proje