Abstract
In this paper, we contribute to the characterisation of a programming style specific to aspect-oriented programming. For this purpose, we present a collection of refactorings for aspect-oriented source code, comprising refactorings to enable extraction to aspects of crosscutting concerns from object-oriented legacy code, the subsequent tidying up of the extracted aspects and factoring out of common code from similar aspects to superaspects. The second group of refactorings is documented in detail. In addition, we propose some new aspect-oriented code smells, including one smell that is specific to aspect modules. We also propose a reinterpretation of some of the traditional object-oriented code smells in the light of aspect-orientation, to detect the presence of crosscutting concerns.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Beck, K.: Extreme programming explained: Embrace change. Addison-Wesley, Reading (2000)
Bracha, G., Cook, W.: Mixin-based inheritance. In: ECOOP/OOPSLA1990: Proceedings of Conference on Object-Oriented Programming: Systems, Languages, and Applications and European Conference on Object-Oriented Programming, pp. 303–311. ACM Press, New York (1990)
Cole, L., Borba, P.: Deriving refactorings for AspectJ. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 123–134. ACM Press, New York (2005)
Colyer, A., Clement, A.: Large-scale AOSD for middleware. In: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development (AOSD 2004), pp. 56–65. ACM Press, New York (2004)
Cooper, J.: Java design patterns: A tutorial. Addison-Wesley, Reading (2000), Also available at: http://www.patterndepot.com/put/8/DesignJava.PDF
qDeursen, A., Marin, M., Moonen, L.: Aspect mining and Refactoring. In: REFACE 2003 Workshop on REFactoring: Achievements, Challenges, Effects(November 2003), Waterloo, Canada (2003)
Dijkstra, E.: Go-to statement considered harmful. Communications of the ACM 11(3), 147–148 (1968)
Eckel, B.: Thinking in Patterns, revision 0.9. book in progress (2003), Available at: www.pythoncriticalmass.com/downloads/TIPatterns-0.9.zip
Filman, R.E., Friedman, D.P.: Aspect-oriented programming is quantification and obliviousness. In: Workshop on Advanced Separation of Concerns at OOPSLA 2000, Minneapolis (2000)
Fowler, M., et al.: Refactoring – Improving the Design of Existing Code. Addison-Wesley, Reading (2000)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns. In: Elements of Reusable Object-Oriented Software, Addison-Wesley, Reading (1995)
Garcia, A., Sant’Anna, C., Figueiredo, E., Kulesza, U., Lucena, C., Staa, A.: Modularizing design patterns with aspects: A quantitative study. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 3–14. ACM Press, New York (2005)
Griswold, W.G.: Program restructuring as an aid to software maintenance. PhD Thesis, University of Washington, USA (1991)
Griswold W.G., Sullivan K.J., Song Y., Cai Y., Shonle M., Tewari N., Rajan H.: Modular software design with crosscutting interfaces. IEEE Software, Special Issue on Aspect-Oriented Programming (2006)
Hanenberg, S., Oberschulte, C., Unland, R.: Refactoring of Aspect-Oriented Software, Net.Objectdays (2003), Erfurt, Germany (2003)
Hannemann, J., Kiczales, G.: Design pattern implementation in Java and AspectJ. In: OOPSLA 2002: Proceedings of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 161–173. ACM, New York (2002)
Hannemann, J., Murphy, G., Kiczales, G.: Role-based refactoring of crosscutting concerns. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 135–146. ACM, New York (2005)
Iwamoto, M., Zhao, J.: Refactoring aspect-oriented programs. In: 4th AOSD Modelling With UML Workshop at UML 2003, San Francisco, USA (2003)
Jacobson, I., Christerson, M., Jonsson, P., Övergaard, G.: Object-oriented software engineering: A use case driven approach. Addison-Wesley, Reading (1992)
Kang, K.C., Cohen, S.G., Hess, J.A., Novak, W.E., Peterson, A.: Feature-oriented Domain Analysis Feasibility Study, SEI, Technical Report CMU/SEI-90-TR-21 (1990)
Kerievsky, J.: Refactoring to patterns. Addison-Wesley, Reading (2004)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Koppen, C., Störzer, M.: PCDiff: Attacking the fragile pointcut problem. In: EIWAS 2004: Interactive Workshop on Aspects in Software, Berlin, Germany (2004)
Laddad, R.: Aspect-oriented refactoring, parts 1 and 2. The Server Side (2003), http://www.theserverside.com/
Laddad, R.: AspectJ in Action – Practical Aspect-Oriented Programming, Manning, Greenwich, CT, USA (2003)
Monteiro, M.P.: Refactorings to Evolve Object-Oriented Systems with Aspect-Oriented Concepts. Ph.D. Thesis, Universidade do Minho, Portugal (2005)
Monteiro, M.P., Fernandes, J.M.: Object-to-aspect refactorings for feature extraction. In: AOSD 2004: Industry Track Paper at the 3rd International Conference on Aspect-Oriented Software Development,, Lancaster, UK (2004)
Monteiro, M.P., Fernandes, J.M.: Refactoring a java code base to AspectJ – An illustrative example. In: ICSM 2005: Proceedings of the IEEE International Conference on Software Maintenance 2005, Budapest, Hungary (2005)
Monteiro, M.P., Fernandes, J.M.: Towards a catalogue of aspect-oriented refactorings. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development,, pp. 111–122. ACM Press, New York (2005)
Opdyke, W.F.: Refactoring object-oriented frameworks. Ph.D. Thesis, University of Illinois at Urbana-Champaign, USA (1992)
Orleans, D.: Separating behavioral concerns with predicate dispatch, or, if statement considered harmful. In: Workshop on Advanced Separation of Concerns in Object-Oriented Systems at OOPSLA 2001, Tampa Bay, USA (2001)
Sabbah, D.: Aspects – From promise to reality. In: AOSD 2004: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pp. 1–2. ACM Press, New York (2004)
Sullivan, K.J., Griswold, W.G., Song, Y., Cai, Y., Shonle, M., Tewari, N., Rajan, H.: Information hiding interfaces for aspect-oriented design. In: ESEC/FSE 2005 Proceedings of the Joint 10th European Software Engineering Conference and 13th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 166–175. ACM Press, New York (2005)
Tonella, P., Ceccato, M.: Migrating interface implementation to aspects. In: ICSM 2004 Proceedings of 20th IEEE International Conference on Software Maintenance, Chicago, USA, pp. 220–229. IEEE Computer Society, Los Alamitos (2004)
Tourwé, T., Brichau, J., Gybels, K.: On the existence of the AOSD-Evolution paradox. In: Workshop on Software-Engineering Properties of Languages for Aspect Technologies at AOSD 2003, Boston, USA (2003)
Wake, W.: Refactoring workbook. Addison-Wesley, Reading (2004)
Zhang, C., Jacobsen, H.-A.: Quantifying aspects in middleware platforms. In: AOSD 2003: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pp. 130–139. ACM, Boston (2003)
Zhao, J.: Towards a Metrics Suite for Aspect-Oriented Software. Technical-Report, SE-2002-136-25, Information Processing Society of Japan (IPSJ) (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Monteiro, M.P., Fernandes, J.M. (2006). Towards a Catalogue of Refactorings and Code Smells for AspectJ. In: Rashid, A., Aksit, M. (eds) Transactions on Aspect-Oriented Software Development I. Lecture Notes in Computer Science, vol 3880. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11687061_7
Download citation
DOI: https://doi.org/10.1007/11687061_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-32972-5
Online ISBN: 978-3-540-32974-9
eBook Packages: Computer ScienceComputer Science (R0)