The site 7GUIs presents seven typical, increasingly complex GUI programming tasks and evaluation criteria for solutions. This page presents solutions using Tibco's PageBus, an open source, topic-based publish/subscribe mechanism. PageBus does not impose any philosophy or mechanism on 90% of the code. Late bound, indirect coordination of messages is all it does.
Description: 7GUIs Counter
Description: 7GUIs Temperature Converter
Description: 7GUIs Flight Booker
A user interface demanding more interaction among UI elements obviously demands more coordination among MVC component messaging. The code for this reservation system is still fairly tractable mainly due to repetition of event handling and message subscriptions. From this point forward the complexity begins to shift from event handling and subscriptions toward configuration.
This example continues to initialize each component explicitly. An example with any more component coordination might benefit from initialization driven by configuration data. The 7GUIs Timer task might benefit from such data-driven configuration.
Another note with this current task is the model's values are published to an event cache. PageBus provides the event cache for several purposes, one being the ability to be less dependent on order of initilization of components and subscriptions. This example doesn't benefit greatly from an event cache but this is a useful point in the sequence of tasks for a simple illustration of its use. Looking forward, an event cache can be useful for messages providing configuration data for components.