Skip to main content

Making Patterns Explicit with Metaprogramming

  • Conference paper
Generative Programming and Component Engineering (GPCE 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2830))

Abstract

Design patterns have been a useful tool for a better understanding of the collaboration between several classes and objects in a program.

One drawback of this approach is the lack of an explicit representation of the patterns used in a program, as the collaboration between classes is normally expressed in the code of the class itself.

In this paper, we present a method for explicitly representing patterns in a program with the help of metaprogramming techniques. The method presented has benefits compared to traditional approaches with respect to documentation and reusability of the program, as well as providing a better separation of the protocol contained in the pattern.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baumgartner, G., Läufer, K., Russo, V.F.: On the interaction of object-oriented design patterns and programming languages. Technical Report CSD-TR-96-020, Department of Computer Science, Purdue University (1998)

    Google Scholar 

  2. Norvig, P.: Design patterns in dynamic programming (1996)

    Google Scholar 

  3. Sullivan, G.T.: Advanced programming language features for executable design patterns. Technical Report AIM-2002-005, MIT Artificial Intelligence Laboratory (2002)

    Google Scholar 

  4. Hannemann, J., Kiczales, G.: Design pattern implementation in java and AspectJ. In: Norris, C., Fenwick, J.J.B. (eds.) Proceedings of the 17th ACM conference on Object-oriented programming, systems, languages, and applications (OOPSLA 2002), New York. ACM SIGPLAN Notices, vol. 37(11), pp. 161–173. ACM Press, New York (2002)

    Chapter  Google Scholar 

  5. Sheard, T.: Accomplishments and research challenges in meta-programming. In: Taha, W. (ed.) SAIG 2001. LNCS, vol. 2196, pp. 2–44. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Kiczales, G., Rivieres, J.D., Bobrow, D.: The Art of the Metaobject Protocol. MIT Press, Cambridge (1991)

    Google Scholar 

  7. Bryant, A., Catton, A., Volder, K.D., Murphy, G.C.: Explicit programming. In: Proceedings of the 1st international conference on Aspect-oriented software development, pp. 10–18. ACM Press, New York (2002)

    Chapter  Google Scholar 

  8. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional Computing Series. Addison-Wesley Publishing Company, New York (1995)

    Google Scholar 

  9. Kuehne, T.: Internal iteration externalized. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 329–350. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  10. Agerbo, E., Cornils, A.: How to preserve the benefits of design patterns. In: Proceedings of the 13th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 1998), New York. ACM SIGPLAN Notices, vol. 33(10), pp. 134–143. ACM Press, New York (1998)

    Chapter  Google Scholar 

  11. Lieberherr, K., Orleans, D., Ovlinger, J.: Aspect-oriented programming with adaptive methods. Communications of the ACM 44, 39–41 (2001)

    Article  Google Scholar 

  12. Agerbo, E., Cornils, A.: Theory of language support for design patterns. Master’s thesis, Department of Computer Science, Aarhus University (1997)

    Google Scholar 

  13. Soukop, J.: Implementing patterns. In: Coplien, J.O., Schmidt, D.C. (eds.) Pattern Languages of Program Design, pp. 395–412. Addison-Wesley Publishing Company, Reading (1995)

    Google Scholar 

  14. Tokuda, L., Batory, D.: Evolving object-oriented designs with refactorings. In: 14th IEEE International Conference on Automated Software Engineering, pp. 174–182. IEEE Computer Society Press, Los Alamitos (1999)

    Chapter  Google Scholar 

  15. Tokuda, L., Batory, D.: Automating three modes of evolution for object-oriented software architectures. In: Proceedings of the 5th USENIX Conference on Object- Oriented Technologies and Systems (COOTS 1999), USENIX Association, Berkeley, CA, pp. 189–202 (1999)

    Google Scholar 

  16. Budinsky, F., Finnie, M., Vlissides, J., Yu, P.: Automatic code generation from design patterns. IBM Systems Journal 35, 151–171 (1996)

    Article  Google Scholar 

  17. Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley Publishing Company, Reading (2001)

    Google Scholar 

  18. Vlissides, J., Alexandrescu, A.: To code or not to code. C++ Report (March/June 2000)

    Google Scholar 

  19. Bosch, J.: Design patterns as language constructs. Journal of Object-Oriented Programming 11, 18–32 (1998)

    Google Scholar 

  20. Gil, J., Lorenz, D.H.: Design patterns vs. language design. In: Bosch, J., Mitchell, S. (eds.) ECOOP 1997 Workshops. LNCS, vol. 1357, pp. 108–111. Springer, Heidelberg (1997); Workshop on Language Support for Design Patterns and Frameworks.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

von Dincklage, D. (2003). Making Patterns Explicit with Metaprogramming. In: Pfenning, F., Smaragdakis, Y. (eds) Generative Programming and Component Engineering. GPCE 2003. Lecture Notes in Computer Science, vol 2830. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39815-8_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39815-8_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20102-1

  • Online ISBN: 978-3-540-39815-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics