tappeddev / injector

Simple dependency injection for Dart. 💉
Apache License 2.0
77 stars 7 forks source link

Is a service locator, really? #21

Closed paul-hammant closed 5 years ago

paul-hammant commented 5 years ago

So remembering that DI containers do not support global mutable state, is it the case that your technology Injector is really a "Service Locator". Albeit one backed by a DI container (implemented as a map)?

JulianBissekkou commented 5 years ago

Since Injector is using a map internally I would agree that you could also name it Service Locator. If you are looking for "a real DI" you can check out https://github.com/google/inject.dart .

paul-hammant commented 5 years ago

I've see it and other other DI solutions for Dart - I'm cataloging all DI/IoC solutions in all languages presently - thanks for replying :)

devzsolt commented 5 years ago

@paul-hammant could you please share your Dart DI catalog?