Zhuinden / simple-stack

[ACTIVE] Simple Stack, a backstack library / navigation framework for simpler navigation and state management (for fragments, views, or whatevers).
Apache License 2.0
1.37k stars 74 forks source link

Investigate JSR-330 compliance of `backstack.lookupService()` #223

Closed Zhuinden closed 4 years ago

Zhuinden commented 4 years ago

https://web.archive.org/web/20110613022418/http://picocontainer.org/inversion-of-control.html

As defined in the PicoContainer docs that no longer exist, "contextualized lookup IoC design" is the Type-0 variant of dependency injection containers, even if lately people call it a service locator.

However this also means that as Backstack in an activity is technically "global context", it is possible to use lookupService on @Inject annotated fields via reflection from outside! Then it stops being a service locator.

So the list to comply to JSR-330 is as follows:

Question becomes:

Edge case:

The idea is cool, though.

Zhuinden commented 4 years ago

YAGNI