I split my app init into two parts: the bare essen...
# tornadofx
c
I split my app init into two parts: the bare essentials to get up-and-running and a part containing long running operations, business logic, and data retrieval. The purpose is to get a window displayed on the screen as soon as possible and provide lots of feedback to the user. This avoids putting too much into a sequence that's hidden from the user who may question whether the app is really running. I do this by putting the essential init in start() like you mentioned. A put the longer-running stuff in an onShown() handler. Once the stage is displayed, then I have access to a progressbar and other controls that give feedback to the user. In TornadoFX, this is a TaskStatus class which is a data structure for several status-related items like a status message and progress indicator. This can be paired with controls say at the bottom of the screen. For cleanly closing the session, I follow a similar approach with the long-running saving done in an onHiding or Hidden method and the essentials done in a stop(). This is a primaryStage-oriented design. I think we're talking about adding something that's more general.