Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formalise bootstrap phases #29

Closed
plastikfan opened this issue May 15, 2024 · 1 comment · Fixed by #31
Closed

formalise bootstrap phases #29

plastikfan opened this issue May 15, 2024 · 1 comment · Fixed by #31
Assignees
Labels
feature New feature or request

Comments

@plastikfan
Copy link
Contributor

plastikfan commented May 15, 2024

this is a continuation of issue #22

Identified phases are:

  • go init: features register handler with message bus using go init functions
  • build: factories/builders run. The director uses DI to resolve dependencies, navigator is created at the end of this phase and is initialised
  • intercept: resume can register its hibernation filter with the navigator
  • feature init: feature handlers are invoked
  • pre-launch: navigator send OnBegin event
  • launch-phase: navigation proceeds

So the navigator can be created and intialised independent of features. The navigator can will expose an interface for use by features. Some navigator properties should not be readily available, eg the ability to intercept filters as requred by hibernation should only be avilable to hibernation feature, therefore the navigator can expose another interface with an intercept method that can be queried for.

Feature can if they require hook into life cycle events.

@plastikfan plastikfan added the feature New feature or request label May 15, 2024
@plastikfan plastikfan self-assigned this May 15, 2024
@plastikfan plastikfan changed the title define bootstrap phases formalise bootstrap phases May 16, 2024
@plastikfan
Copy link
Contributor Author

plastikfan commented May 16, 2024

Just been watcing a video (Solid programming - No Thanks) by the Primeagen discussing SOLID and he mentioned (during the discussion about Dependency Inversion Principe) a convention in Go where when writing methods/functions, you should receive interfaces but return structs. Something to think about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant