You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The term "graph" collides with "application graph" and "object graph", which is a term that relates to the users set of shapes that must come together.
Using "graph" in DIG's terminology is problematic for the same reason that using the term "inject" was: these terms exist to describe user-land concepts.
Overloading these terms creates confusion. Consider the following phrase:
The proposal is that all deps in the application graph, including clients and handlers, get registered into dig's graph so that the full graph can be resolved.
Here I used the term "application graph" to mean "all the shapes in user-land that must be wired using DI". This is confusing because DIG has a term "graph", which overloads the graph with the things which must make their way into the graph.
My suggestion is to use the classical term for this: "Container".
All deps in the application graph, including clients and handlers, get registered into a DIG container so that the graph can be resolved.
This will prevent confusion and make it easier for users to understand and utilize the concepts in DIG:
// create a new dependency injection containercontainer:=dig.NewContainer()
// register all shapes in the application graph
container.Register(...)
// resolve the application graphcontainer.Resolve()
The text was updated successfully, but these errors were encountered:
@breerly Sorry to drop the ball on this earlier, lets see if we can recover some momentum.
After some exposure to the demos/prototypes in the last several weeks, do you still feel like there is terminology clash? I personally haven't run into it as such and actually found that dig graph and application graph are sort of one in the same. I think calling it a container is a little too generic.
The term "graph" collides with "application graph" and "object graph", which is a term that relates to the users set of shapes that must come together.
Using "graph" in DIG's terminology is problematic for the same reason that using the term "inject" was: these terms exist to describe user-land concepts.
Overloading these terms creates confusion. Consider the following phrase:
Here I used the term "application graph" to mean "all the shapes in user-land that must be wired using DI". This is confusing because DIG has a term "graph", which overloads the graph with the things which must make their way into the graph.
My suggestion is to use the classical term for this: "Container".
This will prevent confusion and make it easier for users to understand and utilize the concepts in DIG:
The text was updated successfully, but these errors were encountered: