close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 13 and Version 14 of WikiStart

01/05/2011 05:40:20 PM (11 years ago)



  • WikiStart

    v13 v14  
     1= Context-oriented Programming =
     3== Representing Context-dependent Behavioral Variations ==
     4=== Overview ===
     6Software systems must adapt to changing contexts over time, even while they are running. Unfortunately mainstream programming languages and development environments do not support this kind of dynamic change very well, leading developers to implement complex designs to anticipate various dimensions of variability.
     8The notion of Context-oriented Programming (COP) directly supports variability depending on a large range of dynamic attributes. In effect, it should be possible to dispatch runtime behavior on any properties of the execution context. First prototypes have illustrated how multi-dimensional dispatch can indeed be supported effectively to achieve expressive runtime variation in behavior.
     10Different COP languages or systems may provide different interpretations of the following mechanisms, but should at least address the following requirements:
     12    * Behavioral variations. Variations typically consist of new or modified behavior, but may also comprise removed behavior. They can be expressed as partial definitions of modules in the underlying programming model such as procedures or classes, with complete definitions representing just a special case.
     13    * Layers. Layers group related context-dependent behavioral variations. Layers are first-class entities, so that they can be explicitly referred to in the underlying programming model.
     14    * Activation. Layers aggregating context-dependent behavioral variations can be activated and deactivated dynamically at runtime. Code can decide to enable or disable layers of aggregate behavioral variations based on the current context.
     15    * Context. Any information which is computationally accessible may form part of the context upon which behavioral variations depend.
     16    * Scoping. The scope within which layers are activated or deactivated can be controlled explicitly. The same variations may be simultaneously active or not within different scopes of the same running application.
     18More research and experimentation is clearly needed into different ways to compose and trigger variations. For example, variations may be expressed not only as differences in code, but as extensions, wrappers, advice, refactorings, or general transformations. Variations may not only be triggered explicitly and programmatically, but also implicitly by means of rules or constraints. Important questions include how existing development approaches can be adapted and extended to support COP, starting from analysis over design up to implementation.
     20One compelling application domain for COP is to control software evolution. COP can enable runtime deployment of software changes while strictly delimiting the visibility of changes to specific clients and leaving others untouched. Radical changes can slowly percolate through a running system, without breaking clients who are not ready for them. Backwards-compatibility need no longer be a critical concern if the client context is taken into account when deploying changes. Global consistency is neither assumed nor desirable.
     22COP signals a move away from application-specific solutions to runtime variability (such as those offered by many design patterns), and instead focuses on developing a new programming paradigm and corresponding language constructs and underlying software infrastructure to support context-dependent behavior. We believe that these steps are essential to achieving the high degree of maintainability, robustness and adaptability that is needed for the emerging breed of dynamic, mobile and pervasive applications.
     24Most of the existing approaches for handling context-dependent software behavior have been embedded in other research domains, such as object-oriented programming, aspect-oriented programming, feature-oriented programming, productline architectures, ambient intelligence, unanticipated and/or dynamic software evolution, dynamic languages, and so on. However, it is about time to recognize and appreciate a focus on context orientation as a common thread.