CSC 395 – Software Engineering Lecture 12: Reusability –or– Programming was Bjarne Again.

Slides:



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

Unified theory of software evolution Reengineering – Business process reengineering and software reengineering BPR model – Business definition, process.
Object-Oriented Metrics. Characteristics of OO ● Localization ● Encapsulation ● Information hiding ● Inheritence ● Object abstraction.
A Brief Introduction to Software Design and Design Quality By Laura Leventhal.
Design Patterns CS is not simply about programming
1 Reusability and Portability Xiaojun Qi. 2 Reuse Concepts Reuse is the use of components of one product to facilitate the development of a different.
Object-Oriented Metrics
Soft. Eng. II, Spring 02Dr Driss Kettani, from I. Sommerville1 CSC-3325: Chapter 6 Title : The Software Reuse Reading: I. Sommerville, Chap. 20.
Software Testing and Quality Assurance: Introduction and Terminology
1 CS1001 Lecture Overview Object Oriented Design Object Oriented Design.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 3: Basing Software Development on Reusable Technology.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Algorithm Programming Coding Advices Bar-Ilan University תשס " ו by Moshe Fresko.
The chapter will address the following questions:
Problems with reuse – Increased maintenance costs; lack of tool support; not-invented- here syndrome; creating, maintaining, and using a component library.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
CSC 395 – Software Engineering Lecture 34: Post-delivery Maintenance -or- What’s Worse than Being a Code Monkey?
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
CSE 303 – Software Design and Architecture
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
Cohesion and Coupling CS 4311
CSC 395 – Software Engineering Lecture 28: Classical Analysis -or- Do You Really Want to Do That?
CSC 395 – Software Engineering Lecture 16: Object-Oriented Design –or– Laziness is a Designer’s Best Friend.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
Frameworks CompSci 230 S Software Construction.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Chapter 14 Design with Reuse.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Introduction to Software Architecture.
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Software Design Chapter 11. Purposes of Design Design transforms the specification into a design. The end purpose of the design is to produce detail and.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Object- oriented Design Principles
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Chapter 10 Software quality. This chapter discusses n Some important properties we want our system to have, specifically correctness and maintainability.
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
CSC 222: Object-Oriented Programming
CSC 222: Object-Oriented Programming
CompSci 280 S Introduction to Software Development
CHAPTER 5 GENERAL OOP CONCEPTS.
Data Abstraction: The Walls
OOP What is problem? Solution? OOP
CSC 222: Object-Oriented Programming
Object Oriented Practices
Objects First with Java
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
Why Object-oriented Programming?
Software Design Lecture : 14.
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
Presentation transcript:

CSC 395 – Software Engineering Lecture 12: Reusability –or– Programming was Bjarne Again

Today’s Goal Why reusability & portability are important What this has to do with OO goals How OO can improve reuse & portability Begin thinking about next stage of project Must develop analysis & design from your requirements document These are make-or-break parts of any project

Thought Experiment Suppose you could use an approach Already tested in many environments Many/most bugs have been found & documented Several teams already know extensively Available for less than entirely new development Only 15% of new code is really original 85% could be standardized and reused Actual reuse rates usually about 40% Lack of design prevents capitalizing gains Ignoring closest thing to a free lunch

Barriers to software reusability Not-invented-here (NIH) syndrome Egos and personalities prefer code they wrote Concerns about reliability of others’ code Need accessible library of reusable modules This may requires lots of time & money Need people to maintain and update code (bit rot) May discover hard-to-fix regression failures Modules may have low cohesiveness or coupling Developing reusable modules can be expensive

Barriers to software reusability Legal issues may arise over components Clients often place restrictions on completed project Assumes client does not own modules used Can introduce more sophisticated library demands COTS components place additional restrictions May not be able to modify software Licensing may restrict how COTS software used Cost of reuse can be high Must understand module’s finer points Still need some testing if data/environment are new

Reuse From Design Workflow Designs are good source of reuse Opportunistic reuse within an application domain Create framework containing common logic Develop toolkit of commonly used routines Specify expected patterns of behavior Must keep modules independent Clearly specify how modules should be used Also state what plug-ins responsibilities are

Reuse Architecture Create software product lines Examples include: Word, Excel, Madden Very common in drivers, BIOS, & other firmware Firmware for HP printers (95-98) 75% fewer person–hours to develop firmware 70% of components could be reused

Biggest Reuse Gain Impacts maintenance most of all But over 50% of budget spent on maintenance! Reused products cheaper to maintain Must be clearly & exhaustively documented Will have been tested in variety of situations Design is relatively clean and uncomplicated Even reusing just 40% of a product ¼ th of which (10% of total) had to be modified Could easily save 18% of total development costs

Data Encapsulation

Data Encapsulation Benefits OO places functions for data in single class Limits amount of coupling that can occur Encourages creating high level of cohesion Reduces development & maintenance costs Properly encapsulated modules are reusable Move class to any system where data reappears Since data is similar, expectations are that functionality should also be unchanged Encourages abstraction Work at highest levels until latest possible time

Stepwise Refinement Split project into high-level, abstract concepts Splitting should not consider implementation issues Assume that all needed functionality exists Looking for project’s key ideas and concerns Develop each of the concepts separately Create the ideal implementation of this concept Only (limited) external concern is supporting functionality used by other concepts Creating reusable component so do not focus on current project

STEPwise Refinement May create several layers of abstraction Continue until concepts are ridiculously simple Few complaints about “too good” or “too easy” Identify project aspects most likely to change This is typically in implementation details Work on these parts as late as possible and rely on them as little as possible Rarely are these details reusable anyway…

Information Hiding Reusable components limit what is known Design considers functionality, not implementation Should generalize data types whenever possible Never expose fields directly Makes changing implementation easy to do During implementation use interfaces & private Items likely to change minimally available Changes localized to within a module Minimize porting between projects

Inheritance OO method of specializing generic behavior Place all the common actions in the superclass Rely on polymorphism to call correct class

Why OO is Bad Overhead for development can be large Increases learning curve for first-time coders More required “magic” than in other paradigms Inheritance can cause problems Design needs to be good from the start Small changes to superclass have huge impact Hard to pick and choose what is inherited Objects low in tree can become large What should be done when 3 of 4 children have code in common?

Discussion Question A module has coincidental cohesion; to improve the opportunities for reuse, you suggest splitting each of its actions into its own module. Is this a good idea? Are there any other tasks that you would need to do?

For Next Lecture Begin discussion OO analysis Where do these classes and ideas come from? How do we express them in UML? Why should we express them in UML? Keep thinking about next stage of project Must develop analysis & design from your requirements document These are make-or-break parts of any project