Closes #436. Adds criticism to service locator pattern.

This commit is contained in:
Dmitry Avershin 2016-10-03 21:59:36 +02:00
parent 4ca205c03c
commit 9512f3ec70

View File

@ -33,6 +33,13 @@ improves the performance of application to great extent.
* lookups of services are done quite frequently
* large number of services are being used
## Consequences
* Violates Interface Segregation Principle (ISP) by providing pattern consumers with an access
to a number of services that they don't potentially need.
* Creates hidden dependencies that can break the clients at runtime.
* Limits object composability by stopping the clients to specify needed dependencies for different objects instantiation.
## Credits
* [J2EE Design Patterns](http://www.amazon.com/J2EE-Design-Patterns-William-Crawford/dp/0596004273/ref=sr_1_2)