andrew-malikov / artanis

MIT License
2 stars 0 forks source link

Composition Root #3

Open andrew-malikov opened 2 years ago

andrew-malikov commented 2 years ago

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

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

andrew-malikov commented 2 years ago

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.