Software Reuse & Refactoring By: Matthew Merricks Brian Smith Brian Smith Ryan Waggoner Ryan Waggoner.

Slides:



Advertisements
Similar presentations
A practical guide John E. Boal TestDrivenDeveloper.com.
Advertisements

Software Reuse SEII-Lecture 28
Refactoring Overview  What is refactoring?  What are four good reasons to refactor?  When should you refactor?  What is a bad smell (relative to refactoring.
Unified theory of software evolution Reengineering – Business process reengineering and software reengineering BPR model – Business definition, process.
Refactoring By: Brian Smith. What is Refactoring? Definition: a change to the internal structure of software to make it easier to understand and cheaper.
Software Reuse Building software from reusable components Objectives
Software Engineering Metrics for Object Oriented Programming Developed by – Shrijit Joshi.
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
Building software from reusable components.
Reuse Basic concepts. Rationale for reuse  Save calendar time  Save person hours  Reduce process risk  Increased quality  Standards compliance.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 Tools of Software Development l 2 types of tools used by software engineers:
Introduction to Software Testing
“GENERIC SCRIPT” Everything can be automated, even automation process itself. “GENERIC SCRIPT” Everything can be automated, even automation process itself.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Software Re-engineering
Maintenance Refactoring and Code Smells. Where are we? Over the semester we have talked about Software Engineering. The overall goal of software engineering.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
Dayton High School Mr. Martin. Lesson Objectives After this lesson, you will be able to:  Describe the process of product planning and development. 
Describing Methodologies PART II Rapid Application Development*
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
Refactoring Cristescu Marilena. Definitions Loose Usage: Reorganize a program(or something) As a noun: a change made to the internal structure of some.
Instructor: Peter Clarke
Teaching material for a course in Software Project Management & Software Engineering – part II.
1 TRex Paul Baker 1, Dominic Evans 1, Jens Grabowski 2, Helmut Neukirchen 2, Benjamin Zeiss 2 The Refactoring and Metrics Tool for TTCN-3 Test Specifications.
Sadegh Aliakbary Sharif University of Technology Spring 2012.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
FPGA-Based System Design: Chapter 6 Copyright  2004 Prentice Hall PTR Topics n Design methodologies.
Refactoring Improving the structure of existing code Refactoring1.
Introducing Software Product Lines (SPL) Silvio Romero de Lemos Meira Eduardo Santana de Almeida
Refactoring1 Improving the structure of existing code.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Coding.
Introduction to Refactoring Jim Cooper Falafel Software.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
Refactoring. Refactoring Overview  What is refactoring?  What are four good reasons to refactor?  When should you refactor?  What is a bad smell (relative.
Refactoring 2. Admin Blackboard Quiz Acknowledgements Material in this presentation was drawn from Martin Fowler, Refactoring: Improving the Design of.
REFACTORINGREFACTORING. Realities Code evolves substantially during development Requirements changes 1%-4% per month on a project Current methodologies.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
RE’05 The 13 th International conference on Requirements Engineering Reverse Engineering Goal Models from Legacy Code Yijun Yu 1 Yiqiao Wang 1 John Mylopoulos.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Industrial Project (236504) Advanced programming tools for refactoring Java code in Eclipse Student: Alexander Libov Supervisor: Dr. Ran Ettinger, IBM.
1 ECE 750 Topic 8 Meta-programming languages, systems, and applications Evolving Object-Oriented Designs with Refactorings – Lance Tokuda and Don Batory.
Refactoring Mehdi Einali Advanced Programming in Java 1.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Refactoring. Mathematics: Factor ● fac·tor – One of two or more quantities that divides a given quantity without a remainder, e.g., 2 and 3 are factors.
Refactoring1 Improving the structure of existing code.
Pertemuan 12 Refactoring Mata kuliah: T0144 – Advanced Topics in Software Engineering Tahun: 2010.
Refactoring. 2 Process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its internal.
A proposal to support the extreme programming development methodology from the quality assurance point of view Authors: Calin Jebelean –
Refactoring. DCS – SWC 2 Refactoring ”A change made to the internal structure of software to make it easier to understand and cheaper to modify without.
IT323 - Software Engineering 2 1 Tutorial 4.  List the main benefits of software reuse 2.
JMVA Comprehension and Analysis 475 Software Engineering for Industry - Coursework 1 Zhongxi Ren Tianyi Ma Qian Wang Zi Wang.
A Method for Improving Code Reuse System Prasanthi.S.
Principles and examples
A Hierarchical Model for Object-Oriented Design Quality Assessment
A Very Common Series of Techniques
Advanced Programming in Java
Reverse Engineering Goal Models from Legacy Code
Introduction to Software Testing
Design and Programming
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
Improving the structure of existing code
Need for the subject.
Advanced Programming Behnam Hatami Fall 2017.
Refactoring.
Recommending Adaptive Changes for Framework Evolution
Refactoring.
Presentation transcript:

Software Reuse & Refactoring By: Matthew Merricks Brian Smith Brian Smith Ryan Waggoner Ryan Waggoner

Overview of Presentation Introduction Introduction Software Reuse Software Reuse Software Refactoring Software Refactoring Benefits and Problems with Software Reuse and Refactoring Benefits and Problems with Software Reuse and Refactoring Conclusion Conclusion

Introduction Increase in demand for software = Need for quicker and more cost effective strategies for software development Increase in demand for software = Need for quicker and more cost effective strategies for software development

Software Reuse Opportunistic Reuse – Unplanned Reuse that is realized to be beneficial once a project has started. Opportunistic Reuse – Unplanned Reuse that is realized to be beneficial once a project has started. Internal Reuse – When programmers reuse their own code. Internal Reuse – When programmers reuse their own code. External Reuse – When programmers make use of code others have written. External Reuse – When programmers make use of code others have written. Planned Reuse – When code is written with intention to be used in the future. Planned Reuse – When code is written with intention to be used in the future.

Types of Software Reuse Abstraction - describes initial methods and definitions for the programmers to be able to build upon to achieve their objectives. Abstraction - describes initial methods and definitions for the programmers to be able to build upon to achieve their objectives. Software Product Line - analyzes the objectives and plans for the code to be functional as well as adaptable and capable of evolution. Software Product Line - analyzes the objectives and plans for the code to be functional as well as adaptable and capable of evolution.

Types of Software Reuse Cut-and-Paste Programming - code is simply taken directly from one program and copied straight into another program. Cut-and-Paste Programming - code is simply taken directly from one program and copied straight into another program. Generic Programming - deliberately writes fairly ambiguous code that can be adjusted by the programmer to suit their intentions. Generic Programming - deliberately writes fairly ambiguous code that can be adjusted by the programmer to suit their intentions.

Benefits of Reuse Saves time, money, resources. Saves time, money, resources. Allows for the growth and maximization of code. Allows for the growth and maximization of code. Code can be analyzed and improved when time comes to be re-written. Code can be analyzed and improved when time comes to be re-written. Popular method used in marketing and can be profitable for businesses. Popular method used in marketing and can be profitable for businesses.

Software Refactoring Invented by Martin Fowler: Invented by Martin Fowler:

Software Refactoring Fowler says, “Refactoring is a disciplined technique for restructuring an existing body of code altering its internal structure without changing its external behavior.” Fowler says, “Refactoring is a disciplined technique for restructuring an existing body of code altering its internal structure without changing its external behavior.”

Software Refactorings Extract Method – takes a clump of code and turns it into a method Extract Method – takes a clump of code and turns it into a method Inline Method – takes a method and replaces it with a body of code Inline Method – takes a method and replaces it with a body of code Inline Temp – replaces all instances of a temp method with the original method Inline Temp – replaces all instances of a temp method with the original method

Software Refactorings Introduce Explaining Variable – places a complicated expression in a temporary variable Introduce Explaining Variable – places a complicated expression in a temporary variable Split Temporary Variable – renames a variable that is assigned more than once Split Temporary Variable – renames a variable that is assigned more than once Remove Assignment Parameters – assigns parameters to a temporary variable Remove Assignment Parameters – assigns parameters to a temporary variable

Software Refactorings Replace Method with Method Object – turns a method into an object so that the object can be decomposed into different methods Replace Method with Method Object – turns a method into an object so that the object can be decomposed into different methods Substitution Algorithm – substitutes an algorithm with a clearer algorithm Substitution Algorithm – substitutes an algorithm with a clearer algorithm

Time Performance Break Down

Soft Goal Example

Visual Works Smalltalk IDE produced by Cincom Smalltalk IDE produced by Cincom Features Smalllint, a style checker and bug detector Features Smalllint, a style checker and bug detector Support continuous modifications Support continuous modifications Can roll back to its initial state Can roll back to its initial state

Visual Works High degree of safety due to dynamic checking and user input High degree of safety due to dynamic checking and user input Low effort tool because it can automate the modifying of code Low effort tool because it can automate the modifying of code Does not include metrics of any kind Does not include metrics of any kind

Eclipse Uses a Java Development Tool (JDT) Uses a Java Development Tool (JDT) Uses partial recompilation Uses partial recompilation Supports continuous changes Supports continuous changes A local application A local application Uses repositories to update code Uses repositories to update code Partially automated with the use of the Refactoring Wizard Partially automated with the use of the Refactoring Wizard

Guru Developed by Ivan Moore for the SELF Developed by Ivan Moore for the SELF Used for restructuring inheritance hierarchies and refactoring methods Used for restructuring inheritance hierarchies and refactoring methods Automatic tool with no user interaction needed Automatic tool with no user interaction needed Automatically generated object and method names Automatically generated object and method names

Guru Very low effort tool Very low effort tool Highly invasive Highly invasive Global application Global application

Together Control Center Created by TogetherSoft Created by TogetherSoft Uses a refactoring menu Uses a refactoring menu Is a refactoring tool and a development environment Is a refactoring tool and a development environment Local application Local application Offers versioning and undo capabilities Offers versioning and undo capabilities Low effort tool Low effort tool

Facet Visual WorksEclipseGuru Control Center Time of Change T2, T3 Before T1 or T2 After T3 Change History Irrelevant Parallel / Asynchronou sUnversionedVersioned Frequen cy Continuousl y Occasionall y Continuousl y Distributi on Local

FacetVisual WorksEclipseGuru Control Center Automati on Semi- Automatic Fully Automated Semi- Automatic Effect AlterationAnyAlterationAny Invasiven ess Non- Invasive Highly Invasive Non- Invasive Effort Low Effort Virtually No EffortLow Effort

Software Reuse: Benefits Increased Dependability Increased Dependability Reduced Process Risk Reduced Process Risk Effective Use of Specialists Effective Use of Specialists Standards Compliance Standards Compliance Accelerated Development Accelerated Development

Software Reuse: Problems Increased Maintenance Costs Increased Maintenance Costs Lack of Tool Support Lack of Tool Support Not-Invented-Here Syndrome Not-Invented-Here Syndrome Creating and Maintaining a Component Library Creating and Maintaining a Component Library Finding, Understanding and Adapting Reusable Components Finding, Understanding and Adapting Reusable Components

Refactoring: Benefits Improves Design of Software Improves Design of Software Makes Software Easier to Understand Makes Software Easier to Understand Helps in Finding Bugs Helps in Finding Bugs Helps to Program Faster (in the long term) Helps to Program Faster (in the long term)

Refactoring: Problems Lack of Software Quality Improvement Lack of Software Quality Improvement Unreliability of Refactoring Tools Unreliability of Refactoring Tools

Conclusion Use Software Reuse and Refactoring Use Software Reuse and Refactoring But not BLINDLY! But not BLINDLY!

Works Cited I Fowler, Martin. Refactoring: Improving the Design of Existing Code. Boston, MA: Addison-Wesley, Fowler, Martin. Refactoring: Improving the Design of Existing Code. Boston, MA: Addison-Wesley, Fowler, Martin. “What is Refactoring?” Refactoring Home. 1 Nov Fowler, Martin. “What is Refactoring?” Refactoring Home. 1 Nov Glynn, Erica, Strooper, Paul. “Evaluating Software Refactoring Tool Support” In Software Engineering Conference April Melbourne, Vic. Glynn, Erica, Strooper, Paul. “Evaluating Software Refactoring Tool Support” In Software Engineering Conference April Melbourne, Vic. Jacobson, Ivar and Griss, Martin and Johsson, Patrik. "Software Reuse: Architecture, Process and Organization for Business Success." Addison-Wesley Professional(1997). Jacobson, Ivar and Griss, Martin and Johsson, Patrik. "Software Reuse: Architecture, Process and Organization for Business Success." Addison-Wesley Professional(1997). Lim, Wayve C. "Managing Software Re-Use." Prentice Hall PTR(1998). Lim, Wayve C. "Managing Software Re-Use." Prentice Hall PTR(1998). Mealy, E., Carrington, D., Strooper, P., Wyeh, P “Improving Usability of Software Refactoring Tools” In Software Engineering Conference April Melbourne, Vic Mealy, E., Carrington, D., Strooper, P., Wyeh, P “Improving Usability of Software Refactoring Tools” In Software Engineering Conference April Melbourne, Vic

Works Cited II Mens, Tom, and Tourwe, Tom. “A Survey of Software Refactoring.” IEEE Transactions on Software Engineering Vol. XX No. Y (2004) 1-3. Mens, Tom, and Tourwe, Tom. “A Survey of Software Refactoring.” IEEE Transactions on Software Engineering Vol. XX No. Y (2004) 1-3. Mili, Hafedh and Mili, Ali and Yacoub, Sherif, and Addy, Edward. "Reuse-Based Software Engineering: Techniques, Organizations, and Controls." Wiley- Interscience(2001). Mili, Hafedh and Mili, Ali and Yacoub, Sherif, and Addy, Edward. "Reuse-Based Software Engineering: Techniques, Organizations, and Controls." Wiley- Interscience(2001). Mylopoulos, John, and Yu, Eric, and Yu, Yijun. “Software Refactoring Guided by Multiple Soft-Goals.” Not available. Mylopoulos, John, and Yu, Eric, and Yu, Yijun. “Software Refactoring Guided by Multiple Soft-Goals.” Not available. Simmonds, J. and T. Mens, A comparison of software refactoring tools, Technical Report vub-prog-tr-02-15, Programming Technology Lab (2002). Simmonds, J. and T. Mens, A comparison of software refactoring tools, Technical Report vub-prog-tr-02-15, Programming Technology Lab (2002). Sommerville, Ian. Software Engineering. 8th ed. New York: Addison-Wesley, Sommerville, Ian. Software Engineering. 8th ed. New York: Addison-Wesley, Spinellis, Diomidis, and Stroggylos. Konstantinos. “Refactoring – Does it Improve Software Quality?” Fifth International Workshop on Software Quality (2007) Spinellis, Diomidis, and Stroggylos. Konstantinos. “Refactoring – Does it Improve Software Quality?” Fifth International Workshop on Software Quality (2007) 1- 4.