Framework for Interactive Applications Matt Korchinsky Advisor: Aaron Cass
Agenda Problem Statement Background and Current Work Design and Implementation Issues Evaluation Future Work
Problems to Solve Java's Listening event system is sometimes difficult to understand for beginners. Java has a wide array of classes for use with interactive applications Creating large scale applications can be difficult when both of these factors are combined
Background & Current Work Different event system already implemented for use with C++ Learned how to use QT framework while employed this summer (www.trolltech.com) C++ version uses code generation script Decided to replicate the event system using Java to replace the current listening system.
Example
New Event System
Design & Implementation I Designed for use with Java events as well as user defined events One simple class manages all connections and handles listening for Java events
Design & Implementation II Event system uses connect method to connect a “signal” to a “slot” Slots are implemented methods signals are not When connecting Java events, listeners must be used
Design & Implementation III Emit method allows users to emit their own signals when appropriate Looks up the correct slot and calls it
Design & Implementation IV Uses Java Reflection to correctly implement “Signal – Slot” relationship instead of interfaces When correct slot is found, the method is called using the invoke method
Coding Problems Need to listen to handle Java events Connecting Java events to emit user defined events Invoking user defined methods when events occur
Data Structures Problem Java HashMap can only relate two objects, the key and the value Four objects are involved in one connection
Evaluation Gave three experienced students the framework source code Asked them to create a simple application containing two buttons using the framework Asked them to create the same type of application using Java listeners Gave them a questionnaire to evaluate the effectiveness of the new event system
Future Work Larger set of custom widgets for interactive applications Test this framework in “Large Scale Software Design” class to evaluate effectiveness for event programming beginners
Questions?