Agile Software Development



Similar documents
Patterns in. Lecture 2 GoF Design Patterns Creational. Sharif University of Technology. Department of Computer Engineering

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Towards Software Configuration Management for Test-Driven Development

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.

Iteration 3 Kick Off, Domain Model Refinement. Curt Clifton Rose-Hulman Institute of Technology

Object-Oriented Design

Génie Logiciel et Gestion de Projets. Refactoring

SE 360 Advances in Software Development Object Oriented Development in Java. Polymorphism. Dr. Senem Kumova Metin

CSC 742 Database Management Systems

Computing Concepts with Java Essentials

AP Computer Science Java Subset

Introduction. Acknowledgments Support & Feedback Preparing for the Exam. Chapter 1 Plan and deploy a server infrastructure 1

Systems Analysis and Design

Database Design Methodology

Applications Development. Paper 28-27

Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational

Formal Engineering for Industrial Software Development

Code Qualities and Coding Practices

11 November

ASSISTING REFACTORING TOOL DEVELOPMENT THROUGH REFACTORING CHARACTERIZATION

Universität Karlsruhe (TH) Forschungsuniversität gegründet Inheritance Depth as a Cost Factor in Maintenance

ACCELRYS DISCOVERANT

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards

Bad code smells Refactoring Example

Percerons: A web-service suite that enhance software development process

Chapter 24 - Quality Management. Lecture 1. Chapter 24 Quality management

Java Interview Questions and Answers

Software Development Methodologies

Software Development Methodologies

Paul Boisvert. Director Product Management, Magento

PHP FRAMEWORK FOR DATABASE MANAGEMENT BASED ON MVC PATTERN

Software Development Process

Agile Software Development

Java (12 Weeks) Introduction to Java Programming Language

Dealing with Roles. Martin Fowler.

PHP Object Oriented Classes and objects

Java 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition

How To Design Software

OOP? What is OOP? Why? OOP in a nutshell. Stéphane Ducasse 2.1

Checking Access to Protected Members in the Java Virtual Machine

Object Oriented Design

Java Application Developer Certificate Program Competencies

Building Java Programs

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

Software Development Methodologies

An Automatic Reversible Transformation from Composite to Visitor in Java

A Case Study for Program Refactoring

Glossary of Object Oriented Terms

: provid.ir

Exercise 8: SRS - Student Registration System

A Reusability Concept for Process Automation Software

A Reverse Inheritance Relationship for Improving Reusability and Evolution: The Point of View of Feature Factorization

Domain-Specific Modelling for Cross-Platform Product Families

Search-Based Refactoring for Software Maintenance

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

Agile Software Development

Ingegneria del Software Corso di Laurea in Informatica per il Management. Object Oriented Principles

Software Development Methodologies

Roles and scope of Responsibility Within the RBAC Framework

ATM Case Study OBJECTIVES Pearson Education, Inc. All rights reserved Pearson Education, Inc. All rights reserved.

Using Testing and JUnit Across The Curriculum

Building a Flexible Software Factory Using Partial Domain Specific Models

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. September 2013 EXAMINERS REPORT

Microsoft Office Word 2010: Level 1

A logical approach to role-based access control in a distributed environment

10 Proxy Pattern [Gamma et al]

REST Client Pattern. [Draft] Bhim P. Upadhyaya ABSTRACT

Java Programming Language

Masters of Science in Software & Information Systems

C++ Programming Language

Towards Automatic Integration of the Business-Data Layers in Enterprise-Systems *

A Categorization of Classes based on the Visualization of their Internal Structure: the Class Blueprint

RANKING REFACTORING PATTERNS USING THE ANALYTICAL HIERARCHY PROCESS

CS 209 Programming in Java #1

An Approach for Extracting Modules from Monolithic Software Architectures

TAP into NAU. TAP is a single tool. How it works. Transfer Academic Plan nau.edu/tap

Object Oriented Software Models

