Combining contracts and exemplar-based programming for class hiding and customization
Victor B. Lortz, Kang Geun Shin · 1994
For performance reasons, client applications often need to influence the implementation strategies of libraries whose services they use. If an object-oriented library contains multiple service classes customized for different usage patterns, applications can influence service implementations by instantiating the customized classes that match their needs. However, with many similar service classes, it can be difficult for applications to determine which classes to instantiate. Choosing the wrong class can result in very subtle errors since a customized class might use optimizations that work only over a restricted domain. In this paper, we show how client-side software contracts and exemplar-based class factories can be used to construct customized server objects. By expressing priorities and requirements in contracts, clients can delegate service class selection to the library and thereby avoid implicit dependencies on the library implementation. We have used this approach in the implementation of a real-time database system.
Cited by 14 works. doi:10.1145/191080.191150 Open-access PDF
Authors
References
- Mach: A New Kernel Foundation for UNIX Development.
- Self: The power of simplicity
- Applying 'design by contract'
- Advanced C++ Programming Styles and Idioms
- Object-oriented design: a responsibility-driven approach
- Design Patterns: Abstraction and Reuse of Object-Oriented Design
- An exemplar based Smalltalk
- An exemplar based Smalltalk
- Design Patterns: Abstraction and Reuse of Object-Oriented Design
- Designing an Extensible Distributed Language with a Meta-Level Architecture