Refactoring the Aspectizable Interfaces: An Empirical Assessment - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Refactoring the Aspectizable Interfaces: An Empirical Assessment

Description:

Collect 'scattered' code into one maintainable unit ... Advice. The implementation of the aspects; defines how and where to implements the concern ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 11
Provided by: patric348
Category:

less

Transcript and Presenter's Notes

Title: Refactoring the Aspectizable Interfaces: An Empirical Assessment


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?
Write a Comment
User Comments (0)
About PowerShow.com