CSE 303 – Software Design and Architecture LECTURE 03.
-
Upload
felicia-ellis -
Category
Documents
-
view
226 -
download
3
Transcript of CSE 303 – Software Design and Architecture LECTURE 03.
![Page 1: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/1.jpg)
CSE 303 – Software Design and Architecture
LECTURE 03
![Page 2: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/2.jpg)
Previous Lecture
• Design phase in SDLC – architecture and detailed design
• Factors that affect design• Quality Models
![Page 3: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/3.jpg)
Outline
• Good design• Quality attributes of software design• Software design principles• Concepts in design
![Page 4: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/4.jpg)
GOOD DESIGN
![Page 5: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/5.jpg)
Efficiency
• Efficiency refers to the responsiveness of the system, – i.e. the time required to respond to stimuli
(events), – or the number of events processed in some
interval of time.
![Page 6: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/6.jpg)
Efficiency
• The time to process a sequence of events can be divided into three parts.
• First, time is needed to communicate between different software components that collaborate to process an event.
• Second, the computation times that components executed may have overlaps or gaps between them.
• Third, the times are needed for each component to complete its computation.
![Page 7: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/7.jpg)
Correctness
• Correctness is the property that software implements the specified users’ requirements.
• It is impossible that a design at any level that does not correctly implement the specified requirements would lead to a correct implementation.
![Page 8: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/8.jpg)
Reliability
• Reliability can be defined as the probability that a system performs user required functionality correctly – at a specified environment in a given period of
time.
![Page 9: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/9.jpg)
Portability
• Portability is the property of a software system that can be easily transported from one hardware/software platform to another,– for example, from a PC/Windows environment
to a Sun/Unix environment or a Macintosh environment.
![Page 10: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/10.jpg)
Maintainability
• Maintainability refers to the easiness of maintaining a software system.
• There are two types of software maintenance operations. – corrective maintenance. – adaptive maintenance.
• Well-structured design helps software engineers to understand the system.
![Page 11: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/11.jpg)
Reusability
• Reusability is the property of a software system that its components can be easily reused in the development of other software systems.
– Reusability depends on the generality of the components in a given application domain and the extent to which the components are parameterised and configurable.
![Page 12: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/12.jpg)
Interoperability
• Interoperability is the property of how easy a software system can be used with other software systems.
• Interoperability mostly depends on the interface between a software system and its environment.
• It requires that the implementation of the software follow certain standard interface and coding conventions.
![Page 13: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/13.jpg)
QUALITY ATTRIBUTES OF SOFTWARE DESIGN
![Page 14: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/14.jpg)
Quality Attributes – Design Objectives
• Modularity: – The design should be composed of replaceable, self-
contained assemblies of elementary parts, – thereby aiding both the initial development and the later
maintenance.
• Portability: – The designed product should be able to be moved
unchanged • from test environments to operational environments and • from one operational environment to another.
![Page 15: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/15.jpg)
Quality Attributes – Design Objectives
• Flexibility or modifiability: – The design should facilitate adaptation to changing end-user
requirements, • changes based on new problems in the end users’ world
• Conceptual integrity: – The design should exhibit harmony, symmetry and
predictability.
• Well structured: – The design should be consistent with chosen design
principles, such as information hiding, to organise the structure of the design.
![Page 16: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/16.jpg)
Quality Attributes – Design Objectives
• Simple: – The design should be ‘as simple as possible, but no
simpler’.
• Efficient: – The functions provided by the design should be
computable by using the available resources.
• Adequate: – The design should meet the stated requirements.
![Page 17: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/17.jpg)
Quality Attributes – Design Objectives
• Flexible: – The design should be able to accommodate likely changes
in the requirements, however these might arise.
• Implementable: – The functions offered by the design should be theoretically
computable with the information available and achievable using currently available software and hardware technology.
• Standardised: – The design should be represented using standard or well
defined and familiar notation for any documentation.
![Page 18: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/18.jpg)
Quality Attributes – Design Objectives
• Feasibility: – The designed process of bringing about the product should
be executable.
• Simplicity: – The production (i.e. the development) of the designed
software should be as simple and straightforward as possible without unnecessary complication.
• Reliability: – The designed development process should with high
probability be successful rather than fail to achieve its goal.
![Page 19: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/19.jpg)
SOFTWARE DESIGN PRINCIPLES
![Page 20: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/20.jpg)
Software Design Principles
• Always consider alternative approaches • The design should be traceable to the analysis model
• The design should not reinvent the wheel
• The design should minimise intellectual distance between the software and the problem as it exists in the real world.
![Page 21: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/21.jpg)
Software Design Principles contd…
• The design should exhibit uniformity and integration– A design is uniform if it appears that one person developed
the whole thing. – A design is integrated if care is taken in defining interfaces
between design components.
• The design should be reviewed to minimize conceptual (semantic) errors
![Page 22: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/22.jpg)
Software Design Principles contd…
• Design is not coding, coding is not design – Even when detailed designs are created for program
components, the level of abstraction of the design model is higher than source code.
• The design should be structured to accommodate change
• The design should be assessed for quality as it is being created
![Page 23: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/23.jpg)
23
CONCEPTS IN DESIGN
![Page 24: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/24.jpg)
Concepts in Software Design Process• Abstraction
– Concentrate on a problem at some level of generalization without regard to irrelevant low level details.
• Modularity– Divide the software into separately named and
addressable components, that are integrated to satisfy the problem requirements.
• Refinement– Top down design strategy that successively refines the
levels of procedural details.– Every refinement step involves Design Decisions.
![Page 25: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/25.jpg)
Modular Design• Easier to manage• Easier to understand• Reduces complexity• Delegation / division of work• Fault isolation• Independent development• Separation of concerns• Reuse
![Page 26: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/26.jpg)
Effective Modular Design• How to decompose a software system into
best set of modules?– Information hiding– Cohesion– Coupling– Functional independence
![Page 27: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/27.jpg)
Information Hiding• Design the modules in such a way that information
(data & procedures) contained in one module is inaccessible to other modules that have no need for such information.
• Independent modules.• Benefits:
– when modifications are required, it reduces the chances of propagating to other modules.
![Page 28: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/28.jpg)
Cohesion• “A module should ideally do one thing.”• Each module performs a single task requiring little
interaction with other modules. • A cohesive module since accomplished neatly
defined single task so it can be re-used in other projects
• High cohesion is good– Changes are likely to be local to a module– Easier to understand a module in isolation
![Page 29: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/29.jpg)
Coupling
• A measure of interconnection among modules in a software structure
• Depends on the interface complexity between the modules
• High coupling causes problems– Change propagation- ripple effect– Difficulty in understanding– Difficult reuse
![Page 30: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/30.jpg)
Functional Independence• A module having high cohesion and low coupling is said to
be functionally independent of other modules.
• Each module addresses a specific sub function of requirements and is easier to maintain or modify
• Benefits:– Error isolation– Scope of Re-use– Understandability
![Page 31: CSE 303 – Software Design and Architecture LECTURE 03.](https://reader036.fdocuments.net/reader036/viewer/2022062308/56649e625503460f94b5d824/html5/thumbnails/31.jpg)
Summary
• Good design• Quality attributes of software design• Software design principles• A few concepts in design