Stability and Volatility is Software Design H. Rahnama Tutorial in software engineering.

Slides:



Advertisements
Similar presentations
•7/12 /07 F-1 © 2010 T. Horton CS 4240 Principles of SW Design Packages in Java and UML.
Advertisements

Luca Lista - C++ Metriche nel software Luca Lista INFN, Sezione di Napoli.
OBP Research Oy for simpler creation of embedded systems.
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
Software Requirements Engineering
Inheritance Java permits you to use your user defined classes to create programs using inheritance.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
CSCE 121, Sec 200, 507, 508 Software Engineering Fall 2010 Prof. Jennifer L. Welch.
R R R Program Families CSE870 Discussion April 14, 2003.
Introduction to Software Engineering Lecture 8 André van der Hoek.
The Modular Structure of Complex Systems D.L. Parnas, P.C. Clement, and D.M. Weiss Published in IEEE Transactions on Software Engineering, March 1985 Presented.
TEST-1 7. Object-Oriented Design Principles. TEST-2 The Pillars of the Paradigm Abstraction Encapsulation Hierarchy –Association, Aggregation –Inheritance.
Pedro Mejia Alvarez CINVESTAV-PN
1 OO Design Principles Project Group eXtreme Programming Md. Abul Bashar 07/09/2004.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Alexander Serebrenik, Serguei Roubtsov, and Mark van den Brand D n -based Design Quality Comparison of Industrial Java Applications.
1 OO Design Novosoft, 2001 by V. Mukhortov. 2 OO Design Goals  Flexibility Changes must be localized  Maintainability Modules requiring changes can.
11:57© , hello2morrow1 Software Sustainability Alexander v. Zitzewitz hello2morrow, Inc.
©Ian Sommerville 2000, Mejia-Alvarez 2009 Slide 1 Software Processes l Coherent sets of activities for specifying, designing, implementing and testing.
Ch:10 Component Level Design Unit 4. What is Component? A component is a modular building block for computer software Because components reside within.
Company Confidential – Do Not Duplicate 2 Copyright 2008 McLane Advanced Technologies, LLC S.O.L.I.D. Software Development Achieving Object Oriented Principles,
Software Engineering Introduction and Overview Takes customer-defined goals and constraints and derives a representation of function, performance, interfaces,
Advanced Principles II Principles of Object-Oriented Component Design Copyright  by Object Mentor, Inc All Rights Reserved Portions of this.
Stephenson College DP 96 1 Object-Orientation by Derek Peacock.
Question To know that quality has improved, it would be helpful to be able to measure quality. How can we measure quality?
Concepts of Software Quality Yonglei Tao 1. Software Quality Attributes  Reliability  correctness, completeness, consistency, robustness  Testability.
Putting the “Engineering” in Software Engineering: Technology Infrastructure in Process Improvement Adam Kolawa, Ph.D. CEO, Parasoft.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
S.O.L.I.D. Software Development 12 January 2010 (Martin Verboon, Patrick Kalkman, Stan Verdiesen)
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
4/1/05F-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Packages and Components in Java and UML.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Sylnovie Merchant, Ph.D. MIS 161 Spring 2005 MIS 161 Systems Development Life Cycle II Lecture 5: Testing User Documentation.
1 OO Package Design PrinciplesStefan Kluth 4OO Package Design Principles 4.1Packages Introduction 4.2Packages in UML 4.3Three Package Design Principles.
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,
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11a: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
CSE 303 – Software Design and Architecture
PC204 Lecture 5 Programming Methodologies Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
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.
Dependency Inversion Principle Jon McBee Principal Software Engineer Ultratech CNT.
February 27, February 27, 2016February 27, 2016February 27, 2016 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific.
1 Good Object-Oriented Design Radu Marinescu Lecture 3 Principles of Object-Oriented Design Part II 19 th November 2002.
Liskov Substitution Principle Jon McBee CLA, CLED, CTD, CPI, LabVIEW Champion.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Tools Shane Cantrell Zach Crisman. Tools CVS FogBUGZ (Bug Tracking) Unit Testing (JUnit, Jakarta Cactus) Catalyst Web Tools (BB and Surveys) Mailman ( .
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.
by C.A. Conley and L. Sproull
Unfunded Liabilities: How Poor Package Design Drives Technical Debt and What You Can Do About It Allen C Smith, CLA Senior Systems Engineer, ATE.
Principles of Package Architecture
lecture 08, OO Design Principle
Why Object-oriented Programming?
Design Tips.
Software Design Lecture : 14.
The SOLID Principles.
Principles of Object-Oriented Design Part II
What Is Good Software(Program)?
A (partial) blueprint for dealing with change
Principles of Object-Oriented Design
the Java package design analyser
Object Oriented Design & Analysis
Principles of High-Level Design
Chapter 10 – Component-Level Design
Presentation transcript:

Stability and Volatility is Software Design H. Rahnama Tutorial in software engineering

Good Software Design: Testability, Reusability On a large scale decomposition of the system represents significant design decisions Large scale modules in Java:.JAR, C#:DLL, C++:SO All systems should be designed so that they could be broken down into INDEPENDENTLY depolyable modules. Module independence: Better design

Reusability and Testability Reusability and testability depend of designs that supports independent deployability Modular Dependence: They make build order ambiguous Cause transitive dependency Prevent independent reuse of modules

Cyclic Graphs! Module A depends on Module B Module B depends on Module C Module C depends on Module A None of the modules can be reused independently

Good Design: ADP Acyclic Dependencies Principle Dependencies among modules must be arranged in a Directed Acyclic Graphs No cycles of dependencies among modules Eliminating cycles:First step in creating a modular design

ADP Principle These modules are dependent Document processor depends on two savers

ADP Principle Use Polymorphism instead of “If” Using the Interface Document Processor has no direct dependence on DatabaseSaver or FileSystemSaver Savers are VOLATILE

Volatility How changeable a module is. Saver module is more stable This lack of volatility allows the others to depend on it Other savers are safe from changes

Common Closure Principle (CCP) Codes with different kinds of volatility should be placed in different modules Modules should not depend on modules who are more volatile than they are. They should depend on less volatile ones.

Volatility vs. Stability Stability: How difficult a module is to change. Modules that are difficult to change are likely to be involatile Good design: Volatile Codes go to instable modules and involatile codes into stable modules.

Module X Is Module X Stable or Instable? Many other modules depend on it If its changes, others may need to be changed The more incoming dependencies a module has, the harder that module is to change, thus its more stable.

Module Y The module is easy to change: No other module depends on it So its instable Y has so many reasons to change, because it depends on many other modules.

Good design Volatile codes into modules like Y Involatile codes into modules like X Modules like X should never depend on Modules like Y What would happen if the author of X mentioned the name of some class in Y No code in Y has changed, yet Y is so difficult to change now

Measuring Module stability Stable Dependencies Principle (SDP) No module should depend on a module than it is less stable than it is Ce: (FanOut)-Number of modules that this modules depends upon Ca: (FanIn)- Number of modules that depend upon this module I(Instability) = Ce/(Ca+Ce) I is between [0,1] If I= 0, the module is very stable If I =1, the module is instable

Using I metrics Using I Metrics we can increase our modules ability to be independently deployable Applying I metrics can result in very stable, hard to change, inflexible modules What do about flexibility? OCP: Modules that are abstract can be extended without alteration. Abstraction: Flexibility

Dependency Inversion Principle ( DIP) Dependencies should point in the direction of abstraction Module Y contains classes that X wants to use How can we get X to use Y and not violate the SDP

Dependency Inversion Principle We create a new module called I, which contains an abstract class named AC Module X uses I and Y implements it X no longer depends on Y Volatile code in Y stays in Y Both X and Y depend on I X and Y depends in the direction of abstraction

Stable Abstraction Principle (SAP) The more stable a module is, the more abstract it should be Plot the instability of a module against its abstractness, the module should fall close to a line called : “The Main Sequence” Modules on the line are: Stable and Abstract Concrete and Instable

Measuring Module Abstractness A (Abstractness) = Na / Nc Na = Number of abstract classes Nc = Number of classes This metric falls between [1,0] How far a module can be from the Main Sequence: D (distance) = |A+I-1| : D Metrics Managers: D should be ZERO