Presentation is loading. Please wait.

Presentation is loading. Please wait.

Refactoring the Aspectizable Interfaces: An Empirical Assessment

Similar presentations


Presentation on theme: "Refactoring the Aspectizable Interfaces: An Empirical Assessment"— Presentation transcript:

1 Refactoring the Aspectizable Interfaces: An Empirical Assessment
Presenter: Patrick Joyce Authors: Paolo Tonella and Mariano Ceccato IEEE Transactions, Software Engineering, October 2005

2 Overview What is Aspect-Oriented Programming (AOP)?
Concepts Terminology What are Aspectizable Interfaces? How can we benefit from this design? Maintainability Understandability Size Reduction Modularity

3 Aspect-Oriented Programming
Goal: Separate orthogonal and principle concerns Benefits Collect “scattered” code into one maintainable unit No original source code required to add/remove aspects Example: class BarChart Principle Concerns LoadChart() DisplayChart() SaveChart() Orthogonal Concern Logging

4 Aspect-Oriented Programming
Primary modularization unit Represents an orthogonal concern Joinpoint A specific area of execution in an application E.g., object instantiation, method call, variable declaration, etc. Pointcut A collection of joinpoints; specifies where the concern applies E.g., (AspectJ) - pointcut callSetMethods(): call(void set*(..)); Advice The implementation of the aspects; defines how and where to implements the concern Weaving The process of combining the aspect code with the original application

5 Aspectizable Interfaces
Interface Roles Collect abstract properties of the principal concern of the class Collect transversal properties that crosscut the principal concern of the class Non-Aspectizable Interfaces Adhere to the first role Example: Collection Aspectizable Interfaces Adhere to the second role Examples: Serializable, Observable (note: normally end with “able”)

6 Refactoring Aspectizable Interfaces
Move interface properties to aspect Attributes Methods Inner Classes UNPLUG Input: A.java, I.java Output: A’.java, IA.aj

7 Refactoring Example: Observable
See Eclipse Project

8 Refactoring Analysis Hypotheses Application Analysis Methods
AOP code for aspectizable interfaces: Is easier to maintain. Is easier to understand. Is significantly smaller in size. Improves modularity. Application Refactor a large proportion of the standard Java library Refactor three open source programs Analysis Methods (1,2) Empirical Maintenance Study (3,4) Customized Metrics (UCLOC, OP, OCOH, ACOH, ICOUPL)

9 Refactoring Results Class cohesion increased
Extracted methods are loosely connection with other class operations Interface coupling decreased Size remained untouched Understandability increased Maintainability remained similar Possibly due to the relative size

10 Conclusion Questions?


Download ppt "Refactoring the Aspectizable Interfaces: An Empirical Assessment"

Similar presentations


Ads by Google