Roles as Modular Units of Composition

Fernando Barbosa, Ademar Aguiar

Abstract

Object oriented decomposition is the most successful decomposition strategy used nowadays. But a single decomposition strategy cannot capture all aspects of a concept. Roles have been successfully used to model the different views a concept may provide but, despite this, roles have not been used as building blocks. Roles are mostly used to extend objects at runtime. In this paper we propose roles as a way to compose classes that provides a modular way of capturing and reusing those aspects that fall outside a concept’s main purpose, while being close to the OO approach. We present how roles can be made modular and reusable. We also show how we can use roles to compose classes using JavaStage, a java extension that support roles To validate our approach we developed generic and reusable roles for the Gang of Four patterns. We were able to develop reusable roles for 10 out of 23 patterns, which is a good outcome.e.

References

  1. Bachman, C. W., Daya, M., (1977): The role concept in data models, in Proceedings of the 3rd International Conference on Very Large Databases 464-476.
  2. Baldoni, M., Boella, G. van der Torre, L., (2007): Interaction between Objects in powerJava, journal of Object Technologies 6, 7 - 12.
  3. Black, A. and Scharli, N. (2004) Programming with traits. In Proceedings of the International Conference on Software Engineering 2004, May 2004.
  4. Bracha, G. and Cook, W. (1990): Mixin-Based Inheritance. In Proceedings of the OOPSLA/ECOOP, pages 303-311, Ottawa, Canada. ACM Press.
  5. Bracha, G. (1992): The programming language jigsaw: mixins, modularity and multiple inheritance. PhD thesis, University of Utah.
  6. Chernuchin, D., and Dittrich, G. 2005. Role Types and their Dependencies as Components of Natural Types. In 2005 AAAI Fall Symposium: Roles, an interdisciplinary perspective.
  7. Chernuchin, D., Lazar, O. S., and Dittrich, G., (2005) Comparison of Object-Oriented Approaches for Roles in Programming Languages, Papers from the 2005 Fall Symposium, ed.
  8. Devanbu, P.; Batory, B.; Kiczales, G.; Launchbury, J.; Parnas, D.; Tarr, P. (2003); "Modularity in the new millennium: a panel summary", Proc. of the 25th International Conference on Software Engineering
  9. Ducasse, S., Schaerli, N., Nierstrasz, O., Wuyts, R. and Black, A. (2004): Traits: A mechanism for finegrained reuse. In Transactions on Programming Languages and Systems.
  10. Filman, R. E., Friedman, D. P.: Aspect-oriented programming is quantification and obliviousness. In: Workshop on Advanced Separation of Concerns at OOPSLA (2000)
  11. Gamma, E., Helm, R., Johnson, R. and Vlissides, J., (1995): Design Patterns: Elements of Reusable ObjectOriented Software, Addison-Wesley.
  12. Griswold, W.G., Sullivan, K., Song, Y., Shonle, M., Tewari, N., Cai, Y., Rajan, H., 2006: Modular Software Design with Crosscutting Interfaces. IEEE Software 23(1), 51-60 (2006)
  13. Graversen, K. B., (2006): The nature of roles - A taxonomic analysis of roles as a language construct, Ph. D. Thesis, IT University of Copenhagen, Denmark
  14. Hannemann J., Kiczales G. 2002. Design Pattern Implementation in Java and AspectJ. Proceedings of the 17th Conference on Object-Oriented Programming, Systems, Languages, and Applications, Seattle, USA.
  15. Herrmann, S., (2005): Programming with Roles in ObjectTeams/Java. AAAI Fall Symposium: "Roles, An Interdisciplinary Perspective".
  16. Ingesman, M. D., Ernst, E. 2011. Lifted Java: A Minimal Calculus for Translation Polymorphism, in Proceeding of the International Conference on Objects, Models, Components and Patterns, Zurich, Switzerland
  17. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold. W. G., (2001): An overview of AspectJ. In proceedings of ECOOP 2001, Budapest, Hungary, (LNCS, vol. 2072), Springer; 327-335, 200
  18. Koppen, C., Störzer, M.: PCDiff, 2004: Attacking the fragile pointcut problem. In: European Interactive Workshop on Aspects in Software, Berlin, Germany
  19. Parnas, D. L., (1972): On the criteria to be used in decomposing systems into modules. Commun. ACM 15, 12, Dec. 1972, 1053-1058
  20. Pradel, M., (2008): Explicit Relations with Roles - A Library Approach. Workshop on Relationships and Associations in Object-Oriented Languages (RAOOL)
  21. Przybylek, A. Systems Evolution and Software Reuse in Object-Oriented Programming and Aspect-Oriented Programming, J. Bishop and A. Vallecillo (Eds.): TOOLS 2011, LNCS 6705, pp. 163-178, 2011.
  22. Quitslund, P. and Black, A. (2004): Java with traits - improving opportunities for reuse. In Proceedings of the 3rd International Workshop on Mechanisms for Specialization, Generalization and inheritance
  23. Riehle, D. and Gross, T. 1998. Role Model Based Framework Design and Integration.” In Proceedings of the 1998 Conference on Object-Oriented Programming Systems, Languages, and Applications
  24. Riehle, D. 2000. Framework Design: A Role Modeling Approach, Ph. D. Thesis, Swiss Federal Institute of technology, Zurich.
  25. Scharli, N., Ducasse, S., Nierstrasz, O. and Black, A. (2003): Traits: Composable units of behavior. In Proceedings of ECOOP 2003, volume 2743 of Lecture Notes in Computer Science. Springer.
  26. Smith, C. and Drossopoulou, S. (2005): Chai: Traits for Java-like languages. In Proceedings of ECOOP 2005.
  27. Steimann, F., (2000): On the representation of roles in object-oriented and conceptual modeling. Data & Knowledge Engineering 35(1):83-106.
  28. Steimann, F., 2006, The paradoxical success of aspectoriented programming“, in OOPSLA 7806, Proceedings of the 21st Annual Conference on Object-Oriented Programming Languages, Systems, and Applications
  29. Tamai, T., Ubayashi, N., and Ichiyama, R., (2007): Objects as Actors Assuming Roles in the Environment, in Software Engineering For MultiAgent Systems V: Research Issues and Practical Applications, Lecture Notes In Computer Science, vol. 4408. Springer-Verlag, Berlin, Heidelberg, 185-203
  30. Tarr, P. L., Ossher, H., Harrison, W. H., and S. M. S. Jr. 1999. N degrees of separation: Multi-dimensional separation of concerns. In International Conference on Software Engineering.
Download


Paper Citation


in Harvard Style

Barbosa F. and Aguiar A. (2012). Roles as Modular Units of Composition . In Proceedings of the 7th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE, ISBN 978-989-8565-13-6, pages 13-22. DOI: 10.5220/0003972600130022


in Bibtex Style

@conference{enase12,
author={Fernando Barbosa and Ademar Aguiar},
title={Roles as Modular Units of Composition},
booktitle={Proceedings of the 7th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE,},
year={2012},
pages={13-22},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0003972600130022},
isbn={978-989-8565-13-6},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 7th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE,
TI - Roles as Modular Units of Composition
SN - 978-989-8565-13-6
AU - Barbosa F.
AU - Aguiar A.
PY - 2012
SP - 13
EP - 22
DO - 10.5220/0003972600130022