Jacob Proffitt has hit the nail on the head with his “I do wish that people would admit that DI doesn’t have compelling applicability outside of Unit Testing” post, the discussion continues with Nate Kohari response post and Jacobs counter post. Oren has also joined in with two posts.
Here a some ideas for you to think about.
DI as a Silver Bullet – You lose power
When you use DI as a ‘Silver Bullet’ you are losing more then half the abilities of your programming language. You can not use static methods or the ‘new‘ keyword or sealed types. Oh, you have to make all your methods virtual too. This is going to be even harder once Extension Methods (and Linq) become main stream.
Code to Enable Change – Costs More
Creating Code that is there only to “Enable Change” has a big “YAGNI” written all over it. (Making the code more complex and thus wasting time in development and then in maintenance, for a chance that it will be used in the future). We have understood that this is the wrong plan ages ago. We now know that we can not predict the future and it is best to change our code only when we need to (a process called refactoring).
Keep your Privates to Yourself
Jacob, you are quite right about DI coming into fashion only because the tools where not good enough. DI does have other applications outside testing, but it is being overused in most application only to make the code testable.
One of the first issues that was discussed when TDD was starting was: “should we change our code to make it testable?”
Should we change the visibility of our code?
Should we change the design of our code?
This lead to a collision between testable code and OO encapsulation. Developers started to expose private parts of the code to enable testing. It started with private fields and methods and now it is the complete design. This collision still exists when using inadequate tools, but with the right tools, you can enjoy the best of both worlds.
Get the Best Tools to get the Job Done
Thousands of developers have understood this and have started testing there code without being forced to use a specific pattern required by some tools. Many development shops, didn’t test their code because of the testability/design collision. With the right tools they now understand and test their code.
As Joel Says: “Get the best tools“
You really make it appear so easy together with your presentation however I in finding this matter to be really something which I feel I would by no means understand.
It seems too complicated and very wide for me. I’m taking a look ahead to your subsequent post,
I will attempt to get the cling of it!
If you’re unfamiliar with digital marketing and seo , we will provide a cohesive
define of the process, time framjes and statistics designs to draw (http://Groupspaces.com) show increasing results together with making certain that your whole
requests andd wishes are met.
Great goods from you, man. I have take not your stuff
previous to and you’re just too great. I actually like what you have receioved right here, really like what you’re stating
and the way in which in which you assert it. You are making it
entertaining and you still take care of to keep it
wise. I cant wait to learn much more from you.
That is really a terrific site.
For example, I inspired one despondent consumer, with a very tight adveertising finances, to get together
together with his fellow retailers in a neighborhood mall to dischss the possibility
of launching a marketing budget template 2015 (vihowowu.bandcamp.Com) marketing campoaign that they
might all profit from with tthe additional good thing
abouit with the ability to shnare the whole cost.
The fact is: Regardless of a full-sized sport utility vehicle CUV comes in and of your financial consideration. The main benefit of
an individual or the company is already being snapped up in the
Florida lemon law. You should be based on a specific customer in mind that automobile new most anticipated cars of 2017 (http://projects.adityainfo.co.in/) it tends
to look at. Side and curtain airbags are now normal across the Pajero variety, combining stability control, grip
control, power, seating capacity etc. It is necessary to have the standard
features.
Hello to every , as I am genuinely eager of reading this blog’s post to be updated daily.
It consists of pleasant material.
It also can be used as a anti snatch personal alarm that when a purse is taken from a woman a pin is
pulled out and the alarm sounds loudly and a light flashes startling the intruder who normally would drop the device and purse rather than rather than to call attention to himself.
No worries though, as you are still able to get the tax credit.
pepper sprays could be used in the same way and located in different areas of the home for the same protection purpose.
Thanks for finally talking about > Dependency Injection – Keep your privates to yourself «
Development and Integrity Management by Eli Lopian < Liked it!
Each phrase, preferably containing two to three optimizers words, how to search about various topics.
suchmaschinenoptimierung google kostenlos – Christie – has a solid approach into
what is needed closer to his visions.
Excellent way of describing, and fastidious article
to get facts about my presentation subject, which i am going to present
in academy.
Canada also has a number of unique options available
to its residents and expat poker participant populations.
What’s up to every body, it’s my first visit of this weblog; this
blog carries awesome and in fact fine information in support of readers.
Just make sure you have the time to enjoy your bath – without creating a pressure situation.
This service gives detailed suggestions (at batch, instruction and transaction level) on thhe standding of a Business
online business banking santander instruction after processing has completed.
Bramah manufactures locks for domestic and commercial
use. In addition, you might need to have an electronic key replaced and a locksmith can also perform this service.
In certain emergency situations, the availability of an expert locksmith in Delta
BC is really helpful for the users.
My web blog יש לו נקודה טובה
Hey there just wanted to give you a quick heads up. The text
in your post seem to be not viewable on the screen in Chrome.
I’m not sure if this is a format issue or something to do with browser
compatibility but I thought I’d post to let you know. The design and style look great though!
Hope you get the issue solved soon. Kudos
Marvelous, what a blog it is! This website provides valuable information to
us, keep it up.