Get access

Implementing design patterns in Object Teams

Authors

  • Miguel P. Monteiro,

    Corresponding author
    1. CITI, Departamento de Informática, Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa, Caparica, Portugal
    • Correspondence to: Miguel P. Monteiro, CITI, Departamento de Informática, Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa, 2829-516, Caparica, Portugal.

      E-mail: mtpm@fct.unl.pt

    Search for more papers by this author
  • João Gomes

    1. CITI, Departamento de Informática, Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa, Caparica, Portugal
    Search for more papers by this author

SUMMARY

This paper presents a study of the support for modularity of Object Teams, an aspect-oriented language backwards compatible with Java. The study is based on implementations in Object Teams of two complete collections of the Gang-of-Four design patterns. An analysis of the implementations is provided, in terms of advantages of Object Teams over Java with respect to modularity, module composition and reuse. We present a systematic comparison with a functionally equivalent collection of implementations in AspectJ, regarding five modularity properties: locality, reusability, composition transparency, (un)pluggability and extensibility. Object Teams yields broadly comparable results in terms of the first four properties. Object Teams yields better results as regards flexible module extensibility, composition at the instance level and enclosing multiple pattern participants into a larger, cohesive module. AspectJ is more successful than Object Teams in the Singleton pattern because of its ability to intercept constructor events. Copyright © 2012 John Wiley & Sons, Ltd.

Ancillary