SWE © Solomon Seifu 2010 1 ELABORATION. SWE © Solomon Seifu 2010 2 Lesson 12-5 Software Engineering Design Goals.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Chapter 11 Component-Level Design
General OO Concepts and Principles CSE301 University of Sunderland Harry R. Erwin, PhD.
Lecture 9 Improving Software Design CSC301-Winter 2011 – University of Toronto – Department of Computer Science Hesam C. Esfahani
Revision Session 4 Systems and Software Design. Software Design-related Topics What are the key characteristics of a quality software design and how can.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Chapter 25 GRASP: More Objects with Responsibilities 1CS6359 Fall 2011 John Cole.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Package design and the Iterative process model. What is a package? Classes are not sufficient to group code –Some classes collaborate, implying dependencies.
Systems Design. Analysis involves understanding and documenting user requirements in a clear and unambiguous way. It focuses on the business side and.
Chapter 11 Component-Level Design
Mrs. Maninder Kaur Mrs. Maninder Kaur 1 Architecture of DBMS
The Design Discipline.
Chapter 13 Starting Design: Logical Architecture and UML Package Diagrams.
Systems Analysis and Design in a Changing World, Fifth Edition
An Introduction to Software Architecture
CSE 303 – Software Design and Architecture
1 OO Design Novosoft, 2001 by V. Mukhortov. 2 OO Design Goals  Flexibility Changes must be localized  Maintainability Modules requiring changes can.
Ch:10 Component Level Design Unit 4. What is Component? A component is a modular building block for computer software Because components reside within.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 11 Subsystem Design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 09. Review Introduction to architectural styles Distributed architectures – Client Server Architecture – Multi-tier.
Company Confidential – Do Not Duplicate 2 Copyright 2008 McLane Advanced Technologies, LLC S.O.L.I.D. Software Development Achieving Object Oriented Principles,
Design Design and Software Architecture. The design phase The analysis phase describes what the system should be doing The design phase describes how.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Cohesion and Coupling CS 4311
Systems Analysis and Design in a Changing World, 3rd Edition
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
 What is SOLID  The S in SOLID  The O in SOLID  The L in SOLID  The I in SOLID  The D in SOLID  Questions.
1 OO Package Design PrinciplesStefan Kluth 4OO Package Design Principles 4.1Packages Introduction 4.2Packages in UML 4.3Three Package Design Principles.
Incremental Design Why incremental design? Goal of incremental design Tools for incremental design  UML diagrams  Design principles  Design patterns.
Elements of OO Abstraction Encapsulation Modularity Hierarchy: Inheritance & Aggregation 4 major/essential elements3 minor/helpful elements Typing Concurrency.
OO Design Principles Copyright © Vyacheslav Mukhortov, Nikita Nyanchuk-Tatarskiy, Copyright © INTEKS LLC,
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11a: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
High Cohesion Low Coupling Old Standards for Object Oriented Programming.
Five design principles
TK2023 Object-Oriented Software Engineering CHAPTER 8 LOGICAL ARCHITECTURE.
Design. Practices Principles Patterns What are the characteristics of good design? What are good solutions to common design problems? How do we go about.
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
Component Design Elaborating the Design Model. Component Design Translation of the architectural design into a detailed (class-based or module- based)
SOLID Design Principles
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Beginning Software Craftsmanship Brendan Enrick Steve Smith
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Principles of Package Design COMPOSE AT A HIGHER LEVEL OF ABSTRACTION.
1 Advanced Object- oriented Design – Principles CS320 Fall 2005.
1 Advanced Object-oriented Design – Principles and Patterns OO Design Principles.
Design Concepts ch-8
Mantas Radzevičius ifm-2/2
GRASP – Designing Objects with Responsibilities
CS 325: Software Engineering
Software Architecture & Difference from Design
Copyright © by Curt Hill
Software Engineering: A Practitioner’s Approach, 6/e Chapter 11 Component-Level Design copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Software Quality Engineering
The Object Oriented Approach to Design
Principles of Package Architecture
Component-Level Design
Object-Oriented Design
Design Tips.
Software Design Lecture : 8
Software Design Lecture : 14.
An Introduction to Software Architecture
A (partial) blueprint for dealing with change
Chapter 10 – Component-Level Design
Presentation transcript:

SWE © Solomon Seifu ELABORATION

SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals

SWE © Solomon Seifu SWE: Elaboration – Design Goals Separate the data access code from the business logic code and from the presentation code Isolate the data access architecture so that it can allow the support of different underlying data stores – without requiring changes to the business object layer

