Abstract
Within the object-oriented technology community, much recent work on design reuse has focused on role-based collaborations distributed across multiple objects. Many benefits can be derived by mapping role-based designs directly into implementations, including greater ease in maintaining the connection between designs and implementations under change, and the opportunity for code reuse along with design reuse. Current efforts in role-based designs do not generally provide these benefits. We provide a method for mapping role-based designs into implementation, preserving the design without unnecessary constraints on the design structures. Roles are represented as parameterized classes, where the parameters represent the types of the participants in the collaboration. Composition of roles is implicit in the binding of parameters to classes in the implementation. The bindings are created at compile time by class definitions that are separate from the role implementations. In this paper we focus on the use of templates in the C++ language as the supporting mechanism.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
D. S. Batory and S. O'Malley. The design and implementation of hierarchical software systems with reusable components. ACM Transactions on Software Engineering and Methodology, 1(4):355–398, October 1992.
Don Batory, Vivek Singhal, Marty Sirkin, and Jeff Thomas. Scalable software libraries. In Proceedings of the First ACM SIGSOFT Symposium on Foundations of Software Engineering, pages 191–199, 1993.
Kent Beck and Ward Cunningham. A laboratory for teaching object-oriented thinking. In Proceedings of the 1989 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pages 1–6, 1989.
Gilad Bracha. The programming language JIGSAW: Mixins, Modularity and Inheritance. PhD thesis, University of Utah, 1992.
Gilad Bracha and William Cooke. Mixin-based inheritance. In Proceedings of the 1990 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pages 303–311, 1990.
Eric Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.
William Harrison and Harold Ossher. Subject-oriented programming (a critique of pure objects). In Proceedings of the 1993 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pages 411–428, 1993.
William Harrison, Harold Ossher, Randall B. Smith, and David Ungar. Subjectivity in object-oriented systems workshop summary. In Addendum to the Proceedings of the 1993 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pages 131–136, 1994.
Richard Helm, Ian M. Holland, and Dipayan Gangopadhyay. Contracts: Specifying behavioral compositions in object-oriented systems. In Proceedings of the 1990 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pages 169–180, 1990.
Ian M. Holland. The Design and Representation of Object-Oriented Components. PhD thesis, Northeastern University, 1992.
Ian M. Holland. Specifying reusable components using contracts. In Proceedings of the 1992 European Conference on Object-Oriented Programming, pages 287–308, 1992.
Ralph Johnson and Brian Foote. Designing reusable classes. Journal of Object-Oriented Programming, 1(2):22–35, June/July 1988.
Karl J. Lieberherr and Arthur J. Riel. Demeter: A CASE study of software growth through parameterized classes. Journal of Object-Oriented Programming, 1(3):8–22, August/September 1988.
Karl J. Lieberherr and Cun Xiao. Minimizing dependency on class structures with adaptive programs. In Object Technologies for Advanced Software: Proceedings of the First JSSST International Symposium, pages 424–441, 1993.
Karl J. Lieberherr and Cun Xiao. Object-oriented software evolution. IEEE Transactions on Software Engineering, 19(4):313–343, April 1993.
D. R. Musser and A. A. Stepanov. Algorithm-oriented generic libraries. Software Practice and Experience, 24(7):623–642, July 1994.
Trygve Reenskaug and Egil P. Anderson. System design by composing structures of interacting objects. In Proceedings of the 1992 European Conference on Object-Oriented Programming, pages 133–152, 1992.
Trygve Reenskaug, Egil P. Anderson, Arne Jorgen Berre, Anne Hurlen, Anton Landmark, Odd Arild Lehne, Else Nordhagen, Erik Ness-Ulseth, Gro Oftedal, Anne Lise Skaar, and Pal Stenslet. OORASS: Seamless support for the creation and maintenance of object-oriented systems. Journal of Object-Oriented Programming, 5(6):27–41, October 1992.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
VanHilst, M., Notkin, D. (1996). Using C++ templates to implement role-based designs. In: Futatsugi, K., Matsuoka, S. (eds) Object Technologies for Advanced Software. ISOTAS 1996. Lecture Notes in Computer Science, vol 1049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60954-7_41
Download citation
DOI: https://doi.org/10.1007/3-540-60954-7_41
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60954-4
Online ISBN: 978-3-540-49747-9
eBook Packages: Springer Book Archive