Closes #436. Adds criticism to service locator pattern.
This commit is contained in:
parent
4ca205c03c
commit
9512f3ec70
@ -33,6 +33,13 @@ improves the performance of application to great extent.
|
|||||||
* lookups of services are done quite frequently
|
* lookups of services are done quite frequently
|
||||||
* large number of services are being used
|
* 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
|
## Credits
|
||||||
|
|
||||||
* [J2EE Design Patterns](http://www.amazon.com/J2EE-Design-Patterns-William-Crawford/dp/0596004273/ref=sr_1_2)
|
* [J2EE Design Patterns](http://www.amazon.com/J2EE-Design-Patterns-William-Crawford/dp/0596004273/ref=sr_1_2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user