Autodesk / Autodesk/AutomaticComponentToolkit
Component Injection should not create global variables
- Ngôn ngữ chính
- Go
- Star
- 53
- Fork
- 26
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách truy vết việc inject component ở phía triển khai và các đường dẫn tạo object cho giá trị trả về của method và các giá trị out. Xác định cách các component được inject sẽ được kế thừa từ một context object, sau đó xác minh rằng refactor loại bỏ các biến toàn cục tĩnh trong khi vẫn giữ việc inject cho các object được trả về.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- go
- Lĩnh vực
- tooling
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100