DynOCoLa : Enabling Dynamic Composition of Object Behaviour

Aspect Oriented Programming (AOP) has emerged as a promising paradigm for modularly capturing systemic cross-cutting concerns in modern software applications. This approach has enhanced separation of concerns and has minimized code tangling to a large extent. However, while developing applications, in order to characterize the dynamic and evolving object behaviour effectively, a single object itself may have to be viewed as a composition of several aspects. Towards this objective, this paper proposes a Dynamic Object Composition Language (DynOCoLa), which views object composition itself as a combination of various aspects that abstract the variant behaviour of objects. This behavioural variation is based on the contractual conditions that are fulfilled in different contexts. Instead of viewing objects as being rigidly defined during compile-time, the DynOCoLa run-time system weaves the various aspects appropriately with the objects. Thus, DynOCoLa enables dynamic customization of an object’s behaviour based on the state of the object. This paper discusses the design and implementation of DynOCoLa. An application scenario, involving customized service delivery to mobile devices based on the location of the devices, has been studied to illustrate the power and flexibility offered