Skip to main content

Using Roles as Units of Composition

  • Conference paper
  • 309 Accesses

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 410))

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

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. Steimann, F.: On the representation of roles in object-oriented and conceptual modeling. Data & Knowledge Engineering 35(1), 83–106 (2000)

    Article  MATH  Google Scholar 

  5. Herrmann, S.: Programming with Roles in ObjectTeams/Java. In: AAAI Fall Symposium: ”Roles, An Interdisciplinary Perspective” (2005)

    Google Scholar 

  6. Baldoni, M., Boella, G., van der Torre, L.: Interaction between Objects in power-Java. Journal of Object Technologies 6, 7–12 (2007)

    Google Scholar 

  7. 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)

    Chapter  Google Scholar 

  8. 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)

    Google Scholar 

  9. Pradel, M.: Explicit Relations with Roles - A Library Approach. In: Workshop on Relationships and Associations in Object-Oriented Languages, RAOOL (2008)

    Google Scholar 

  10. Riehle, D.: Framework Design: A Role Modeling Approach, Ph. D. Thesis, Swiss Federal Institute of technology, Zurich (2000)

    Google Scholar 

  11. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995)

    Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Chapter  Google Scholar 

  15. Koppen, C., Störzer, M.: PCDiff, 2004: Attacking the fragile pointcut problem. In: European Interactive Workshop on Aspects in Software, Berlin, Germany (2004)

    Google Scholar 

  16. Filman, R.E., Friedman, D.P.: Aspect-oriented programming is quantification and oblivi-ousness. In: Workshop on Advanced Separation of Concerns at OOPSLA (2000)

    Google Scholar 

  17. 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)

    Article  Google Scholar 

  18. Bracha, G., Cook, W.: Mixin-Based Inheritance. In: Proceedings of the OOPSLA/ECOOP, Ottawa, Canada, pp. 303–311. ACM Press (1990)

    Google Scholar 

  19. Bracha, G.: The programming language jigsaw: mixins, modularity and multiple inheritance. PhD thesis, University of Utah (1992)

    Google Scholar 

  20. 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)

    Chapter  Google Scholar 

  21. Ducasse, S., Schaerli, N., Nierstrasz, O., Wuyts, R., Black, A.:: Traits: A mechanism for fine-grained reuse. Transactions on Programming Languages and Systems (2004)

    Google Scholar 

  22. Black, A., Scharli, N.: Programming with traits. In: Proceedings of the International Conference on Software Engineering (2004)

    Google Scholar 

  23. 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)

    Google Scholar 

  24. 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)

    Chapter  Google Scholar 

  25. Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972)

    Article  Google Scholar 

  26. 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)

    Google Scholar 

  27. Hannemann, J., Kiczales, G.: Design Pattern Implementation in Java and AspectJ. In: Proceedings of the 17th Conference on Object-Oriented Programming, Seattle, USA (2002)

    Google Scholar 

  28. Chernuchin, D., Dittrich, G.: Role Types and their Dependencies as Components of Natural Types. In: 2005 AAAI Fall Symposium: Roles, , An Interdisciplinary Perspective (2005)

    Google Scholar 

  29. Chernuchin, D., Lazar, O.S., Dittrich, G.: Comparison of Object-Oriented Approaches for Roles in Programming Languages. In: Papers from the, Fall Symposium (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics