Patterns

Service Locator vs. Dependency Injection Container

I am NOT as crazy as I thought! Over the last few years of learning to incorporate Java-like patterns into my PHP development practices one area seemed to drive me crazy, almost to the point of second guessing myself about dependency injection altogether. Years ago I learned from Misko Hevery from Google that a service locator is really just global state or a bad singleton in sheep’s clothing. He states that a service locator violates the Law of Demeter and calls singletons are pathological liars.

DDD in PHP Experiment

Domain-Driven Design in PHP Experiment and Project Seed A current and difficult software development project has recently sent me scurrying for answers. In that search I’ve rediscovered the book Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans. In addition to re-reading the book and reviewing a handful of slide-decks at SlideShare; I have found that there a few different and even wide varying implementations of the principles of domain-driven design.