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.
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
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)
Norvig, P.: Design patterns in dynamic programming (1996)
Sullivan, G.T.: Advanced programming language features for executable design patterns. Technical Report AIM-2002-005, MIT Artificial Intelligence Laboratory (2002)
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)
Sheard, T.: Accomplishments and research challenges in meta-programming. In: Taha, W. (ed.) SAIG 2001. LNCS, vol. 2196, pp. 2–44. Springer, Heidelberg (2001)
Kiczales, G., Rivieres, J.D., Bobrow, D.: The Art of the Metaobject Protocol. MIT Press, Cambridge (1991)
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)
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)
Kuehne, T.: Internal iteration externalized. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 329–350. Springer, Heidelberg (1999)
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)
Lieberherr, K., Orleans, D., Ovlinger, J.: Aspect-oriented programming with adaptive methods. Communications of the ACM 44, 39–41 (2001)
Agerbo, E., Cornils, A.: Theory of language support for design patterns. Master’s thesis, Department of Computer Science, Aarhus University (1997)
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)
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)
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)
Budinsky, F., Finnie, M., Vlissides, J., Yu, P.: Automatic code generation from design patterns. IBM Systems Journal 35, 151–171 (1996)
Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley Publishing Company, Reading (2001)
Vlissides, J., Alexandrescu, A.: To code or not to code. C++ Report (March/June 2000)
Bosch, J.: Design patterns as language constructs. Journal of Object-Oriented Programming 11, 18–32 (1998)
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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