Dependency Injection – Keep your privates to yourself

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

  1. ‘Are people really searching online for my product or services’.

    The usual SEO methods include keyword research, link building
    and such. Thematic relevance is of key importance for the
    creation of quality backlinks. Further the sites whose ranking using the search engines is good will attract potential clients, which results
    to mores sales.

    My site Ines

  2. You’re so interesting! I don’t believe I’ve read through something like this before.
    So nice to discover someone with some original thoughts on this subject.
    Really.. many thanks for starting this up. This web site
    is one thing that is required on the web, someone with
    some originality!

  3. The story development during the game is minimal, but the plot is solid.
    Clos a single end with wooden for the roost, and clos the remaining sides with wire.
    Although occasionally a mite frustrating, Hoggy’s a great-looking, fun and innovative freebie.

  4. To watch the NBA All-Star Game live streaming online for free, anyone in the U.
    Bike games are the effective way to introduce the child to bike and bicycling ideas.
    However one must tread with caution as they may be sucked into gambling with this very innocent of a game, and one must take
    not to pay up so much that one cannot meet their daily family
    expenses due to their gambling debts.

  5. But, perhaps for the first time this season, the Detroit Red Wings appear settled on line combination they hope will remain intact for a while. It helps when you’re 3-0-1 in the past four games and averaging three goals per game during that stretch. louis vuitton outlet online In the 1950s, he said, federal courts ruled that the NAACP did not have to disclose its membership lists because its members might be subject to threats or worse forms of illegal activity. s ray ban sunglasses
    senator from Vermont He did not take that well,” Marks explained.
    USA Veterans Affairs to Samantha Aldrich, 88 Greenwich Road, $100,000. michael kors outlet Corissa, who is an officer of the Hollister Future Farmers of America chapter, counts Aalgaard as one of her close friends. v
    “I keep a note of everything I eat on my phone and look it up on a calorie counter,” she said. cheap air jordans The family owned restaurant also offers 13 other margaritas, including the Corazon — a mixture of peach liqueur, sweet and sour, and a splash of Chambord.
    x 145. Cincinnati, Ian Kahaloa, RHP, Campbell HS, Ewa Beach, Hawaii. michael kors outlet online Then Wednesday had one of her best games, shaking off a slow start to score 26 points with 10 rebounds and 9 assists for the Red Wolves, who shot 48. coach handbags
    The Islanders will play its five remaining home games at Lancaster’s Clipper Magazine Stadium michael kors outlet Scroggins began his career at USC, but transferred to El Camino College in California for his sophomore campaign.
    Christopher Plewa to Rosa I. Torres, 73 Talmadge Drive, $146,500. coach outlet Jang captured her maiden LPGA title at the Coates Golf Championship in Florida last month and has quickly made it two. o michael kors handbags
    Sources in the inspector general office tell me they see the requests and accusations as an attempt to intimidate them and deter them from continuing Clinton-related work coach factory The basic scratch tests used to discover allergy triggers usually yield positive results for 45 percent of the tested triggers, he said.
    Abbas expressed his condolences over Force’s death, according to the official Palestinian news agency WAFA, and said the establishment of a Palestinian state was key to ending the violence. louis vuitton handbags Once there’s a market, more will participate, he said.
    The extra 10 percent, taken from the local primary property tax, allows the district to make up for budget cuts in state aid, which funds two-thirds of the district’s budget. michael kors outlet online Her blog about last week:em?!–gte mso 9]xml o:DocumentProperties o:TemplateNormalo:Template o:Revision0o:Revision o:TotalTime0o:TotalTime o:Pages1o:Pages o:Words200o:Words o:Characters1143o:Characters o:Lines9o:Lines o:Paragraphs2o:Paragraphs o:CharactersWithSpaces1403o:CharactersWithSpaces o:Version11.
    Del Piero, who were the original owners of Rancho Larios, sat on the State Water Board. michael kors bags She had kept him apprised of Inez’s activities before that, likely picking up on the fact that he was interested, and she talked him up to Inez every chance she got.
    a Gotcha coach ???????? — DeAngelo Williams (@DeAngeloRB) Antonio Brown’s hype dance louis vuitton handbags Garrison, a baritone, won his first Grammy Award in 2009, also with The Phoenix Chorale, for “Best Small Ensemble Performance,” awarded for the album “Spotless Rose: Hymns to the Virgin Mary,” which was recorded in his first season with the chorale in 2005.
    By focusing on these original characters, Doc Con explores and educates those fans that were not fortunate enough to have discovered that human ingenuity and honor are just as valuable an asset during adversity as strengths bestowed supernaturally. Saturday, June 13Where: Desert Botanical Garden, 1201 N. v coach handbags
    A sharp contrast to the gunfire that echoed in this building Monday night Put more real farms on that Class 1 Panoche soil, please, and not government subsidized solar projects.
    b Shaelynn Cowles, Churchill, senior michael kors handbags The Zags flew from Dallas to Tulsa and bused into town Monday for the series, which is coming during their spring break. w
    In January, the Justice Department sued it over the emissions-cheating software found in hundreds of thousands of vehicles sold in the United States, potentially exposing VW to billions of dollars in penalties for clean air violations With the help of specially-place stones that absorb the heat from the sun and radiate warmth in the evenings, it’s actually very easy. nfl jerseys
    “I think she has helped people on our team start to think, ‘OK, what might be possible?'” Solof said. “Instead of thinking, ‘OK, 16:40 is really good,’ maybe you should think about 16-flat, or 15:40.” louis vuitton outlet online Turkey is under pressure to reduce the number of migrants crossing into Greece ahead of Monday’s summit meeting of Turkey and the EU leaders. n michael kors outlet online
    It seems more likely that the mechanism is automatic percentage increases that continue to propagate the discrepancy by definition michael kors outlet 4, 6 and 7 to fall out of contention and close with a 75 to tie for 20th.
    Gail J. Laflamm to Michael F. Lafreniere and Tanya Severance, 41 South St., $148,000 louis vuitton handbags “While Beth’s tenure as president has tragically been cut short, her efforts over the last eight months have set the university on a path toward continued excellence,” said Robert Harrison, chairman of the Cornell board of trustees. x oakley sunglasses
    His team is convinced they must dispatch with Cruz before turning their full attention to taking down Trump Dial was unable to tell reporters his unit, or the name of his commander.

  6. I went fоr a ᥙniqᥙе ǥіft and fⲟսnd tɦіs pогtгаy
    tɦat lіɡһting insіɗᥱ οf tɦe ɗaгкiѕҺ.

    Ιtѕ ѕоmᥱкіnd of dοual-νіᥱѡ рогtгaʏ.
    Ӏ сan lоoк at
    it thгoսgһ
    tɦе ⅾaу, ѕtіll WҺіⅼе іѕ ⅾaгκ ѡіtҺіn ϳᥙѕt thе hоusе, tҺе
    ρoгtrɑу іѕ continue
    tο aⲣpaгеnt.

    Ιs thіѕ sοme foгm ߋf aⅼіеn tеcҺnoloցy/
    oг іѕ jᥙst sοmе еⲭcерtіоnal աall ɑrt?

    Hοԝеѵег, і ⅾеtᥱrmіneԀ іn Ԁіrectiⲟn ⲟf оƅtaіn іt ɑѕ a
    геwarɗ, neνегtҺᥱlеѕѕ tοwагɗѕ оrԁег ѕοme fⲟr mүsеⅼf aѕ wᥱlⅼ :).

    I fееl that ԝіtҺіn maҝᥱ any ɗіffeгеncе оf ǥіftѕ, tҺіѕ ѡߋսⅼԀ
    Ьe tɦе majοr.
    ᗪо οn үоսг օաn aρрeaг tⲟ
    bе tҺе іdеntіcɑⅼ?

  7. I don’t even know the way I ended up right here, but I
    assumed this post used to be good. I don’t realize who you are but certainly you are going to a well-known blogger when you are not already.


  8. Having read this I believed it was really informative.
    I appreciate you spending some time and effort to put this short article together.
    I once again find myself personally spending a significant amount of time both reading
    and leaving comments. But so what, it was still worth it!

  9. Wonderful goods from you, man. I have bear in mind your stuff previous to and you’re simply extremely wonderful.
    I really like what you have got right here, certainly like what you’re stating
    and the way in which you are saying it. You’re making it enjoyable and you still care for to keep
    it smart. I can’t wait to learn much more from you.

    That is really a wonderful web site.

  10. Right here is the rigt website for everyone who hopes to understand this topic.
    You unxerstand a whole lot its almost hard to
    argue with yoou (not that I personally woulld want to…HaHa).
    You definitely put a brand new spin on a subject thhat
    has been discussed for a long time. Excellent stuff, just great!

    Feell free to surf to my homepage – weight loss tips

  11. Facebbook promoting will be effective in some industries aand allows focusing on primarily
    baserd oon demographic information akin to Age,
    Gender, Education Level, and Marital Status.

    my pzge :: WPGateway Secure Review (Christal)

  12. Excellent website you have here but I was wanting
    to know if you knew of any forums that cover the same topics talked about here?
    I’d really love to be a part of group where I can get opinions from other knowledgeable individuals that share
    the same interest. If you have any suggestions, please let me know.
    Appreciate it!

  13. One of the negative effects of the Affordable Care Act
    is that it’s compeling the medical community to come to be
    much more effective, which’s a good thing for medical realty investment company.

    Here is my web-site real estate appraiser casper
    wy (Berenice)

  14. Hello, I wish for to subscribe for this web site to obtain hottest updates, therefore
    where can i do it please help.

  15. It’s a shame you don’t have a donate button! I’d most certainly donate to this superb
    blog! I suppose for now i’ll settle for bookmarking
    and adding your RSS feed to my Google account. I look forward to new
    updates and will talk about this site with my Facebook group.
    Talk soon!

  16. An impressive share! I have just forwarded this onto a coworker who was conducting a little research on this.

    And he actually bought me dinner because I discovered it for him…
    lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanks for spending the time to talk about this matter here on your site.

  17. Great post. I used to be checking continuously this blog and
    I’m impressed! Extremely useful info specially the remaining phase :
    ) I deal with such info a lot. I was seeking this certain info
    for a very long time. Thanks and best of luck.

  18. Babycook pasta rice cooker solo et duo – sur allobebe –
    de cuisson pour surveil to les feculents rapide
    sans, compatible avec solo Cdiscount guide vous de des markets sur votre
    applications bebe Babycook unique de BEABA + Discover comme pour vos achats Puericulture & Eveil bebe…!

  19. If you might be in operation for example a restaurant, that’s offered
    to the individuals on everyday, it is a whole lot
    easier to promote you sms as you’re able past it on doors and windows or walls for fast visibility to individuals.
    You must have 5,000 fans or even more before you decide to really start purchasing marketing.
    After adding your own campaign, complete the task by choosing the
    sort of bid you’re going to take.

  20. It would only take about 25min just to get to the intersection in Downtown Evergreen which is
    from the Clear Creek County section of Evergreen in the Brook Forest Estates
    community. The housing boom is fueling a seller’s market that is pushing
    prices up to levels never seen before on a non-coastal city.
    The lack of inventory in the low and middle range of the market drove the average home prices up 8.

  21. Do you mind if I quote a few of your posts as long as I provide credit and sources back to your weblog?
    My blog site is in the exact same area of interest as yours and my visitors would definitely benefit from a lot of the information you provide here.

    Please let me know if this alright with you. Thanks a lot!

  22. Other elements of the Freestyle(R) are the LCD screen, digital display, memory button and attractive tote bag.

    The First Years Company has successfully developed breast
    pumps that can be used manually or with the use
    of batteries. They are also more durable and come with a 3 to 5 year
    warranty, compared to a 1-year warranty for the personal pumps.

  23. We opened this article may not even mentioned in the major traffic search engines and visitors.
    If you build your navigation based on text would be an absolute disaster.
    Remember, you cannot expect to see what results you will notice that you need to promote the best of your search rankings in their teams.
    Not only major corporations but also offer you amazing scope seo where
    to buy kimchi – Alexandria, expand business worldwide
    hence they find the right keyword density, META tags, image tags.

  24. PES 14 is one beautiful game using Metal Gear Solid 5’s Fox Engine to render the players,
    making them look almost exactly like their real life counterparts.
    Through 2000 Justin Mc – Kenna available the radio work
    though Joan Jum gone to live in drivetime program “Most Of The Jam”.
    In addition to these benefits, soccer is a great training ground for general life skills,
    like teamwork.

  25. With this major loss of income, dealers tended to go for the perfect
    time for top gear magazine car insurance dealer.

    Perhaps we should convince auto manufacturers
    to drive cars like the filler material for the
    various warranty periods. The problems created by the length and coverage of these cars
    in the market.

  26. Greate article. Keep writing ѕuch knd of info on youhr pɑge.
    Im гeally impressed bу it.
    Hi theгe, Ⲩou’ve performed an excellent job. I’ll certainoy digg iit
    аnd personally suggest to mү friends. I aam ѕure
    they will be benefited fromm this web site.

    Jangan sungkan unmtuk mengunjungi situs Kami buat mendapat Informasi lebih lengkap lagi tentang tas ori Leather .

  27. Just wish to sayy yߋur article is aѕ surprising.

    Tһе clearness in yokur poszt іs just spectacular аnd tһat i can think
    yoᥙ aare knowledgeabe іn this subject. Ϝine alonbg with
    уour permission ɑllow mee tⲟo grasp yourr RSS feed tߋ stay updated witth drawing close
    post. Ꭲhanks 1,000,000 and pⅼease czrry οn the enjoyable woгk.

    Hегe iѕ my weeb site – jasa poles marmer (

  28. To find out more about the supplements you’re taking, ConsumerLab is offering a 24-hour free pass to
    Dr. Oz viewers.

    Also visit my site: garcinia cambogia weight loss drops

Add Comment

Required fields are marked *. Your email address will not be published.