AMJ Unit 3
AMJ Unit 3
Software Design
Design Concept
• The software design concept simply means the idea or principle behind the design.
• It describes how you plan to solve the problem of designing software, the logic, or
thinking behind how you will design software.
• It allows the software engineer to create the model of the system or software or
product that is to be developed or built.
• The software design concept provides a supporting and essential structure or model
for developing the right software.
There are many concepts of software design and some of them are
given below:
Abstraction
• Abstraction simply means to hide the details to reduce complexity and increases
efficiency or quality.
• Different levels of Abstraction are necessary and must be applied at each stage of the
design process so that any error that is present can be removed to increase the
efficiency of the software solution and to refine the software solution.
• The lower level of abstraction provides a more detail description of the solution.
• The architecture is the structure of program modules where they interact with each
other in a specialized way.
• The more detailed design activities are conducted from the framework.
Pattern- a repeated form
• The pattern simply means a repeated form or design in which the same shape is
repeated several times to form a pattern.
• The pattern in the design process means the repetition of a solution to a common
recurring problem within a certain context.
Modularity- subdivide the system
• Modularity simply means dividing the system or project into smaller parts to reduce
the complexity of the system or project.
• In the same way, modularity in design means subdividing a system into smaller parts
so that these parts can be created independently and then use these parts in different
systems to perform different functions.
• It is necessary to divide the software into components known as modules because
nowadays there are different software available like Monolithic software that is hard
to grasp for software engineers.
• So, modularity in design has now become a trend and is also important.
• If the system contains fewer components then it would mean the system is complex
which requires a lot of effort (cost) but if we are able to divide the system into
components then the cost would be small.
Information Hiding- hide the information
• Information hiding simply means to hide the information so that it cannot be accessed
by an unwanted party.
1. Cohesion
• Cohesion is an extension of the information hiding concept.
• A cohesive module performs a single task and it requires a small interaction with the
other components in other parts of the program.
2. Coupling
• Coupling is an indication of interconnection between modules in a structure of
software.
Refinement- removes impurities
• Refinement simply means to refine something to remove any impurities if present and
increase the quality.
• The refinement concept of software design is actually a process of developing or
presenting the software or system in a detailed manner that means to elaborate a system
or software.
• Refinement is very necessary to find out any error if present and then to reduce it.
Refactoring- reconstruct something
• Refactoring simply means reconstructing something in such a way that it does not
affect the behavior of any other features.
• The system should always keep users informed about what is going on, through
appropriate feedback within reasonable time.
Cont...
2. Match between system and the real world.
• The system should speak the user's language, with words, phrases and concepts familiar to
the user, rather than system-oriented terms.
• Follow real-world conventions, making information appear in a natural and logical order.
Uses
• Data-Centered Architecture is also commonly used in other domains such as
healthcare (patient records and monitoring), e-commerce (customer data and
product information), Stock Trading System(The system needs to handle a
massive amount of real-time data, including stock prices, trade orders, and market
news)
2. Data Flow Architecture
• Data Flow Architecture is a software architectural style that emphasizes the flow of data
within a system.
• It is often used in the design of systems that need to process and transform data as it moves
through different components or modules.
• In Data Flow Architecture, the system is modeled as a series of data transformations, and the
focus is on how data is input, processed, and output.
• The figure represents pipe-and-filter architecture since it uses both pipe and filter and it has
a set of components called filters connected by lines.
• Pipes are used to transmitting data from one component to the next.
• Each filter will work independently and is designed to take data input of a certain form and
produces data output to the next filter of a specified form.
• The filters don’t require any knowledge of the working of neighboring filters.
Eg: Data Flow Architecture
3] Call and Return architectures:
II. Main program or Subprogram architectures: The main program structure decomposes
into number of subprograms or function into a control hierarchy. Main program
contains number of subprograms that can invoke other components.
Eg: Call And Return Architecture
4] Object Oriented architecture:
• The components of a system encapsulate data and the operations that must
be applied to manipulate the data.
• The coordination and communication between the components are
established via the message passing.
• An architecture in which everything (processes, files, I/O operations, etc.) is
represented as an object.
Layered architectures
• A number of different layers are defined with each layer performing a well-defined set of
operations.
• Each layer will do some operations that becomes closer to machine instruction set
progressively.
• At the outer layer, components will receive the user interface operations and at the inner
layers, components will perform the operating system interfacing(communication and
coordination with OS).
• 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.
Diagram: Layered Architecture
Architectural design
• The architectural design starts then the developed software is put into
the context.
• The information is obtained from the requirement model and other
information collect during the requirement engineering.
Representing the system in context
All the following entities communicates with the target system through the interface that is small rectangles
shown in above figure
Superordinate system
• These system use the target system like a part of some higher-level processing scheme.
Subordinate system
• This systems is used by the target system and provide the data mandatory to complete target
system functionality.
Peer-level system
• These system interact on peer-to-peer basis means the information is consumed by the target
system and the peers.
Actors
• These are the entities like people, device which interact with the target system by consuming
information that is mandatory for requisite processing.
Defining Archetype
• An archetype is a class or pattern which represents a core abstraction i.e critical to
implement or design for the target system.
• A small set of archetype is needed to design even the systems are relatively complex.
• The target system consists of archetype that represent the stable elements of the
architecture.
• Archetype is instantiated in many different forms based on the behavior of the system.
• In many cases, the archetype is obtained by examining the analysis of classes defined as a
part of the requirement model.
Scenario based Modeling
Writing use cases:
Use case captures the interactions that occur between producers
and consumers of information and the system itself.
Defining Operations:
Class Responsibility Collaborator (CRC)
Modeling
The cards are divided into three sections. Along the top of the card
you write the name of the class. In the body of the card you list the
class responsibilities on the left and the collaborators on the right.
Dependencies: In many instances, a client-server relationship
exists between two analysis classes.
Functional Independence
•Redundancy.
•Unused design elements.
•Inefficient or unnecessary algorithms.
•Poorly constructed or inappropriate data structures.
•Or any other design failure.
Design Model
The process dimension indicates the evolution of the design
model as design tasks are executed as part of the software
process.
These drawings depict wiring and plumbing within each room, the
location of electrical receptacles and wall switches, sinks,
showers, tubs, drains, cabinets, and closets.
Architectural Patterns:
Define overall structure of software.
Indicate relationship among subsystems and software components.
Defines rules for specifying relationships among elements.
Design Patterns:
Specify aggregation of components to solve.
Relationship among components.
Component to component communication mechanism.
Idioms:
Language specific pattern implemented as algorithms.
Interface protocols.
Mechanism for communication among components.
Framework
•A framework is skeleton with collection of “plug
points”