Binoy Shah09/08/2022, 9:16 PM
sandy09/08/2022, 9:23 PM
Binoy Shah09/08/2022, 9:27 PM
I might be leaning on to this portion ☝️ . It does not explicitly say it but I am not clear enough as to why a construct like
So, why use resources? Plug in different implementations in different environments - If you have a heavy external dependency that you want to use in production, but avoid using in testing, you can accomplish this by providing different resources in each environment. Check out Separating Business Logic from Environments for more info about this capability. Share configuration across multiple ops or assets - Resources are configurable and shared, so you can supply configuration in one place instead of configuring the ops and assets individually. Share implementations across multiple ops or assets - When multiple ops access the same external services, resources provide a standard way to structure your code to share the implementations.
was created. Utilizing resources would allow a user to share it without direct reference injection, but why even have it, external service can be used by multiple callers just by creating a singleton object and passing its reference
or just a direct call to
Mike Atlas09/08/2022, 9:40 PM