In my application, I'm loading/saving some data from/to qx.io.rest.Resource
. To hide the complexity of REST, I want to expose a simplified, high-level interface to application components; think of load()/save() methods and some events to monitor progress of operations.
In this scenario, there is a total of six events: [ load, save ] x [ starting, success, failure ]. (I'm not interested in monitoring amount of data transferred, since a typical request will consist of less than 1KB.)
What is the best/preferred way to model this event scheme? Do I use single event type and pack all the info into event data, or do I use different event types? Should I extend qx.event.type.Event
, or should I adopt an existing class like qx.event.type.Data
?