- Turkish Journal of Electrical Engineering and Computer Science
- Vol: 27 Issue: 5
- Reusable and interactive classes: a new way of object composition
Reusable and interactive classes: a new way of object composition
Authors : Saeid Masoumi, Ali Mahjur
Pages : 3615-3632
View : 10 | Download : 9
Publication Date : 9999-12-31
Article Type : Makaleler
Abstract :Separating object features from base classes is one of the popular ways of software development. Some popular programming approaches like object-oriented programming, feature-oriented programming, and aspect-oriented programming follow this approach. There are four advantages of using features: 1) Instantiability: the ability to create instances of a feature, 2) Reusability: the quality of a feature being reusable in many compositions, 3) Loosely coupled composability: the ability to compose/decompose features easily at object instantiation time (not offering new data types for compositions), and 4) Interactability: the ability of a feature to crosscut (interact with) other features inside the object. Existing approaches do not find strong evidence to support these advantages altogether. In this paper, we propose a new approach that provides all the advantages mentioned above. In our approach, each feature is developed as a class that can be instantiated or reused. A new composition method is also proposed to compose features of an object where it is instantiated. In such a way, a feature can be either a complete object or part of a big object. In fact, composing different reusable features yields object variations, since features can be easily added/removed in a loosely coupled manner. To make features interactive, we augment them with events. Events provide the interactions among the different features of an object. We show that events are soft dependencies that do not affect the reusability of features while method callings in inheritance-based models do.Keywords : Instantiability, reusability, loosely coupled features, feature composition, event-based interaction, crosscutting feature