LBApplication

The LBApplication project deals with applications and modules.

Applications

Applications are modular objects that can be loaded, unloaded, saved and shut down safely. An Application can load and unload modules on the fly, keeping the application lightweight by loading only what is necessary.

Implementing Applications

The Application interface offers the basic Application functionality, the AbstractApplication class helps with default implementation. When subclassing AbstractApplication, only the the methods you require can be overridden.

Modules

Modules are objects that can be attached to an application. Just like applications, they can be loaded, unloaded, saved and shut down safely. Modules can also declare other modules as dependencies which must be loaded before the Module itself is loaded. A module can also respond to unloading of other Modules. Because of the similarities between Application and Module, Application might become a Module as well, allowing other Applications to be registered as a Module within an application, but not all the details for this have been worked out yet.

Implementing Modules

Modules are implemented the same way as applications, either implement the Module interface directly or extend the AbstractModule class and override only what is necessary.

View on GitHub