What is the difference between Registry and ServiceLocator?
Studying patterns of... read about Service Locator and Registry - but I can not understand what the difference is, in fact, both the pattern store array of objects and give access to them. Actually the question - what are the differences in these patterns?
If you think about it both can be attributed to the factories that generate objects, they also have a General check of instances that they can provide. The difference is that the Registry is more obvious, because while obtaining the required object explicitly clear what type of objects can provide a Registry. In the ServiceLocator as its interface says that it is, it is possible to register almost any class and you will learn it only in runtime. This dejavnosti in most cases and makes this pattern antipatterns.