My last post sparked quite a lot of interest – thanks for all the comments both on the blog and on dzone! Some of them rightly pointed out that the original post contains a mistake (*) (but luckily it didn’t impact the main point). Many other suggested using the factory…
Month: October 2010
Dependency injection discourages object-oriented programming?
Suppose you have a Product entity and that you want to implement a method which sends the product to a customer (let’s call it ship). For that method to work, you need a service for calculating prices and a goods transporting service. To wire the services nicely, the natural choice…