2. IntroductionIntroduction
► Once the step of analysis is completed (i.e. requirementsOnce the step of analysis is completed (i.e. requirements
engineering is done) we have to perform the design activity.engineering is done) we have to perform the design activity.
► Design is the first technical activity (other two are codingDesign is the first technical activity (other two are coding
and testing) required to build.and testing) required to build.
► Design is a meaningful engineering representation ofDesign is a meaningful engineering representation of
something that is to be built.something that is to be built.
► There are two major phases of design processThere are two major phases of design process
DiversificationDiversification
Convergence.Convergence.
► Diversification is the acquisition of the raw materials ofDiversification is the acquisition of the raw materials of
design e.g. design of question paper (all possible questions),design e.g. design of question paper (all possible questions),
design of house (building material, fixtures) etc.design of house (building material, fixtures) etc.
► Convergence thus the creation of the final product.Convergence thus the creation of the final product.
3. IntroductionIntroduction
► Encompasses the set of principles, concepts, and practicesEncompasses the set of principles, concepts, and practices
that lead to the development of a high quality systemthat lead to the development of a high quality system
► Design principles guides the designer to perform the work.Design principles guides the designer to perform the work.
► Design concepts must be understood before the mechanicsDesign concepts must be understood before the mechanics
of design practice are appliedof design practice are applied
► Goal of design engineering is to produce a model withGoal of design engineering is to produce a model with
Bug freeBug free
Suitable for its intended usesSuitable for its intended uses
Easy to useEasy to use
4. Design within the context of Software EngineeringDesign within the context of Software Engineering
► Each of the elements of the analysis model providesEach of the elements of the analysis model provides
information that is necessary to create the 4 designinformation that is necessary to create the 4 design
models.models.
Component
level design
Interface design
Architectural design
Data/Class Design
5. ► Component level designComponent level design
It transforms structural elements of the softwareIt transforms structural elements of the software
architecture into a procedural descriptions ofarchitecture into a procedural descriptions of
software components.software components.
Information obtained from class-based models, flowInformation obtained from class-based models, flow
based models and behavioral models serve as thebased models and behavioral models serve as the
basis for the design.basis for the design.
► Interface designInterface design
It describes how the software communicates withIt describes how the software communicates with
the system and also with the humans.the system and also with the humans.
It implies the flow of information and a specific typeIt implies the flow of information and a specific type
of behavior.of behavior.
Scenarios and behavioral models provide much ofScenarios and behavioral models provide much of
the information required for the design.the information required for the design.
6. ► Architectural designArchitectural design
It defines the relationship between major structuralIt defines the relationship between major structural
elements of the software, the architectural styles &elements of the software, the architectural styles &
design patterns that can be used.design patterns that can be used.
The framework can be derived from the systemThe framework can be derived from the system
specification, the analysis model & the interaction ofspecification, the analysis model & the interaction of
the subsystems defined within the analysis model.the subsystems defined within the analysis model.
► Data Class designData Class design
It transforms the analysis-class models into designIt transforms the analysis-class models into design
class realizations and the requisite data structuresclass realizations and the requisite data structures
required to implement the software.required to implement the software.
The classes & their relationship and the detailedThe classes & their relationship and the detailed
data content depicted by class attributes providesdata content depicted by class attributes provides
the basis for design activity.the basis for design activity.
7. Design Process and Design QualityDesign Process and Design Quality
►Software design is an iterative process, in whichSoftware design is an iterative process, in which
requirements are translated into blueprint.requirements are translated into blueprint.
►Initially the design is represented at a high level ofInitially the design is represented at a high level of
abstraction (generalization, concept, idea)abstraction (generalization, concept, idea)
►After refinement, it leads to lower level ofAfter refinement, it leads to lower level of
abstraction.abstraction.
►Design has direct impact on quality.Design has direct impact on quality.
►The final software should assess the quality.The final software should assess the quality.
8. Design Process and Design QualityDesign Process and Design Quality
Characteristics to guide good design:Characteristics to guide good design:
► Implement allImplement all
Explicit requirements - from analysis modelExplicit requirements - from analysis model
Implicit requirements - desired by the customerImplicit requirements - desired by the customer
► Design must be readable and understandable guideDesign must be readable and understandable guide
for thosefor those
who generate codewho generate code
test componentstest components
or support the systemor support the system
► Provide a complete picture (data, function,Provide a complete picture (data, function,
behavior) from an implementation perspectivebehavior) from an implementation perspective
9. Design Process and Design QualityDesign Process and Design Quality
Design Quality Guidelines:Design Quality Guidelines:
A design shouldA design should
1.1. exhibit good architectural structureexhibit good architectural structure
2.2. be modular – software should be logically partitioned into elementsbe modular – software should be logically partitioned into elements
or subsystemsor subsystems
3.3. contain distinct representations of data, architecture, interfaces, andcontain distinct representations of data, architecture, interfaces, and
components (modules)components (modules)
4.4. lead to data structures that are appropriate for the objects to belead to data structures that are appropriate for the objects to be
implemented and be drawn from recognizable design patternsimplemented and be drawn from recognizable design patterns
5.5. lead to components that exhibit independent functionallead to components that exhibit independent functional
characteristicscharacteristics
6.6. lead to interfaces that reduce the complexity of connections betweenlead to interfaces that reduce the complexity of connections between
modules and with the external environmentmodules and with the external environment
7.7. be derived using a repeatable method that is driven by informationbe derived using a repeatable method that is driven by information
obtained during software requirements analysisobtained during software requirements analysis
8.8. Be represented by using notations that communicates its meaningBe represented by using notations that communicates its meaning
10. Design Process and Design QualityDesign Process and Design Quality
Quality attributes -FURPS Quality Factors:Quality attributes -FURPS Quality Factors:
1.1. Functionality : is assessed by evaluating the capabilities of theFunctionality : is assessed by evaluating the capabilities of the
program. The generality of the functions are deliveredprogram. The generality of the functions are delivered
2.2. Usability: Considering the human factors, overall consistency andUsability: Considering the human factors, overall consistency and
documentationdocumentation
3.3. Reliability:Reliability:
- Measuring the frequencyMeasuring the frequency
- Severity of failureSeverity of failure
- Accuracy of outputAccuracy of output
- Ability to recover the failureAbility to recover the failure
- EfficiencyEfficiency
4.4. Performance: Measured by processing speed, response time,Performance: Measured by processing speed, response time,
resource consumption and efficiencyresource consumption and efficiency
5.5. Supportability:Supportability:
Ability to extend the program (extensibility, adaptability,Ability to extend the program (extensibility, adaptability,
serviceability) represents maintainabilityserviceability) represents maintainability
11. Design ConceptsDesign Concepts
1.1. Abstraction :Abstraction :
- Allows designers to focus on solving a problem- Allows designers to focus on solving a problem
- Without being concerned about irrelevant lower level- Without being concerned about irrelevant lower level
detailsdetails
- Higher level abstraction – broad description- Higher level abstraction – broad description
- Lower level abstraction – detailed description- Lower level abstraction – detailed description
Different level of abstraction:Different level of abstraction:
► Procedural abstraction - named sequence of eventsProcedural abstraction - named sequence of events
Eg : openEg : open
► Data abstraction - named collection of data objectsData abstraction - named collection of data objects
Eg : DoorEg : Door
12. Design ConceptsDesign Concepts2.2. Architecture:Architecture:
- Overall structure of the software components- Overall structure of the software components
- The way in which components interact, and the structure of data- The way in which components interact, and the structure of data
that are used by the components.that are used by the components.
- the ways which structure provides conceptual integrity for system- the ways which structure provides conceptual integrity for system
- hierarchical structure of program components (modules)- hierarchical structure of program components (modules)
- Re-use design level concepts- Re-use design level concepts
Different models:Different models:
1.1. Structural model:Structural model: collection of program componentscollection of program components
2.2. Framework model :Framework model : Increase the level of design abstractionIncrease the level of design abstraction
3.3. Dynamic model:Dynamic model: address the behavioral aspects of softwareaddress the behavioral aspects of software
architecture indicates how system changes thearchitecture indicates how system changes the
function of external eventsfunction of external events
4.4. Process modelProcess model : technical process: technical process
5.5. Functional model:Functional model: Functional hierarchy of the systemFunctional hierarchy of the system
13. Design ConceptsDesign Concepts
33. Modularity:. Modularity: (Software architecture + design pattern)(Software architecture + design pattern)
- Modularity is the concept of breaking up a problem into- Modularity is the concept of breaking up a problem into
separately named and addressable components (modules)separately named and addressable components (modules)
- To solve smaller components of a problem and integrate the- To solve smaller components of a problem and integrate the
components to get solutioncomponents to get solution
- If there are two problems p1 and p2 with complexity- If there are two problems p1 and p2 with complexity
- p1 > p2 then the effort required to solve the problem p1 will be- p1 > p2 then the effort required to solve the problem p1 will be
more than that of p2more than that of p2
- Divide and conquer method applied- Divide and conquer method applied
► Effort (cost) required to develop = smallEffort (cost) required to develop = small
► Total number of modules increasesTotal number of modules increases
► More module = smaller individual sizeMore module = smaller individual size
15. Design ConceptsDesign Concepts
Modularity - Advantages:Modularity - Advantages:
Easily plannedEasily planned
Software increments defined and deliveredSoftware increments defined and delivered
Changes easily accommodatedChanges easily accommodated
Testing and debugging conducted effectivelyTesting and debugging conducted effectively
Long term maintenanceLong term maintenance
16. Design ConceptsDesign Concepts
4. Information Hiding:4. Information Hiding:
Modules should be specified and designedModules should be specified and designed
Information (procedure and data) contained within oneInformation (procedure and data) contained within one
module is inaccessible to other modulesmodule is inaccessible to other modules
Hiding – implies effective modularityHiding – implies effective modularity
Abstraction – defines procedural informationAbstraction – defines procedural information
Procedural + data structure – Hiding in the moduleProcedural + data structure – Hiding in the module
17. Design ConceptsDesign Concepts
Information Hiding:Information Hiding:
Advantages:Advantages:
In modificationIn modification
TestingTesting
MaintenanceMaintenance
Disadvantage:Disadvantage:
Inadvertent errors introduces during modificationInadvertent errors introduces during modification
18. Design ConceptsDesign Concepts
5.5. Functional Independence:Functional Independence:
► The modules should be functionally independent.The modules should be functionally independent.
► This functional independence can be achievedThis functional independence can be achieved
by developing modules with “single minded” function andby developing modules with “single minded” function and
“aversion” (dislike) to excessive interaction with other modules.“aversion” (dislike) to excessive interaction with other modules.
► In other words each module should address a specificIn other words each module should address a specific
sub-function and should have a simple interfacesub-function and should have a simple interface
► (flow of information should be less).(flow of information should be less).
► Independent modules are easier to develop/maintain/testIndependent modules are easier to develop/maintain/test
► Error propagation is reduced.Error propagation is reduced.
► Functional independence is a key to good design and designFunctional independence is a key to good design and design
is the key to software quality.is the key to software quality.
19. Design ConceptsDesign Concepts
How do you measure functional independence?How do you measure functional independence?
1.1. Cohesion: Measure of relative functional strength of aCohesion: Measure of relative functional strength of a
module.module.
2.2. Coupling: A relative interdependence among modules.Coupling: A relative interdependence among modules.
Cohesion:Cohesion: (do just one thing)(do just one thing)
- Information hidingInformation hiding
- Performs single taskPerforms single task
- Requires little interaction with other componentsRequires little interaction with other components
Coupling:Coupling:
- Interconnection among modulesInterconnection among modules
- Complexity between modulesComplexity between modules
- Data passesData passes
- Connectivity among modules understands software easilyConnectivity among modules understands software easily
- Error in one location can propagate throughout the systemError in one location can propagate throughout the system
20. Design ConceptsDesign Concepts
COHESION - the degree to which a
module performs one and only one
function.
COUPLING - the degree to which a
module is "connected" to other
modules in the system.
21. Design ConceptsDesign Concepts6.6. Refinement:Refinement:
► Top-down design strategyTop-down design strategy
► Hierarchy followedHierarchy followed
► Refined stepwise until programming language is reachedRefined stepwise until programming language is reached
► Process of elaboration (explanation).Process of elaboration (explanation).
► Refinement is the process that gives you different levels ofRefinement is the process that gives you different levels of
abstractions. (Elaborate = explain, specify, develop,abstractions. (Elaborate = explain, specify, develop,
improve).improve).
► Refinement causes the designer to elaborate on the originalRefinement causes the designer to elaborate on the original
statement providing more and more details as eachstatement providing more and more details as each
successive refinement occurs.successive refinement occurs.
► Abstraction & refinement are used for complete designAbstraction & refinement are used for complete design
process.process.
► Abstraction – Designer to specify procedure and data inAbstraction – Designer to specify procedure and data in
lower levellower level
► Refinement – reveals lower level detailsRefinement – reveals lower level details
22. Design ConceptsDesign Concepts
7. Refactoring:7. Refactoring:
►Simplifies the design without changing its functionSimplifies the design without changing its function
and behaviorand behavior
►Process of changing a software system in whichProcess of changing a software system in which
internal structure is improved without altering theinternal structure is improved without altering the
external behavior or code designexternal behavior or code design
Checking:Checking:
Existing design examined for redundancyExisting design examined for redundancy
Unused design elementsUnused design elements
Unnecessary algorithmsUnnecessary algorithms
Poorly constructed data structurePoorly constructed data structure
Any other design failure corrected for better yieldAny other design failure corrected for better yield
23. The Design ModelThe Design Model
Design model viewed in two different dimension:Design model viewed in two different dimension:
► Process dimension - indicates design model evolution asProcess dimension - indicates design model evolution as
design tasks are executed during software processdesign tasks are executed during software process
Architecture elementsArchitecture elements
Interface elementsInterface elements
Component-level elementsComponent-level elements
Deployment-level elementsDeployment-level elements
► Abstraction dimension - each analysis model is transformedAbstraction dimension - each analysis model is transformed
into design and refinedinto design and refined
High level (analysis model elements)High level (analysis model elements)
Low level (design model elements)Low level (design model elements)
► Many UML diagrams used in the design model areMany UML diagrams used in the design model are
refinements of diagrams created in the analysis modelrefinements of diagrams created in the analysis model
24. The Design ModelThe Design Model
1.1. Data Design Elements:Data Design Elements:
► Creates model of data and information of highCreates model of data and information of high
level of abstractionlevel of abstraction
► Data model refined to computer based systemData model refined to computer based system
► Design of data structures and algorithms isDesign of data structures and algorithms is
essential to creation of high-quality applicationsessential to creation of high-quality applications
► Translation of data model into database is criticalTranslation of data model into database is critical
to achieving system business objectivesto achieving system business objectives
► Reorganizing databases -> data warehouseReorganizing databases -> data warehouse
enables data mining or knowledge discovery that canenables data mining or knowledge discovery that can
impact success of business itselfimpact success of business itself
25. The Design ModelThe Design Model
2. Architectural Design:2. Architectural Design:
►Gives overall view of softwareGives overall view of software
►Derived fromDerived from
Information about the application for the software to beInformation about the application for the software to be
built.built.
Relationships and collaborations among specific analysisRelationships and collaborations among specific analysis
model elementsmodel elements
Availability of architectural patterns and stylesAvailability of architectural patterns and styles
►Interconnected systems derived from analysisInterconnected systems derived from analysis
packagespackages
26. The Design ModelThe Design Model
3. Interface Design elements3. Interface Design elements
► It helps in understanding how information flowsIt helps in understanding how information flows
into and out of the system.into and out of the system.
► The element areThe element are
The user interfaceThe user interface
External interfaces to other systems, devices, network.External interfaces to other systems, devices, network.
Internal interfaces between various design components.Internal interfaces between various design components.
► These interface design elements allow theThese interface design elements allow the
software to communicate externally and enablesoftware to communicate externally and enable
internal communication and collaboration amonginternal communication and collaboration among
the components that populate the softwarethe components that populate the software
architecture.architecture.
27. ► User interface design is a major softwareUser interface design is a major software
engineering action.engineering action.
It incorporates aesthetic elements (layout, color, graphics,It incorporates aesthetic elements (layout, color, graphics,
interaction mechanisms), ergonomic elementsinteraction mechanisms), ergonomic elements
(information layout, placement) & technical elements(information layout, placement) & technical elements
(reusable components)(reusable components)
► The design of external interfaces requires definitiveThe design of external interfaces requires definitive
information about the entity to which information isinformation about the entity to which information is
sent or received.sent or received.
► The design of internal interfaces is closely alignedThe design of internal interfaces is closely aligned
with component level design.with component level design.