Design Patterns as Aspects: A Quantitative Assessment
Resumo
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 aspectoriented solutions improve separation of pattern-related concerns, although some aspect-oriented implementations of specific patterns resulted in higher coupling and more lines of code.Referências
Alencar, P. et al. "A Query-Based Approach for Aspect Measurement and Analysis". TR CS-2004-13, School of Computer Science, Univ. of Waterloo, Canada, February 2004
AspectJ Team. "The AspectJ Programming Guide". http://eclipse.org/aspectj/.
Chidamber, S., Kemerer, C. "A Metrics Suite for Object Oriented Design". IEEE Transactions on Software Engineering, 20 (6), June 1994, pp. 476-493.
Fenton, N., Pfleeger, S. "Software Metrics: A Rigorous Practical Approach". London: PWS, 1997.
Gamma, E. et al. "Design Patterns: Elements of Reusable Object-Oriented Software". Addison-Wesley, Reading, 1995.
Garcia, A. "From Objects to Agents: An Aspect-Oriented Approach". Doctoral Thesis, PUC-Rio, Computer Science Department, Rio de Janeiro, Brazil, April 2004.
Garcia, A. et al. "Separation of Concerns in Multi-Agent Systems: An Empirical Study". In Software Engineering for Multi-Agent Systems II, Springer, LNCS 2940, January 2004.
Garcia, A., Silva, V., Chavez, C., Lucena, C. "Engineering Multi-Agent Systems with Aspects and Patterns". J. of the Brazilian Computer Society, 1 (8), July 2002, pp 57-72.
Hannemann, J., Kiczales, G. "Design Pattern Implementation in Java and AspectJ". Proceedings of OOPSLA'02, November 2002, pp. 161-173.
Henderson-Sellers, B. "Object-Oriented Metrics: Measures of Complexity". Prentice Hall, 1996.
Java Reference Documentation. http://java.sun.com/reference/docs/index.html.
Kersten, A., Murphy, G. "Atlas: A Case Study in Building a Web-based learning environment using aspect-oriented programming". Proc. of OOPSLA'99, November 1999.
Kiczales, G. et al. "Aspect-Oriented Programming". Proceedings of ECOOP'97, LNCS (1241), Springer-Verlag, Finland, June 1997, pp. 220-242.
Lippert, M., Lopes, C. "A Study on Exception Detection and Handling Using Aspect-Oriented Programming." Proc. ICSE'00, Limerick, Ireland, May 2000, pp. 418 - 427.
Lopes, C. "D: A Language Framework for Distributed Programming". PhD Thesis, Northeastern University, 1997.
Sant'Anna, C. "Maintainability and Reusability of Aspect-Oriented Software: An Assessment Framework". Masters Thesis, PUC-Rio, March 2004 (in Portuguese).
Sant'Anna, C. et al. "On the Reuse and Maintenance of Aspect-Oriented Software: An Assessment Framework". Proc. of SBES'03, Manaus, Brazil, October 2003, pp. 19-34.
Soares, S., Laureano, E., Borba, P. "Implementing Distribution and Persistence Aspects with AspectJ". Proceedings of the OOPSLA'02, pp. 174-190.
Tarr, P. et al. "N Degrees of Separation: Multi-Dimensional Separation of Concerns". Proceedings ICSE'99, Los Angeles, USA, May 1999, pp. 107-119.
Walker, R., Baniassad, E., Murphy, G. "An Initial Assessment of Aspect-oriented Programming". Proceedings of ICSE'99, Los Angeles, USA, May 1999, pp. 120-130.
AspectJ Team. "The AspectJ Programming Guide". http://eclipse.org/aspectj/.
Chidamber, S., Kemerer, C. "A Metrics Suite for Object Oriented Design". IEEE Transactions on Software Engineering, 20 (6), June 1994, pp. 476-493.
Fenton, N., Pfleeger, S. "Software Metrics: A Rigorous Practical Approach". London: PWS, 1997.
Gamma, E. et al. "Design Patterns: Elements of Reusable Object-Oriented Software". Addison-Wesley, Reading, 1995.
Garcia, A. "From Objects to Agents: An Aspect-Oriented Approach". Doctoral Thesis, PUC-Rio, Computer Science Department, Rio de Janeiro, Brazil, April 2004.
Garcia, A. et al. "Separation of Concerns in Multi-Agent Systems: An Empirical Study". In Software Engineering for Multi-Agent Systems II, Springer, LNCS 2940, January 2004.
Garcia, A., Silva, V., Chavez, C., Lucena, C. "Engineering Multi-Agent Systems with Aspects and Patterns". J. of the Brazilian Computer Society, 1 (8), July 2002, pp 57-72.
Hannemann, J., Kiczales, G. "Design Pattern Implementation in Java and AspectJ". Proceedings of OOPSLA'02, November 2002, pp. 161-173.
Henderson-Sellers, B. "Object-Oriented Metrics: Measures of Complexity". Prentice Hall, 1996.
Java Reference Documentation. http://java.sun.com/reference/docs/index.html.
Kersten, A., Murphy, G. "Atlas: A Case Study in Building a Web-based learning environment using aspect-oriented programming". Proc. of OOPSLA'99, November 1999.
Kiczales, G. et al. "Aspect-Oriented Programming". Proceedings of ECOOP'97, LNCS (1241), Springer-Verlag, Finland, June 1997, pp. 220-242.
Lippert, M., Lopes, C. "A Study on Exception Detection and Handling Using Aspect-Oriented Programming." Proc. ICSE'00, Limerick, Ireland, May 2000, pp. 418 - 427.
Lopes, C. "D: A Language Framework for Distributed Programming". PhD Thesis, Northeastern University, 1997.
Sant'Anna, C. "Maintainability and Reusability of Aspect-Oriented Software: An Assessment Framework". Masters Thesis, PUC-Rio, March 2004 (in Portuguese).
Sant'Anna, C. et al. "On the Reuse and Maintenance of Aspect-Oriented Software: An Assessment Framework". Proc. of SBES'03, Manaus, Brazil, October 2003, pp. 19-34.
Soares, S., Laureano, E., Borba, P. "Implementing Distribution and Persistence Aspects with AspectJ". Proceedings of the OOPSLA'02, pp. 174-190.
Tarr, P. et al. "N Degrees of Separation: Multi-Dimensional Separation of Concerns". Proceedings ICSE'99, Los Angeles, USA, May 1999, pp. 107-119.
Walker, R., Baniassad, E., Murphy, G. "An Initial Assessment of Aspect-oriented Programming". Proceedings of ICSE'99, Los Angeles, USA, May 1999, pp. 120-130.
Publicado
18/10/2004
Como Citar
SANT’ANNA, Cláudio; GARCIA, Alessandro; KULESZA, Uirá; LUCENA, Carlos; STAA, Arndt von.
Design Patterns as Aspects: A Quantitative Assessment. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 18. , 2004, Brasília/DF.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2004
.
p. 113-129.
DOI: https://doi.org/10.5753/sbes.2004.23837.