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

Composition Root #3

Open
andrew-malikov opened this issue Dec 20, 2021 · 1 comment
Open

Composition Root #3

andrew-malikov opened this issue Dec 20, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@andrew-malikov
Copy link
Owner

Making a system without any DI container might be tricky. There are no deep guidelines around except to arrange the stuff to interfaces and make DI around them.

Just to observe the state

  • the official docs say packages shall not export any classes without interfaces (which is good by the way)
  • there is an example of a DI container built upon the tokens (e.g. Angular or Nest)

https://github.com/VallanDeMorty/artanis/blob/d021ac0cd2c02f0f22ab33000e1b1828cae18499/Interface/Collections/CollectionCommands.fs#L28-L43

@andrew-malikov andrew-malikov added the enhancement New feature or request label Dec 20, 2021
@andrew-malikov andrew-malikov self-assigned this Dec 20, 2021
@andrew-malikov
Copy link
Owner Author

As an option, the Reader monad may help to create a closure with needed functions inside. Only one exception here - it is not so popular in F# land.

Repository owner deleted a comment from redtree0 Feb 20, 2024
Repository owner deleted a comment from redtree0 Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant