Spying as an Object-Oriented Programming Paradigm

François Pachet, Francis Wolinski, Sylvain Giroux · 1995

We introduce spying, a novel way of programming with objects, based on capsule programming and reflective facilities. This programming style allows easy building of monitoring systems, such as tracers, debuggers. We point out three main problems related to this programming style, and propose practical solutions to some of them. We exemplify our claims with a system that performs master/slave communication across different Smalltalk images. We conclude by proposing a typology of applications where the spying paradigm may be productively used. Key-words: Capsules, Proxies, Monitoring systems, Reflexion. 1. Introduction: a state of the art in capsule programming ? Back in 1986, Pascoe introduced encapsulators [Pascoe 86], a paradigm for object-oriented programming that allowed better structuring of programs. Encapsulators, also called capsules or interceptors [Lalonde&Pugh 91], are objects that "wrap" around arbitrary objects, and redefine some of their behavior in a non intrusive way...

Read the paper · More papers on PaperTik