Autodesk / Autodesk/AutomaticComponentToolkit

Component Injection should not create global variables

オープン
#130 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
53
フォーク
26
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、実装側のコンポーネント注入と、メソッドの戻り値および out 値に対するオブジェクト作成の経路を追跡します。注入されたコンポーネントをコンテキストオブジェクトからどのように継承するかを定義し、その後、リファクタリングによって静的なグローバル変数が削除され、返されるオブジェクトへの注入が維持されていることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
tooling
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。