Event-driven programming with EScala

Autor: Lucas Satabin, Mira Mezini
Rok vydání: 2011
Předmět:
Zdroj: AOSD (Companion)
DOI: 10.1145/1960314.1960336
Popis: EScala is an extension of Scala with support for declarative event-driven programming. It provides mechanisms for declarative definition of events and employs aspect-oriented techniques for exposing implicitly existing events, which reduces the need for explicit triggering of events. EScala provides a conservative integration of declarative events into an object-oriented language. Events are declared as attributes of objects and are subject to inheritance and subtype polymorphism. The language fully preserves encapsulation of objects and modular compilation of classes. Designs based on declarative events are as efficient as conventional event-driven designs.Attendees of the demonstration will see a live example that illustrates the expressiveness gained by the features of EScala. We will show how events can be defined in a declarative way and how to use such events for defining interactions among objects. We will demonstrate how declarative events can be used to replace observers and so result in more concise and modular design. Finally, we will show how to use the events library with a standard Scala compiler.
Databáze: OpenAIRE