Home > Coding > Clean Code: Dependency Injection

Clean Code: Dependency Injection


 

The other I had a constructive discussion with colleague about “Dependency Injection” (DI).

{ If I my memory is good, it must have been after the post on Building S.O.L.I.D. code. The statement In fact DI, makes your code easier to read and to test.}

My colleague stated that it would be cumbersome to have “all those extra parameters” in the constructor of my object.

Well, for me Dependency Injection is all about making my tests easier to build, or if your prefer, making my code “testable”!

To prove it, I found a good video which belongs to a good series in YouTube:

 

 

I will have many more talks / posts on “Clean Code” soon as I find these videos really easy to understand!

Advertisements
Categories: Coding
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: