Unit2 SW
Unit2 SW
DESIGN CONCEPT
- Komal Singh
- Reference Book:
- Software Engineering -A Practitioner’s
Approach (Seventh Edition) - Roger S.
Pressman.
(Chapter 8,9,12 )
Introduction
• Mitch Kapor, the creator of Lotus 1-2-3, presented a
“software design manifesto” in Dr. Dobbs Journal. He
said:
• Good software design should exhibit:
• Firmness: A program should not have any bugs that
inhibit its function.
• Commodity: A program should be suitable for the
purposes for which it was intended.
• Delight: The experience of using the program should be
pleasurable one.
What is it?
• Design is what almost every engineer wants to do.
• It is the place where creativity rules—where stakeholder
requirements, business needs, and technical considerations
all come together in the formulation of a product or system.
• Design creates a representation or model of the software,
but unlike the requirements model (that focuses on
describing required data, function, and behavior), the
design model provides detail about software architecture,
data structures, interfaces, and components that are
necessary to implement the system.
• Who does it?
• Software engineers conduct each of the design tasks.
• Why is it important?
• Design allows you to model the system or product that
is to be built.
• This model can be assessed for quality and improved
before code is generated, tests are conducted, and end
users become involved in large numbers. Design is the
place where soft- ware quality is established.
• What are the steps?
• Design depicts the soft- ware in a number of different ways.
First, the architecture of the system or product must be
represented. Then, the interfaces that connect the software
to end users, to other systems and devices, and to its own
constituent components are modeled.
• Finally, the software components that are used to construct
the system are designed.
• Each of these views represents a different design action, but
all must conform to a set of basic design concepts that guide
software design work.
• What is the work product?
• A design model that encompasses architectural,
interface, component- level, and deployment
representations is the primary work product that is
produced during software design.
Design within the concept of
software Engineering
• “The most common miracle of software engineering is the
transition from analysis to design and design to code.”
• Software design sits at the technical kernel of software
engineering and is applied regardless of the software
process model that is used.
• Beginning once software requirements have been
analyzed and modeled, software design is the last
software engineering action within the modeling activity
and sets the stage for construction (code generation
and testing).
D s ig n mo d e l
Cont...
• Each of the elements of the requirements model provides in-
formation that is necessary to create the four design models required
for a complete specification of design.
• The flow of information during software design is illustrated in Figure.
• The data/class design :
• Transforms class models into design class realizations and the
requisite data structures required to implement the software.
• The objects and relationships defined in the CRC diagram and the
detailed data content depicted by class attributes and other notation
provide the basis for the data design action. Part of class design may
occur in conjunction with the design of software architecture. More
detailed class design occurs as each software component is designed.
Cont...
• The architectural design :
• Defines the relationship between major structural
elements of the software, the architectural styles and
design patterns that can be used to achieve the
requirements defined for the system, and the
constraints that affect the way in which architecture can
be implemented [Sha96].
• The architectural design representation the framework
of a computer-based system is derived from the
requirements model.
Cont...
• The interface design:
• describes how the software communicates with systems that
interoperate with it, and with humans who use it. An interface
implies a flow of information (e.g., data and/or control) and a
specific type of behavior.
• Therefore, usage scenarios and behavioral models provide much
of the information required for interface design.
• The component-level :design transforms structural elements of
the software architecture into a procedural description of
software components. Information obtained from the class-based
models, flow models, and behavioral models serve as the basis
for component design.
Cont...
• The importance of software design can be stated with a
single word quality.
• Design is the place where quality is fostered in software
engineering.
• Design provides you with representations of software that
can be assessed for quality.
• Design is the only way that you can accurately translate
stakeholder’s requirements into a finished software product
or system.
• Software design serves as the foundation for all the soft-
ware engineering and software support activities that follow.
Quick note of Design Model
• Data/Class design – transforms analysis classes
into implementation classes and data structures
• Architectural design – defines relationships among the
major software structural elements.
• Interface design – defines how software elements,
hardware elements, and end-users communicate.
• Component-level design – transforms structural
elements into procedural descriptions of
software components
The Design Process
• Software design is an iterative process through which requirements are
translated into a “blueprint” for constructing the software.
• Initially, the blueprint depicts a holistic view of software. That is, the design is
represented at a high level of abstraction— a level that can be directly traced
to the specific system objective and more detailed data, functional, and
behavioral requirements.
• The design must implement all of the explicit requirements contained in the
analysis model, and it must accommodate all of the implicit requirements
desired by the customer.
• The design must be a readable, understandable guide for those who generate
code and for those who test and subsequently support the software.
• The design should provide a complete picture of the software, addressing the
data, functional, and behavioral domains from an implementation perspective.
Quality Guidelines
• A design should exhibit an architecture that (1) has been
created using recognizable architectural styles or patterns, (2)
is composed of components that exhibit good design
characteristics and (3) can be implemented in an evolutionary
fashion.
• A design should be modular that is, the software should be
logically partitioned into elements or subsystems.
• A design should contain distinct representations of data,
architecture, interfaces, and components.
• A design should lead to data structures that are appropriate for
the classes to be implemented and are drawn from
recognizable data patterns.
• A design should lead to components that exhibit independent
functional characteristics.
• A design should lead to interfaces that reduce the complexity of
connections between components and with the external
environment.
• A design should be derived using a repeatable method that is
driven by information obtained during software requirements
analysis.
• A design should be represented using a notation that effectively
communicates its meaning.
• These design guidelines are not achieved by chance. They are
achieved through the application of fundamental design
principles, systematic methodology, and thorough review.
Design Principles
• The design process should not suffer from ‘tunnel
vision.’The design should be traceable to the analysis
model.The design should not reinvent the wheel.
• The design should “minimize the intellectual distance”
[DAV95] between the software and the problem as it
exists in the real world.
• The design should exhibit uniformity and
integration.The design should be structured to
accommodate change.The design should be structured
to degrade gently, even when aberrant data, events, or
operating conditions are encountered.
• Design is not coding, coding is not design.The design
should be assessed for quality as it is being created, not
after the fact.The design should be reviewed to
minimize conceptual (semantic) errors.From Davis
Fundamental Concepts of Design
Process
• Architecture—the overall structure of the software.
• Patterns—”conveys the essence” of a proven design
solution.
• Separation of concerns—any complex problem can be
more easily handled if it is subdivided into pieces.
• Modularity—compartmentalization of data and function.
• Hiding—controlled interfaces.
• Functional independence—single-minded function and low
coupling.
• Refinement—elaboration of detail for all abstractions.
Cont...
• Aspects—a mechanism for understanding how global
requirements affect design.
• Refactoring—a reorganization technique that simplifies
the design.
• OO design concepts—Appendix II.
• Design Classes—provide design detail that will enable
analysis classes to be implemented.
Architecture
• “The overall structure of the software and the ways in
which that structure provides conceptual integrity for a
system.” [SHA95a]Structural properties.
• This aspect of the architectural design representation
defines the components of a system (e.g., modules,
objects, filters) and the manner in which those
components are packaged and interact with one another.
• For example, objects are packaged to encapsulate both
data and the processing that manipulates the data and
interact via the invocation of methods
• Extra-functional properties:
• The architectural design description should address how
the design architecture achieves requirements for
performance, capacity, reliability, security, adaptability,
and other system characteristics.
• Families of related systems. The architectural design
should draw upon repeatable patterns that are commonly
encountered in the design of families of similar systems.
• In essence, the design should have the ability to reuse
architectural building blocks.
Patterns Design Pattern
Template
• Pattern name—describes the essence of the pattern in a
short but expressive name
• Intent—describes the pattern and what it does.
• Also-known-as—lists any synonyms for the pattern.
• Motivation—provides an example of the problem.
• Applicability—notes specific design situations in which
the pattern is applicable.
• Structure—describes the classes that are required to
implement the pattern
• Participants—describes the responsibilities of the
classes that are required to implement the pattern.
• Collaborations—describes how the participants
collaborate to carry out their responsibilities.
• Consequences—describes the “design forces” that
affect the pattern and the potential trade-offs that must
be considered when the pattern is implemented.
• Related patterns—cross-references related design
patterns.
Separation of Concerns
• Any complex problem can be more easily handled if it is
subdivided into pieces that can each be solved and/or
optimized independently.
• A concern is a feature or behavior that is specified as
part of the requirements model for the softwareBy
separating concerns into smaller, and therefore more
manageable pieces, a problem takes less effort and
time to solve.
Modularity
• "modularity is the single attribute of software that allows a
program to be intellectually manageable" [Mye78].Monolithic
software (i.e., a large program composed of a single module)
cannot be easily grasped by a software engineer.
• The number of control paths, span of reference, number of
variables, and overall complexity would make understanding
close to impossible.
• In almost all instances, you should break the design into
many modules, hoping to make understanding easier and as
a consequence, reduce the cost required to build the
software.
Functional Independence
• Functional independence is achieved by developing modules with "single-
minded" function and an "aversion" to excessive interaction with other
modules.
• Cohesion is an indication of the relative functional strength of a module.
• A cohesive module performs a single task, requiring little interaction with other
components in other parts of a program. Stated simply, a cohesive module
should (ideally) do just one thing.
• Coupling is an indication of the relative interdependence among modules.
• Coupling depends on the interface complexity between modules, the point at
which entry or reference is made to a module, and what data pass across the
interface.
• Note: Need to Read all From chapter No.8 (8.2.1 to
8.3.12)
Software Architecture
• What is it?
• Architectural design represents the structure of data and
program components that are re- quired to build a computer-
based system.
• It considers the architectural style that the system will take, the
structure and properties of the components that constitute the
system, and the interrelationships that occur among all
architectural components of a system.
• Ever since the first program was divided into modules,
software systems have had architectures, and programmers
have been responsible for the interactions among the modules
and the global properties of the assemblage.
Cont...
• Historically, architectures have been implicit accidents
of implementation, or legacy systems of the past.
• Good software developers have often adopted one or
several architectural patterns as strategies for system
organization, but they use these patterns informally and
have no means to make them explicit in the resulting
system.
Why is Architecture Important?
• Pattern name—describes the essence of the pattern in a short but expressive name
• Problem—describes the problem that the pattern addresses
• Motivation—provides an example of the problem
• Context—describes the environment in which the problem resides including application domain
• Forces—lists the system of forces that affect the manner in which the problem must be solved;
includes a discussion of limitation and constraints that must be considered
• Solution—provides a detailed description of the solution proposed for the problem
• Intent—describes the pattern and what it does
• Collaborations—describes how other patterns contribute to the solution
• Consequences—describes the potential trade-offs that must be considered when the pattern
is implemented and the consequences of using the pattern
• Implementation—identifies special issues that should be considered when implementing the
pattern
• Known uses—provides examples of actual uses of the design pattern in real applications
• Related patterns—cross-references related design patterns
Pattern-Based Design
• Whole UI. Provide design guidance for top-level structure and navigation throughout the
entire interface.
• Page layout. Address the general organization of pages (for Websites) or distinct screen
displays (for interactive applications)
• Forms and input. Consider a variety of design techniques for completing form-level
input.
• Tables. Provide design guidance for creating and manipulating tabular data of all kinds.
• Direct data manipulation. Address data editing, modification, and transformation.
• Navigation. Assist the user in navigating through hierarchical menus, Web pages, and
interactive display screens.
• Searching. Enable content-specific searches through information maintained within a
Web site or contained by persistent data stores that are accessible via an interactive
application.
• Page elements. Implement specific elements of a Web page or display screen.
• E-commerce. Specific to Web sites, these patterns implement recurring elements of e-
commerce applications.
WebApp Patterns
THANK YOU