I'm developing a desktop application which depends on the XML data it receives from a server. There are several files, needed to be downloaded at different time.
A number of data structures is populated with parsed data. The correspondence between files and data structures isn't 1-to-1, as a matter of fact may be rather complicated.
Application states and transitions between states depends on contents (and their availability at the moment) of those pieces of downloaded information.
Obscure spagetti code handles all the download events, and interdependences.
I've been working for a while on some pattern to work with it in a more uniform way, but thought that the developer community has already figured out the most appropriate practices and patterns. Does anyone know of any?