Reputation
274
Top tag
Next privilege 300 Rep.
Create new tags
Badges
1 13
Newest
 Excavator
Impact
~10k people reached

Jul
10
awarded  Excavator
Jul
10
awarded  Organizer
Jul
10
revised What should I mock in tests of an application with service tier and DAO tier?
fix overly generic title; smaller linguistic improvements
Jul
10
suggested approved edit on What should I mock in tests of an application with service tier and DAO tier?
Jul
10
comment What should I mock in tests of an application with service tier and DAO tier?
The term "unit test" is nowadays most commonly used to describe technical characteristics of a tests: a unit test is a test that runs fast and without prerequisites. The term "integration test", when used properly, describes the purpose of the test: to test the integration of parts. So a "unit test" can easily be an "integration test" if it tests some integration and runs fast.
Jul
8
awarded  Popular Question
Aug
25
awarded  Scholar
Aug
25
accepted Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
Aug
25
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
@Izkata No, this is not a matter of size. With the described approach, the code from that post would just be new ShippingService().
Aug
25
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
The fallacy is that zero-args constructible is not always possible - Yes, this is what is wrong with the approach in the question. The same argument is given in this answer.
Aug
25
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
Actually, just creating one object graph can already be tricky if collaborators are shared.
Aug
22
awarded  Self-Learner
Aug
22
awarded  Yearling
Aug
22
revised Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
clarify that I'm not questioning DI as a whole
Aug
22
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
there is an old, old ongoing debate - I don't want the whole debate, I just want the one supposed advantage "creating object graphs without DI is hard" explained. Other advantages of DI are out of scope in this question.
Aug
22
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
When I follow your argument, the reasoning for DI should have been "creating an object graph by hand is easy, but leads to code that it hard to maintain". However the claim was that "creating an object graph by hand is hard" and I'm only looking for arguments supporting that claim. So your post doesn't answer my question.
Aug
22
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
@Xion The dependency graph must be a directed acyclic graph. There is no requirement that there is only exactly one path between two nodes like in trees.
Aug
22
revised Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
add correct graph theoretic term for the "general dependency graph"; add more details how the approach in the question fails
Aug
22
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
Note that I'm not looking for other advantages of dependency injection - I'm only interested in understanding the argument that "object instantiation is hard without dependency injection"
Aug
22
comment Questioning one of the arguments for dependency injection: Why is creating an object graph hard?
abstracting downstream dependencies into interfaces - The example code does this too. The processor field is of type CreditCardProcessor, and not of the implementation type.