Declarative Layer Composition with The JCop Programming Language

By: Malte Appeltauer, Robert Hirschfeld, Jens Lincke

Abstract

Program behavior that relies on contextual information, such as physical location or network accessibility, is common in today's applications, yet its representation is not sufficiently supported by programming languages. Context-oriented programming (COP) can improve modularity by dedicated language constructs for crosscutting concerns. Although COP could be used in any application domain in general, its current implementations may require adaptations of source code that is not accessible to the developer. This, in turn, limits the interaction of adaptation mechanisms provided by COP language extensions with widely used programming abstractions such as frameworks. As a result, dynamic control over layers emerges as a crosscutting concern that obstructs the separation of concerns. In this paper, we discuss crosscutting layer composition in framework-based applications in detail. As a concrete example of such a framework- based application, we present a simple action adventure game that we implemented using a conventional COP language. Finally, we show, how our JCop language supports the modularization of these crosscutting concerns by language constructs for declarative layer composition.

Keywords

Context-oriented programming, dynamic adaption, Java, framework

Cite as:

Malte Appeltauer, Robert Hirschfeld, Jens Lincke, “Declarative Layer Composition with The JCop Programming Language”, Journal of Object Technology, Volume 12, no. 2 (June 2013), pp. 4:1-37, doi:10.5381/jot.2013.12.2.a4.

PDF | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn

The JOT Journal   |   ISSN 1660-1769   |   DOI 10.5381/jot   |   AITO   |   Open Access   |    Contact