Autodesk / Autodesk/AutomaticComponentToolkit
Component Injection should not create global variables
Open
- Dominant language
- Go
- Stars
- 53
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Currently, component injection on the implementation side introduces static global variables - which are not a good idea in my opinion to introduce.
My suggestion would be, that we refactor component injection on the global level, and rather make it a feature of specific objects themselves. All classes that are created as return or out value of a method of an object would automatically "inherit" the injected component.
This would make a pattern very straight-forward, where people create a global context (like an "App" object) - and then use this as starting point for all further operations.
Contributor guide
Assessment
This issue has not been assessed yet.