by Miško Hevery Dependency injection asks us to separate the new operators from the application logic. This separation forces your code to have factories which are responsible for wiring your application together. However, better than writing factories, we want to use automatic dependency injection such as GUICE to do the wiring for us. But can [...]
Entries from September 2008
To “new” or not to “new”…
September 30th, 2008 · 24 Comments
Tags: Advice · Testability
Application Wiring on Auto-Pilot
September 24th, 2008 · 11 Comments
by Miško Hevery We talked about how it is important to separate the new operators from the application logic. This separation forces your code to have factories which are responsible for wiring your application together. By separating this responsibility the tests can always wire together a subset of an application with key components replaced for [...]
Tags: Uncategorized
Where Have all the “new” Operators Gone?
September 10th, 2008 · 7 Comments
(the other title: Your Application has a Wiring Problem) In My main() Method Is Better Than Yours we looked into what a main() method should look like. There we introduced a clear separation between (1) the responsibility of constructing the object graph and (2) the responsibility of running the application. The reason that this separation [...]
Tags: Advice · OO · Testability
Changing Developer Behaviour, Part II
September 10th, 2008 · 3 Comments
By Miško Hevery | Republished from alphaITJournal.com In Part I of this series, we took a realistic look at what usually happens when we initiate change. We also took a look at the initial steps of effective change: defining a metric and getting people to accept it as a goal. In this second and final part, we’ll introduce two [...]
Tags: Advice