Patron De Notificacion De Eventos

Páginas: 28 (6818 palabras) Publicado: 10 de junio de 2012
The Event Notification Pattern— Integrating Implicit Invocation with Object-Orientation
UBILAB, Union Bank of Switzerland Bahnhofstrasse 45, CH-8021 Zürich E-mail: riehle@ubilab.ubs.ch

Dirk Riehle

Abstract
Managing inter-object dependencies in object-oriented systems is a complex task. Changes of one object often require dependent objects to change accordingly. Making every objectexplicitly inform every dependent object about its state changes intertwines object interfaces and implementations, thereby hampering system evolution and maintenance. These problems can be overcome by introducing the notion of Implicit Invocation to object-oriented systems as a decoupling mechanism between objects. This paper presents the Event Notification pattern, a pattern to smoothly integrateimplicit invocation mechanisms with object-oriented designs. State changes of objects, dependencies of other objects on them and the maintenance links between these objects are made explicit as first class objects. The resulting structure is highly flexible and can be used to manage inter-object dependencies in object-oriented systems efficiently.

1 Introduction
Object-orientation has beenacknowledged as a major architectural style, that is an organizational pattern for software systems. Numerous projects have shown that this style scales well from the most basic to very large systems. In practice, however, it is seldom found in its pure form: most object-oriented systems enhance the basic paradigm with other styles to solve specific problems. One of these problems is the maintenance ofupdate dependencies between objects. Changes to one object may affect other objects which subsequently have to be updated. This paper shows how this dependency can be established and maintained without intertwining object interfaces and thus hampering system evolution. This is done by introducing the architectural style of Implicit Invocation to object-oriented systems. In a system based on ImplicitInvocation, components (or objects) do not know each other explicitly. Rather, they communicate by announcing events. Objects register for events, so that announcing an event by one object leads to the notification of those objects which have registered for the event. From the changed object's perspective, the invocation of dependent objects' operations is implicit, which gave the style its name.This decoupling mechanism can be used to manage inter-object dependencies in object-oriented systems efficiently. This paper draws on previous work on Implicit Invocation as well as our own experiences (Sullivan & Notkin, 1992; Riehle & Züllighoven, 1995). It presents an integration rationale for Implicit Invocation with objectoriented systems and elaborates it as the Event Notification pattern.This pattern is conceptually similar to the Observer pattern (Gamma et al., 1995). However, it has a different structure and lends itself to different implementations that overcome some of the disadvantages of the Observer pattern. In particular, the pattern presents an implementation technique based on parameterized types (templates in C++) which achieve type-safe forwarding of event notificationparameters thereby overcoming problems of earlier implementations of implicit invocation mechanisms. Both the Event Notification and the Observer pattern can be used in the design and implementation of a wide ranging number of software systems, for example interactive software systems, software development environments, distributed systems and real-time monitoring systems. Each of these systemsbenefits from the integration, sometimes in different respects. This paper focusses on the decoupling of object interfaces to ease system evolution and maintenance. Section 2 of this paper discusses the Implicit Invocation style and why it is introduced to object-oriented systems. It further presents the rationale of the Event Notification pattern and shows in which respects it differs from the...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Notificacion On-line eventos ADVERSOS
  • notificacion
  • NOTIFICACION
  • notificación
  • Notificación
  • notificacion
  • notificacion
  • Notificacion

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS