A Sequence of Patterns for Reusable Aspect Libraries with Easy Configuration

  • Maarten Bynens
  • Eddy Truyen
  • Wouter Joosen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6708)


Using well-known AspectJ idioms has been shown to increase the reusability of aspect libraries. Availability of such reusable libraries is an important motivating factor to drive the further adoption of AspectJ in industry and aspect-oriented-programming in general. Existing work, however, mostly presents the existing AspectJ idioms as relatively independent solutions. As experience grows in using these idioms, it is possible to increasingly combine related idioms to form patterns and subsequently, pattern languages. A pattern language provides a structured process on how to apply a family of related patterns and idioms that cover a particular domain or discipline. This paper presents a first step towards a pattern language for building reusable aspect libraries in the form of a sequence of aspect-oriented patterns that each combine a set of idioms to achieve (i) a configurable core design of the aspect library, (ii) library-controlled mediation of the interactions between the different aspects in the library and (iii) flexible configuration by providing multiple alternative modes for binding the aspect library to an application. An initial evaluation of the pattern sequence in the context of a pricing library shows improved reusability and ease-of-configuration in comparison to an existing idiom-based implementation of the pricing library.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Buschmann, F., Henney, K., Schmidt, D.: Pattern Oriented Software Architecture: On Patterns and Pattern Languages. Wiley Software Patterns Series. John Wiley & Sons, Chichester (2007)Google Scholar
  2. 2.
    Bynens, M., Truyen, E., Joosen, W.: A system of patterns for reusable aspect libraries. Transactions on Aspect-Oriented Software Development  VIII (2011) (accepted), http://distrinet.cs.kuleuven.be/software/aodesignpatterns
  3. 3.
    Cibrán, M.A., D’Hondt, M.: A slice of MDE with AOP: Transforming high-level business rules to aspects. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 170–184. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. 4.
    Clifton, C., Leavens, G.T., Aumann, Y.: MAO: Ownership and effects for more effective reasoning about aspects. In: Bateni, M. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 451–475. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  5. 5.
    Cunha, C.A., Sobral, J.L., Monteiro, M.P.: Reusable aspectoriented implementations of concurrency patterns and mechanisms. In: AOSD, pp. 134–145. ACM, New York (2006)CrossRefGoogle Scholar
  6. 6.
    DHondt, M., Jonckers, V.: Hybrid aspects for weaving object-oriented functionality and rule-based knowledge. In: AOSD, pp. 132–140 (2004)Google Scholar
  7. 7.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns, Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)MATHGoogle Scholar
  8. 8.
    Greenwood, P., Bartolomei, T., Figueiredo, E., Dosea, M., Garcia, A., Cacho, N., Sant’Anna, C., Soares, S., Borba, P., Kulesza, U., Rashid, A.: On the impact of aspectual decompositions on design stability: An empirical study. In: Bateni, M. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 176–200. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  9. 9.
    Griswold, W.G., Sullivan, K., Song, Y., Shonle, M., Tewari, N., Cai, Y., Rajan, H.: Modular software design with crosscutting interfaces. IEEE Softw. 23(1), 51–60 (2006)CrossRefGoogle Scholar
  10. 10.
    Hanenberg, S., Schmidmeier, A.: Idioms for building software frameworks in aspectj. In: AOSD Workshop on Aspects, Components, and Patterns for Infrastructure Software (2003)Google Scholar
  11. 11.
    Hanenberg, S., Unland, R.: Using and Reusing Aspects in AspectJ. In: Workshop on Advanced Separation of Concerns, OOPSLA (2001)Google Scholar
  12. 12.
    Hanenberg, S., Unland, R., Schmidmeier, A.: AspectJ Idioms for Aspect- Oriented Software Construction. In: Proceedings of EuroPLoP, pp. 617–644 (2003)Google Scholar
  13. 13.
    Hoffman, K., Eugster, P.: Towards reusable components with aspects: an empirical study on modularity and obliviousness. In: ICSE, pp. 91–100. ACM, New York (2008)CrossRefGoogle Scholar
  14. 14.
    Kellens, A., Mens, K., Brichau, J., Gybels, K.: Managing the evolution of aspect-oriented software with model-based pointcuts. In: Hu, Q. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 501–525. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  15. 15.
    Kiczales, G., Mezini, M.: Separation of concerns with procedures, annotations, advice and pointcuts. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 195–213. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  16. 16.
    Kienzle, J., Gélineau, S.: Ao challenge - implementing the acid properties for transactional objects. In: AOSD, pp. 202–213. ACM, New York (2006)CrossRefGoogle Scholar
  17. 17.
    Koppen, C., Stoerzer, M.: Pcdiff: Attacking the fragile pointcut problem. In: First European Interactive Workshop on Aspects in Software, EIWAS (2004)Google Scholar
  18. 18.
    Kuhlemann, M., Kästner, C.: Reducing the complexity of AspectJ mechanisms for recurring extensions. In: Proc. GPCE Workshop on Aspect- Oriented Product Line Engineering, AOPLE (2007)Google Scholar
  19. 19.
    Laddad, R.: AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications Co, Greenwich (2003)Google Scholar
  20. 20.
    Lagaisse, B., Joosen, W.: Decomposition into elementary pointcuts: A design principle for improved aspect reusability. In: SPLAT (2006)Google Scholar
  21. 21.
    Li, W., Henry, S.M.: Object-oriented metrics that predict maintainability. Journal of Systems and Software 23(2), 111–122 (1993)CrossRefGoogle Scholar
  22. 22.
    Marot, A., Wuyts, R.: Composing aspects with aspects. In: AOSD, pp. 157–168. ACM, New York (2010)Google Scholar
  23. 23.
    Miles, R.: AspectJ Cookbook. O’Reilly Media, Inc, Sebastopol (2004)Google Scholar
  24. 24.
    Monteiro, M.P., Fernandes, J.M.: Towards a catalogue of refactorings and code smells for aspectj. T. Aspect-Oriented Software Development, 1, 214–258 (2006)CrossRefMATHGoogle Scholar
  25. 25.
    Noble, J., Schmidmeier, A., Pearce, D.J., Black, A.P.: Patterns of aspect-oriented design. In: In Proceedings of European Conference on Pattern Languages of Programs (2007)Google Scholar
  26. 26.
    Rajan, H., Leavens, G.T.: Ptolemy: A language with quantified, typed events. In: Ryan, M. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 155–179. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  27. 27.
    Rashid, A., Chitchyan, R.: Persistence as an aspect. In: AOSD, pp. 120–129. ACM, New York (2003)Google Scholar
  28. 28.
    Rho, T., Kniesel, G., Appeltauer Fine-grained, M.: generic aspects. In: Foundations of Aspect-Oriented Languages (2006)Google Scholar
  29. 29.
    Santos, A.L., Koskimies, K.: Modular hot spots: A pattern language for developing high-level framework reuse interfaces. In: In Proceedings of European Conference on Pattern Languages of Programs (2008)Google Scholar
  30. 30.
    Schmidmeier, A.: Cooperating aspects. In: Proceedings of EuroPLoP (2005)Google Scholar
  31. 31.
    SpringSource. Spring roo, http://www.springsource.org/roo
  32. 32.
    Steimann, F.: The paradoxical success of aspect-oriented programming. SIGPLAN Not., 41(10), 481–497 (2006)CrossRefGoogle Scholar
  33. 33.
    Tourwe, T., Brichau, J., Gybels, K.: On the Existence of the AOSD-Evolution Paradox. In: SPLAT Workshop, Boston, AOSD (2003)Google Scholar
  34. 34.
    Wiese, D., Meunier, R., Hohenstein, U.: How to convince industry of aop. In: AOSD, Industry Track (2007)Google Scholar
  35. 35.
    Zschaler, S., Rashid, A.: Aspect assumptions: a retrospective study of aspectj developers assumptions about aspect usage. In: AOSD, pp. 93–104. ACM, New York (2011)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Maarten Bynens
    • 1
  • Eddy Truyen
    • 1
  • Wouter Joosen
    • 1
  1. 1.DistriNet, K.U.LeuvenThe Netherlands

Personalised recommendations