Skip to main content

Design patterns as aspects: A quantitative assessment

Abstract

Design patterns offer flexible solutions to common problems in software development. Recent studies have shown that several design patterns involve crosscutting concerns. Unfortunately, object-oriented (OO) abstractions are often not able to modularize those crosscutting concerns, which in turn decrease the system reusability and maintainability. Hence, it is important verifying whether aspect-oriented approaches support improved modularization of crosscutting concerns relative to design patterns. Ideally, quantitative studies should be performed to compare object-oriented and aspect-oriented implementations of classical patterns with respect to important software engineering attributes, such as coupling and cohesion. This paper presents a quantitative study that compares aspect-based and OO solutions for a representative set of design patterns. We have used stringent software engineering attributes as the assessment criteria. We have found that most aspect-oriented solutions improve separation of pattern-related concerns, although some aspect-oriented implementations of specific patterns resulted in higher coupling and more lines of code.

References

  1. [1]

    P. Alencar et al. A Query-Based Approach for Aspect Measurement and Analysis. TR CS-2004–13, School of Computer Science, University of Waterloo, Canada, February 2004

    Google Scholar 

  2. [2]

    AspectJ Team. The AspectJ Programming Guide. http://eclipse.org/aspectj/, December 2003.

  3. [3]

    V. Basili, R. Selby, D. Hutchins. Experimentation in Software Engineering.IEEE Transactions on Software Engineering, SE-12:733–743, 1986.

    Google Scholar 

  4. [4]

    S. Chidamber, C. Kemerer. A Metrics Suite for Object Oriented Design.IEEE Transactions on Software Engineering, 20(6):476–493, June 1994.

    Article  Google Scholar 

  5. [5]

    N. Fenton, S. Pfleeger. Software Metrics: A Rigorous Practical Approach. London: PWS, 1997.

    Google Scholar 

  6. [6]

    E. Gamma et al. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, 1995.

    Google Scholar 

  7. [7]

    A. Garcia. From Objects to Agents: An Aspect-Oriented Approach. Doctoral Thesis, PUC-Rio, Computer Science Department, Rio de Janeiro, Brazil, April 2004.

    Google Scholar 

  8. [8]

    A. Garcia et al. Separation of Concerns in Multi-Agent Systems: An Empirical Study. In C. Lucena et al (eds.)Software Engineering for Multi-Agent Systems II, pages 49–71, Springer, LNCS 2940, January 2004.

  9. [9]

    A. Garcia, V. Silva, C. Chavez, C. Lucena. Engineering Multi-Agent Systems with Aspects and Patterns.Journal of the Brazilian Computer Society, 1(8):57–72, July 2002.

    Google Scholar 

  10. [10]

    J. Hannemann, G. Kiczales. Design Pattern Implementation in Java and AspectJ. InProceedings of OOPSLA’02, pages 161–173, November 2002.

  11. [11]

    B. Henderson-Sellers. Object-Oriented Metrics: Measures of Complexity. Prentice Hall, 1996.

  12. [12]

    Java Reference Documentation. http://java.sun.com/reference/docs/index.html, February 2004.

  13. [13]

    A. Kersten, G. Murphy. Atlas: A Case Study in Building a Web-based learning environment using aspect-oriented programming. InProceedings of OOPSLA’99, pages 340–352, November 1999.

  14. [14]

    G. Kiczales et al. Aspect-Oriented Programming. InProceedings of ECOOP’97, LNCS (1241), Springer-Verlag, Finland, pages 220–242, June 1997.

    Google Scholar 

  15. [15]

    B. Kitchenham. Evaluating Software Engineering methods and tools, Part 1: The Evaluation Context and Evaluation Methods.ACM SIGSOFT Software Engineering Notes, 21(1):11–15, 1996.

    Article  Google Scholar 

  16. [16]

    M. Lippert, C. Lopes. A Study on Exception Detection and Handling Using Aspect-Oriented Programming. InProceedings of ICSE’00, pages 418–427, May 2000.

  17. [17]

    C. Lopes. D: A Language Framework for Distributed Programming. PhD Thesis, Northeastern University, 1997.

  18. [18]

    C. Sant’Anna. Maintainability and Reusability of Aspect-Oriented Software: An Assessment Framework. Masters Thesis, PUC-Rio, March 2004 (in Portuguese).

  19. [19]

    C. Sant’Anna et al. On the Reuse and Maintenance of Aspect-Oriented Software: An Assessment Framework. InProceedings of the 17 o Brazilian Symposium on Software Engineering, pages 19–34, October 2003.

  20. [20]

    S. Soares, E. Laureano, P. Borba. Implementing Distribution and Persistence Aspects with AspectJ. InProceedings of OOPSLA’02, pages 174–190, 2002.

  21. [21]

    P. Tarr et al. N Degrees of Separation: Multi-Dimensional Separation of Concerns. InProceedings of ICSE’99, pp. 107–119, May 1999.

  22. [22]

    R. Walker, E. Baniassad, G. Murphy. An Initial Assessment of Aspect-oriented Programming. InProceedings of ICSE’99, pages 120–130, May 1999.

Download references

Author information

Affiliations

Authors

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License ( https://creativecommons.org/licenses/by/2.0 ), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Reprints and Permissions

About this article

Cite this article

Sant’Anna, C., Garcia, A., Kulesza, U. et al. Design patterns as aspects: A quantitative assessment. J Braz Comp Soc 10, 49–63 (2004). https://doi.org/10.1007/BF03192358

Download citation

Keywords

  • Design patterns
  • aspect-oriented programming
  • metrics