1 / 10

Refactoring the Aspectizable Interfaces: An Empirical Assessment

Refactoring the Aspectizable Interfaces: An Empirical Assessment. Presenter : Patrick Joyce Authors : Paolo Tonella and Mariano Ceccato IEEE Transactions, Software Engineering, October 2005. Overview. What is Aspect-Oriented Programming (AOP)? Concepts Terminology

micol
Download Presentation

Refactoring the Aspectizable Interfaces: An Empirical Assessment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 • Aspect • 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 • 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?

More Related