DocumentCode
629614
Title
A new event dispatch strategy to eliminate dispatch “glue”
Author
Allevato, Anthony ; Edwards, Steve H.
Author_Institution
Dept. of Comput. Sci., Virginia Tech, Blacksburg, VA, USA
fYear
2013
fDate
29-31 May 2013
Firstpage
1
Lastpage
9
Abstract
In statically typed object-oriented languages such as Java, GUI event handling is traditionally handled through listener interfaces or similar types of polymorphic delegation. In the case of events that pass information about their source to the handling method, the programmer is required to perform runtime type checks to determine the true types of the components involved. This produces poorly designed code that contains a second layer of hand-written type-based dispatch before events can actually be handled. In this paper we present an alternative approach that builds this second dispatch layer into the underlying framework. The approach uses run-time reflection and overload resolution to automatically distinguish events based on method argument types, and to implicitly bind them to the event publishers. This approach combines the type safety of a statically typed language with the run-time flexibility of modern dynamic languages and enhances the readability of event handling code.
Keywords
formal verification; graphical user interfaces; object-oriented languages; statistical analysis; type theory; GUI; dispatch layer; event dispatch strategy; event handling code readability enhancement; handling method; handwritten type-based dispatch; listener interface; modern dynamic language; overload resolution; polymorphic delegation; runtime flexibility; runtime reflection; runtime type check; statically typed object-oriented language; true type component; type safety; Androids; Birds; Graphical user interfaces; Humanoid robots; Java; Reflection; Shape; GUI; dynamic typing; event dispatch; reflection; static typing; user interface;
fLanguage
English
Publisher
ieee
Conference_Titel
Research Challenges in Information Science (RCIS), 2013 IEEE Seventh International Conference on
Conference_Location
Paris
ISSN
2151-1349
Print_ISBN
978-1-4673-2912-5
Type
conf
DOI
10.1109/RCIS.2013.6577710
Filename
6577710
Link To Document