Reputation: 5521
I find it useless and extra work to use dependency injection while you don't follow TDD strictly. When I create an application using DI it leads me to have multiple logical layers (Repositories, Services (Business), Entities, Models, etc). As I don't strictly follow TDD, I find these layers useless and verbose most of the times!
Now using Scala and Play Framework I can use BDD and integration tests more easily than before (I am a C#/.NET developer migrating to Scala/Play).
So is it OK to give up DI and stick with some sort of DDD and use integration tests and BDD instead (which is followed in Play Framework simple tutorials)? Or it's better to learn new methods of DI which introduced in Scala (Cake pattern, MacWire, ...)?
Upvotes: 1
Views: 355
Reputation: 14064
TDD !=
DI !=
Layered architecture.
BDD !=
NoTDD.
I suggest you reconsider the purpose and benefits of each of these different, orthogonal practices separately before deciding you need to throw them out all together.
Upvotes: 1