Johannes Sametinger. C. Doppler Laboratory for Software Engineering Johannes Kepler University of Linz A-4040 Linz, Austria

Chapter 13 - Inheritance

An Introduction To UML Class Diagrams Classes

Programming and Software Development (PSD)

CTC What's New?

Analyzing Java Software by Combining Metrics and Program Visualization

NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY Computer Systems Technology Department

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science

History OOP languages Year Language 1967 Simula Smalltalk

A Practical Roadmap to SOA Governance Enterprise Integration Services

Software Engineering I: Software Technology WS 2008/09. Object Design. Bernd Bruegge. Applied Software Engineering Technische Universitaet Muenchen

Programming Cocoa with Ruby Create Compelling Mac Apps Using RubyCocoa

Detecting and Visualizing Refactorings from Software Archives

CANDIDATE RECORD SHEET: GCE Applied ICT Unit 4 WEB DESIGN

CS 111 Classes I 1. Software Organization View to this point:

Supporting Software Development through Declaratively Codified Programming Patterns

a. Inheritance b. Abstraction 1. Explain the following OOPS concepts with an example

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

Extending Objects to Support Multiple Interfaces and Access Control

III. Class and Object Diagrams

Agile Software Development

Chapter 1 Fundamentals of Java Programming

SharePoint Training DVD Videos

Transcription:

Agile Software Development Lecturer: Raman Ramsin Lecture 13 Refactoring Part 3 1

Dealing with Generalization: Pull Up Constructor Body Pull Up Constructor Body You have constructors on subclasses with mostly identical bodies. Create a superclass constructor; call this from the subclass methods. 2

Dealing with Generalization: Extract Subclass/Superclass Extract Subclass A class has features that are used only in some instances. Create a subclass for that subset of features. Extract Superclass You have two classes with similar features. Create a superclass and move the common features to the superclass. 3

Dealing with Generalization: Extract Interface Extract Interface Several clients use the same subset of a class's interface, or two classes have part of their interfaces in common. Extract the subset into an interface. 4

Dealing with Generalization: Collapse Hierarchy Collapse Hierarchy A superclass and subclass are not very different. Merge them together. 5

Dealing with Generalization: Form Template Method Form Template Method You have two methods in subclasses that perform similar steps in the same order, yet the steps are different. Get the steps into methods with the same signature, so that the original methods become the same. Then you can pull them up. 6

Dealing with Generalization: Form Template Method 7

Dealing with Generalization: Replace Inheritance with Delegation Replace Inheritance with Delegation A subclass uses only part of a superclass s interface or does not want to inherit data. Create a field for the superclass, adjust methods to delegate to the superclass, and remove the subclassing. 8

Dealing with Generalization: Replace Delegation with Inheritance Replace Delegation with Inheritance You're using delegation and are often writing many simple delegations for the entire interface. Make the delegating class a subclass of the delegate. 9

Big Refactorings: Tease Apart Inheritance Tease Apart Inheritance You have an inheritance hierarchy that is doing two jobs at once. Create two hierarchies and use delegation to invoke one from the other. 10

Big Refactorings: Tease Apart Inheritance 11

Big Refactorings: Convert Procedural Design to Objects Convert Procedural Design to Objects You have code written in a procedural style. Turn the data records into objects, break up the behavior, and move the behavior to the objects. 12

Big Refactorings: Convert Procedural Design to Objects 13

Big Refactorings: Separate Domain from Presentation Separate Domain from Presentation You have GUI classes that contain domain logic. Separate the domain logic into separate domain classes. 14

Big Refactorings: Extract Hierarchy Extract Hierarchy You have a class that is doing too much work, at least in part through many conditional statements. Create a hierarchy of classes in which each subclass represents a special case. 15

Big Refactorings: Extract Hierarchy 16

References Fowler, M., Refactoring: Improving the Design of Existing Code, Addison-Wesley, 1999. Fowler, M., Catalog of Refactorings, Published online at: http://refactoring.com/catalog/, December 2013 (last visited on: 1 December 2014). 17