Skip to content

Refactor controller injection and remove circular references #437

@DropSnorz

Description

@DropSnorz

Refactor controller architecture to match JavaFX and MVC standards for desktop UI applications.

  • Controllers
    • Controllers annotated with Spring @Controller are Spring-managed and singletons.
    • Controllers loaded from Java code and outside of DI and should be called Fragments
  • Services and Controllers publish events using Spring ApplicationEventPublisher for dispatching events
    • Map simple events (as refreshView() is used today)
    • Emit events from Controller and Services, use Platform.runLater() or utility FX.run() in controller listeners.
  • Remove all Service->Controller and most Controller->Controller dependency injection.
  • Repackage the FXML files with domain folders plugin, project, ...
  • Try to remove circular dependency injection (Update application.properties flag)

Metadata

Metadata

Assignees

Labels

Type: RefactoringA code change that neither fixes a bug nor adds a feature

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions