Autodesk / Autodesk/AutomaticComponentToolkit
Component Injection should not create global variables
- Vorherrschende Sprache
- Go
- Sterne
- 53
- Forks
- 26
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Implementierungspfade für die Komponenteninjektion und die Objekterstellung für Methodenrückgabewerte und out-Werte nachzuverfolgen. Lege fest, wie injizierte Komponenten von einem Kontextobjekt geerbt werden sollen, und überprüfe anschließend, dass das Refactoring statische globale Variablen entfernt und gleichzeitig die Injektion für zurückgegebene Objekte beibehält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go
- Bereich
- tooling
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100