SWE © Solomon Seifu SWE: Elaboration - Design Goals (Cont.) Design the business logic object architecture to expose the data retrieved by the data access layer in an object-oriented format Support caching of business objects to save the data we’ve already fetched from the data store so we don’t have to make unnecessary fetches to retrieve the same data again

SWE © Solomon Seifu SWE: Elaboration – Design Goals (Cont.) Handle and log exceptions, and other important events such as deletion of a record Store the site and modules’ configuration settings in a place that is easy to read from and write to i.e., use application configuration file

SWE © Solomon Seifu SWE: Elaboration - Design Goals (Cont.) UI should focus mostly on data presentation Business logic layer should manipulate the data and apply business rules Data layer should only provide persistence (data storage)

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (Quality) What is it that makes a design rigid, fragile and difficult to reuse? It is the interdependence of the subsystems within that design A design is rigid if it cannot be easily changed. Such rigidity is due to the fact that a single change to heavily interdependent software begins a cascade of changes in dependent modules A design is difficult to reuse when the desirable parts of the design are highly dependent upon other details which are not desired 7

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (Quality) (Cont.) When the designers or maintainers cannot predict the extent of that cascade of change the impact of the change cannot be estimated. This makes the cost of the change impossible to estimate Fragility is the tendency of a program to break in many places when a single change is made  Often the new problems are in areas that have no conceptual relationship with the area that was changed 8

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (What Makes a Good SWE Design?) The following three principles make for good SWE design: 1. Class design principles 2. Principles of package cohesion, and 3. Principles of package coupling 9

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (What Makes a Good SWE Design? [Class Design Principles]) Five Principles of Class Design:  The Single Responsibility Principle: Each responsibility should be a separate class, because each responsibility is an axis of change A class should have one, and only one, reason to change If a change to the business rule causes a class to change, then a change to the database schema, GUI, report format, or any other segment of the system should not force that class to change 10

SWE © Solomon Seifu SWE: Elaboration - Design Goals ( What Makes a Good SWE Design? [Class Design Principles]) (Cont.) The Open/Closed Principle: Software entities (classes, modules, etc) should be open for extension, but closed for modification The Liskov Substitution Principle: Derived classes must be usable through the base class interface without the need for the user to know the difference The Dependency Inversion Principle: Details should depend upon abstractions. Abstractions should not depend upon details The Interface Segregation Principle: Many client specific interfaces are better than one general purpose interface

SWE © Solomon Seifu Three Principles of Package Cohesion:  The Reuse/Release Equivalency Principle: The granule of reuse is the same as the granule of release. Only components that are released through a tracking system can be effectively reused. And that granule is the package  The Common Closure Principle: Classes that change together, belong together  The Common Reuse Principle: Classes that aren't reused together should not be grouped together SWE: Elaboration - Design Goals (What Makes a Good SWE Design? [Package Cohesion])

SWE © Solomon Seifu Three Principles of Package Coupling:  The Acyclic Dependencies Principle: The dependency structure for released components must be a directed acyclic graph. There can be no cycles  The Stable Dependencies Principle: Dependencies between released categories must run in the direction of stability. The dependee must be more stable than the depender  The Stable Abstractions Principle: The more stable a class category is, the more it must consist of abstract classes. A completely stable category should consist of nothing but abstract classes SWE: Elaboration - Design Goals (What Makes a Good SWE Design? [Package Coupling]

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (The Law Of Demeter) The Law Of Demeter specifies a style guideline: "Only talk to your immediate friends." For example, one never calls a method on an object you got from another call nor on a global object. This helps a lot later when you refactor the code. 14

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (The Law Of Demeter) (Cont.) Your method can call other methods in its class directly Your method can call methods on its own fields directly (but not on the fields' fields) When your method takes parameters, your method can call methods on those parameters directly When your method creates local objects, that method can call methods on the local objects. But,  One should not have a chain of messages a.getB().getC().doSomething() in some class other than a's class. 15

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (The Law Of Demeter [Strong Coupling - Inappropriate Intimacy]) 16

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (The Law Of Demeter [Loose Coupling via Delegation]) 17

SWE © Solomon Seifu 2010 SWE Design Goals Exercise

SWE © Solomon Seifu 2010 SWE Design Goals Exercise Answer

SWE © Solomon Seifu 2010 SWE: Elaboration - Design Goals (Wholeness) Object Oriented design goals ensure that a given design is flexible, malleable and easy to use & reuse? Separation of concern and caching are desired qualities Three principles that make for good SWE design are: 1. Class design principles 2. Principles of package cohesion, and 3. Principles of package coupling The Law of Demeter governs the communication structure within an object-oriented design. It restricts sending messages to an object itself, an objects argument and and an object created by its methods