Composable Encapsulation Policies

Schärli, Nathanael; Ducasse, Stéphane; Nierstrasz, Oscar Marius; Wuyts, Roel (June 2004). Composable Encapsulation Policies. ECOOP: European Conference on Object-Oriented Programming. Proceedings, 3086, pp. 26-50. Springer Verlag 10.1007/b98195

[img] Text
Seiten aus 10.1007_b98195.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (366kB) | Request a copy

Given the importance of encapsulation to object-oriented programming, it is surprising to note that mainstream object-oriented languages offer only limited and fixed ways of encapsulating methods. Typically one may only address two categories of clients, users and heirs, and one must bind visibility and access rights at an early stage. This can lead to inflexible and fragile code as well as clumsy workarounds. We propose a simple and general solution to this problem in which encapsulation policies can be specified separately from implementations. As such they become first-class composable entities that can be reused by different classes. We present a detailed analysis of the problem with encapsulation and visibility mechanisms in mainstream OO languages, we introduce our approach in terms of a simple model, and we evaluate how our approach compares with existing approaches. We also assess the impact of incorporating encapsulation policies into Smalltalk and discuss some implementation issues.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)

UniBE Contributor:

Ducasse, Stephane and Nierstrasz, Oscar Marius

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

ISBN:

978-3-540-22159-3

Series:

LNCS

Publisher:

Springer Verlag

Language:

English

Submitter:

Manuela Bamert

Date Deposited:

08 Nov 2017 10:01

Last Modified:

10 Nov 2017 09:41

Publisher DOI:

10.1007/b98195

BORIS DOI:

10.7892/boris.104763

URI:

https://boris.unibe.ch/id/eprint/104763

Actions (login required)

Edit item Edit item
Provide Feedback