Architecture¶
Overview¶
Overview of Scrooms libraries¶
Overview of Scrooms plugins¶
No startup or shutdown code¶
Some systems have dedicated code to start up and shut down the application. Not Scroom. Scroom deals with documents (more accurately presentations) that allocate huge amounts of resources. These can be opened at any time, and resources should be released as soon as the document is closed, not at shutdown. And if that happens, startup and shutdown code really has nothing to do.
Asynchronous¶
Scroom is largely asynchronous. We start some action, and when it finishes, that generates an event which triggers further actions, such as updating the UI. We do not explicitly wait for actions to finish (but many are cancelable), not even when closing a document or even the application.
This means that it is normal for your code to still be running on some thread, even when the document, or scroom itself, is being closed. To deal with this, classes need to keep alive everything they need to function, because otherwise things might be destroyed because the document is closed. This explains why shared pointers are used extensively.