Abstract
A single decomposition strategy cannot capture all aspects of a concept, so we need to extend Object Oriented Decomposition (today most used strategy). We propose roles as a way to compose classes that provides a modular way of capturing and reusing those concerns that fall outside a concept’s main purpose, while being a natural extension of the OO paradigm. Roles have been used successfully to model the different views a concept provides and we want to bring that experience to the programming level. We discuss how to make roles modular and reusable. We also show how to compose classes with roles using JavaStage, our role supporting language. To validate our approach we developed generic and reusable roles for the Gang of Four patterns. We developed reusable roles for 10 out of 23 patterns. We also were able to use some of these roles in JHotDraw framework.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Tarr, P.L., Ossher, H., Harrison, W.H., Sutton, Jr., S.M.: N degrees of separation: Multi-dimensional separation of concerns. In: International Conference on Software Engineering (1999)
Bachman, C.W., Daya, M.: The role concept in data models. In: Proceedings of the 3rd International Conference on Very Large Databases, pp. 464–476 (1977)
Graversen, K.B.: The nature of roles - A taxonomic analysis of roles as a language construct, Ph. D. Thesis, IT University of Copenhagen, Denmark (2006)
Steimann, F.: On the representation of roles in object-oriented and conceptual modeling. Data & Knowledge Engineering 35(1), 83–106 (2000)
Herrmann, S.: Programming with Roles in ObjectTeams/Java. In: AAAI Fall Symposium: ”Roles, An Interdisciplinary Perspective” (2005)
Baldoni, M., Boella, G., van der Torre, L.: Interaction between Objects in power-Java. Journal of Object Technologies 6, 7–12 (2007)
Tamai, T., Ubayashi, N., Ichiyama, R.: Objects as Actors Assuming Roles in the Environment. In: Choren, R., Garcia, A., Giese, H., Leung, H.-f., Lucena, C., Romanovsky, A. (eds.) SELMAS. LNCS, vol. 4408, pp. 185–203. Springer, Heidelberg (2007)
Riehle, D., Gross, T.: Role Model Based Framework Design and Integration.’. In: Proceedings of the, Conference on Object-Oriented Programming Systems, Languages, and Applications (1998)
Pradel, M.: Explicit Relations with Roles - A Library Approach. In: Workshop on Relationships and Associations in Object-Oriented Languages, RAOOL (2008)
Riehle, D.: Framework Design: A Role Modeling Approach, Ph. D. Thesis, Swiss Federal Institute of technology, Zurich (2000)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Lindskov Knudsen, J. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–335. Springer, Heidelberg (2001)
Steimann, F.: The paradoxical success of aspect-oriented programming“. In: Proceedings of the 21st Annual Conference on Object-Oriented Programming Languages, Systems, and Applications, OOPSLA 2006 (2006)
Przybyłek, A.: Systems Evolution and Software Reuse in Object-Oriented Programming and Aspect-Oriented Programming. In: Bishop, J., Vallecillo, A. (eds.) TOOLS 2011. LNCS, vol. 6705, pp. 163–178. Springer, Heidelberg (2011)
Koppen, C., Störzer, M.: PCDiff, 2004: Attacking the fragile pointcut problem. In: European Interactive Workshop on Aspects in Software, Berlin, Germany (2004)
Filman, R.E., Friedman, D.P.: Aspect-oriented programming is quantification and oblivi-ousness. In: Workshop on Advanced Separation of Concerns at OOPSLA (2000)
Griswold, W.G., Sullivan, K., Song, Y., Shonle, M., Tewari, N., Cai, Y., Rajan, H.: Modular Software Design with Crosscutting Interfaces. IEEE Software 23(1), 51–60 (2006)
Bracha, G., Cook, W.: Mixin-Based Inheritance. In: Proceedings of the OOPSLA/ECOOP, Ottawa, Canada, pp. 303–311. ACM Press (1990)
Bracha, G.: The programming language jigsaw: mixins, modularity and multiple inheritance. PhD thesis, University of Utah (1992)
Scharli, N., Ducasse, S., Nierstrasz, O., Black, A.P.: Traits: Composable units of behavior. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 248–274. Springer, Heidelberg (2003)
Ducasse, S., Schaerli, N., Nierstrasz, O., Wuyts, R., Black, A.:: Traits: A mechanism for fine-grained reuse. Transactions on Programming Languages and Systems (2004)
Black, A., Scharli, N.: Programming with traits. In: Proceedings of the International Conference on Software Engineering (2004)
Quitslund, P., Black, A.: Java with traits - improving opportunities for reuse. In: Proceedings of the 3rd International Workshop on Mechanisms for Specialization, Generalization and Inheritance (2004)
Smith, C., Drossopoulou, S.: chai: Traits for java-like languages. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 453–478. Springer, Heidelberg (2005)
Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972)
Ingesman, M.D., Ernst, E.: Lifted Java: A Minimal Calculus for Translation Polymorphism. In: Proceeding of the International Conference on Objects, Models, Components and Patterns, Zurich, Switzerland (2011)
Hannemann, J., Kiczales, G.: Design Pattern Implementation in Java and AspectJ. In: Proceedings of the 17th Conference on Object-Oriented Programming, Seattle, USA (2002)
Chernuchin, D., Dittrich, G.: Role Types and their Dependencies as Components of Natural Types. In: 2005 AAAI Fall Symposium: Roles, , An Interdisciplinary Perspective (2005)
Chernuchin, D., Lazar, O.S., Dittrich, G.: Comparison of Object-Oriented Approaches for Roles in Programming Languages. In: Papers from the, Fall Symposium (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Barbosa, F., Aguiar, A. (2013). Using Roles as Units of Composition. In: Maciaszek, L.A., Filipe, J. (eds) Evaluation of Novel Approaches to Software Engineering. ENASE 2012. Communications in Computer and Information Science, vol 410. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45422-6_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-45422-6_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-45421-9
Online ISBN: 978-3-642-45422-6
eBook Packages: Computer ScienceComputer Science (R0)