Loading...
5 results
Search Results
Now showing 1 - 5 of 5
- Using roles to model crosscutting concernsPublication . Barbosa, F.S.; Aguiar, AdemarIn object oriented languages the problem of crosscutting concerns, due to limitations in the composition mechanisms, is recurrent. In order to reduce this problem we propose to use roles as a way of composing classes that extends the Object Oriented approach and can be used to model crosscutting concerns. To support our approach we developed a role language that extends Java, while being compatible with existing virtual machines. As validation we conducted a case study using three open source systems. We identified crosscutting concerns in the systems and then modeled them using our role approach. Results show that roles are a viable option for modeling crosscutting concerns.
- Roles as modular units of compositionPublication . Barbosa, F.S.; Aguiar, AdemarObject 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.
- Modeling and programming with roles: introducing JavaStagePublication . Barbosa, F.S.; Aguiar, AdemarRoles are not a new concept, but they have been used in two different ways: as modeling concepts in a static view and as instance extensions in a dynamic view. For these views only the dynamic offers supporting languages. The static view, although proving the utility of roles in modeling, does not offer a programming language that allows developers to use roles all the way from modeling to programming. We try to overcome this by presenting our role language JavaStage, based on the Java language. We do this by designing and implementing a simple framework and then compare the results with its OO equivalent. Our results show that static roles are in fact useful when used in code and that JavaStage features expand role reuse.
- Composing classes: roles vs traitsPublication . Barbosa, F.S.; Aguiar, AdemarCode replication has significant drawbacks in system maintenance. Code replication can have its origins in the composition limitations of the language. Several proposals have tried to overcome these limitations. A popular one is traits. However, traits do not support state or visibility control. Static roles are also a way of composing classes that has the benefits of traits and offers state, visibility control and other advantages as block renaming. We compare both approaches on how they are used to compose classes, and how they can be used to reduce code replication caused by composition limitations. As a case study we will compare how both approaches can reduce code replication by detecting and removing code clones within the JHotDraw framework. Results show that roles are capable of reducing a larger amount of replicated code than traits.
- Refactoring to static rolesPublication . Barbosa, F.S.; Aguiar, AdemarRoles can be used to overcome some composition limitations in Object Oriented Languages and contribute to a better code reuse, reducing code replication and improve code maintenance. Therefore, the refactoring of legacy code to roles is an important step in maintaining and evolving this code. In this paper, we present refactorings to convert a system to roles We also present some refactorings that enable roles to be even more reusable.