betty icon indicating copy to clipboard operation
betty copied to clipboard

Core component decoupling

Open bartfeenstra opened this issue 5 months ago • 0 comments

Proposals

  • Split extensions into app extensions and project extensions
  • Make Project depend on App instead of vice versa, so we can have multiple projects open per app
  • In the CLI API, merge @app_command and @global_command, and inject the app into any and every command. We may need a @project_command though.
  • Add an interface for core components that allows them to be started or stopped. Because App, Project, and Extension all need resource management for their services.
  • Add a method to (some?) component interface for registering event handlers. Seeing as handlers can only be set when a dispatcher is present, this means projects can only register with apps, and extensions should only register with projects. Therefore we need an unregister method as .
  • Each component has a boot() and shutdown() method. These are called automatically when entering the component as a context.
  • Refactor extensions into project extension plugins.

Blocked by

  • The 0.4.x branch being opened
  • https://github.com/bartfeenstra/betty/issues/980
  • https://github.com/bartfeenstra/betty/issues/1537

bartfeenstra avatar Jan 09 '24 18:01 bartfeenstra