API.md does not cover plugins
apstygo opened this issue · 3 comments
API overview is great at providing a quick look at the basics of DI in general and Needle's Components in particular. But it completely omits Pluginized APIs and their significance. DI in itself is quite a simple idea, but even the simplest of DI frameworks are quite difficult to get a grasp on without a proper explanation of their APIs. Pluginized APIs seem to be a big feature, but I certainly can't understand their implications just by reading the sources. There may be some people besides me missing out on these features for the same reason.
The original plan for needle was to split the code into two repos with one depending on the other, the plugin related code was meant to live in a different, private repo and subclass items from the pubic needle repo. Developing needle with this setup turned out to be too much of a pain, so we went with just pushing all that code into folders called Pluginized
.
Our assumption is that no one outside of Uber should care about the pluginized components. This feature is very specific to the way our code is laid out (and this particular detail is not included in our open sourced RIBs repo either).
The rough idea is that there are core and non-core scopes. While non-core scopes are allowed to see items created on the core side, the core scopes should not be able to see items created on the non-core side except for some very specific plugin related things (this bit it not enforced by needle but rather by lint rules in our repo).
Hope this helps.
So what you're saying is that basic Component API is sufficient for most to all cases, right?
I guess I was just too worried about missing out on some useful feature. Nothing to worry about then 👍.
The rough idea is that there are core and non-core scopes. While non-core scopes are allowed to see items created on the core side, the core scopes should not be able to see items created on the non-core side except for some very specific plugin related things (this bit it not enforced by needle but rather by lint rules in our repo).
You say non-core scopes are allowed to see items created on the core side, the core scopes should not be able to see items created on the non-core side. Does this mean that non-core components depend on core components? What are the dependencies of core and non-core components?