Skip to content
Matt Crinklaw-Vogt edited this page Jun 26, 2013 · 7 revisions

Functionality in Strut is partitioned into bundles. Each bundle provides a set of services for doing something. For example, the strut.storage bundle provides a service interface for saving Strut presentations. The strut.presentation_generator.impress bundle provides a service for generating impress presentations from Strut's domain model. strut.transition_editor provides the "transition" edit mode.

Strut can be extended by adding new bundles that provide new or existing services. In most cases when multiple instances of the same service are provided then multiple options are made available. E.g., strut.presentation_generator.impress and strut.presentation_generator.bespoke both provide an instance of the PresentationGenerator service and so both generators are available for selection within Strut.

Bundles find and communicate with one another via the ServiceRegistry.

How does this communication work? Each bundle registers one or more service interface implementations with the ServiceRegistry. Other bundles look up the registered interface implementations from the ServiceRegistry, via the interface name, and use them.

There are minimal hard dependencies between bundles so that they may be replaced with other bundles which export the same services. Removing most bundles from the system will not break Strut but just cause Strut to start with a degraded set of functionality. You can think of bundles as "plugins."

Most parts of Strut allow for multiple implementations of the same service to be registered. E.g., if multiple PresentationGenerators are registered then multiple presentation generator selections are rendered. Same thing for exporters, slide components, importers, menu items, editor modes and so on.

  • The "domain model" or the set of classes that represent a slide deck are contained in the strut.deck bundle.
  • The rendering of slide components is handled by items in the strut.slide_components bundle.

The most "dynamic" part of the UI in Strut is the header as that is where all of the controls for the presentation generators, menu items, slide components and themes are presented. As such, you can see that the strut.header bundle consumes several services.

Bundle Diagram

Clone this wiki locally