The non-determinism inherent in event-driven systems encompassing both networked applications and interactive applications, makes these applications difficult to develop and maintain, despite the availability of powerful libraries. One reason for this is the so-called inversion of control needed to dispatch events to listener objects provided by the application. In this paper we will argue that event-handling with listener objects leads to problems in the applications that may be avoided by resorting to blocking calls and to active objects. The latter concepts provide a uniform approach to robust event-handling, both with respect to the registration and (de)activation of listener objects, as well as the dispatching of events to blocking operations. We will illustrate our approach by discussing how to develop a graphical user interface for an application that must access a remote database. We will also indicate that as a benefit, from a software engineering perspective, our approach leads to a more modular approach to event-based systems and a better insight in the flow of control between listeners, network accesses and the application.
[1]
Claude Petitpierre.
Synchronous C++: A Language for Interactive Applcations
,
1998,
Computer.
[2]
Robin Milner,et al.
Communication and concurrency
,
1989,
PHI Series in computer science.
[3]
Elmar Schulte-Geldermann,et al.
Principles of object-oriented software development
,
2000
.
[4]
Ralph Johnson,et al.
design patterns elements of reusable object oriented software
,
2019
.
[5]
Gul A. Agha,et al.
ACTORS - a model of concurrent computation in distributed systems
,
1985,
MIT Press series in artificial intelligence.
[6]
Doug Lea,et al.
Concurrent Programming In Java
,
1996
.
[7]
Douglas C. Schmidt,et al.
Experience Using Design Patterns to Develop Reuseable Object-Oriented Communication Software
,
1998
.