Return to search

Enabling View-based Programming with SCROLL: Using roles and dynamic dispatch for etablishing view-based programming

Present-day software systems have to fulfill an increasing number of requirements rendering them more and more complex. Many systems need to anticipate changing contexts (self-adaptive systems) or need to adapt to changing business rules or requirements (self-optimizing systems). The challenge of 21th century software development will be to cope with these aspects. We believe that the role concept offers a simple way to adapt object-oriented programs to their changing contexts. In a role-based language, an object plays multiple roles during its lifetime. If the contexts are represented as first-class entities, they provide dynamic views to the object-oriented program, and if the context changes, the dynamic views can be switched easily, and the software system adapts automatically.
However, the concepts of roles and dynamic contexts have been discussed for a long time in many areas of computer science. So far, their implementation in an existing object-oriented language requires a specific runtime environment. Also, classical object-oriented languages and their runtime systems are not able to cope with essential role-specific features, such as true delegation or dynamic binding of roles. As a solution, this work presents a simple implementation pattern for role-based objects that does not require a specific runtime system, SCROLL (SCala ROles Language). The implementation pattern is demonstrated on the basis of the Scala language. As technical support from Scala, the pattern requires dynamic mixins, compiler-translated function calls, and implicit conversions. The implementation details of the pattern are hidden in a Scala library and therefore transparent to Scala programmers. The SCROLL library supports roles embedded in structured contexts, so-called compartments. We show that they are specific, hierarchic runtime views, which enables hierarchic view-based programming for free in Scala.
We also discuss how to apply the implementation pattern of SCROLL for other languages, in particular for behavioral modeling languages in MDSD. This discussion shows that the SCROLL pattern can be embedded into the generated code, so that it still is hidden to the developer, but does not require a specific runtime system. Using the pattern in model-driven code generation enables dynamic views for all kinds of modeling languages. And therefore, this paper shows a way how to realize dynamic views for all modeling languages in MDSD.

Identiferoai:union.ndltd.org:DRESDEN/oai:qucosa:de:qucosa:70772
Date08 May 2020
CreatorsLeuthäuser, Max, Aßmann, Uwe
PublisherAssociation for Computing Machinery
Source SetsHochschulschriftenserver (HSSS) der SLUB Dresden
LanguageEnglish
Detected LanguageEnglish
Typeinfo:eu-repo/semantics/acceptedVersion, doc-type:conferenceObject, info:eu-repo/semantics/conferenceObject, doc-type:Text
Rightsinfo:eu-repo/semantics/openAccess
Relation978-1-4503-3614-7, 10.1145/2802059.2802062

Page generated in 0.0021 seconds