DIY-DI

The “dependency injection” (DI) technique is a way to improve testability and maintainability of object-oriented code. Typically adoption of dependency injection is coupled with adoption of a dependency injection framework, such as Guice or Spring. These materials show how dependency injection can be accomplished without any framework. The same benefits provided by frameworks can be realized using “do-it-yourself” (DIY) handcrafted code. This model is named DIY-DI, pronounced die-die.

Update (May 29, 2010): I added a comparison with Guice and more polished code snippets to the DIY-DI manual.

315 thoughts on “DIY-DI

  1. nike zoom

    I happen to be writing to let you understand what a great discovery our princess had reading through the blog. She figured out such a lot of pieces, which include what it is like to have a wonderful giving spirit to make the mediocre ones completely fully understand a number of hard to do issues. You actually surpassed my desires. Thanks for providing those informative, trustworthy, revealing as well as unique tips on your topic to Ethel.

  2. yeezy boost

    I intended to create you this very little observation just to give many thanks as before for those pretty secrets you have contributed on this website. It’s so shockingly open-handed with people like you to grant publicly just what a lot of folks might have advertised for an ebook in order to make some money on their own, most notably since you might have done it in case you wanted. These points also served to be the easy way to fully grasp that some people have similar eagerness like my own to find out more with reference to this issue. I am sure there are millions of more enjoyable periods in the future for folks who looked over your blog.

  3. skechers outlet online

    I needed to compose you the tiny note to finally say thank you yet again with the pretty views you have documented at this time. It was quite incredibly generous of you to supply easily precisely what a lot of folks might have advertised as an electronic book to earn some cash for themselves, and in particular since you could have tried it in the event you decided. The good tips in addition acted like the easy way to comprehend other people have similar passion the same as my very own to realize very much more around this matter. I believe there are many more pleasant moments in the future for people who examine your site.

  4. KristinePars

    I see your blog needs some unique content. Writing manually is
    time consuming, but there is solution for this.

    Just search for: Masquro’s strategies

  5. ????? ???????? ??????????? ??????

    My spouse and I absolutely love your blog and find most of your post’s to be
    just what I’m looking for. can you offer guest writers to
    write content for you personally? I wouldn’t mind writing a post or elaborating on a few of
    the subjects you write about here. Again, awesome site!

  6. chrome hearts online

    I precisely desired to appreciate you all over again. I do not know the things that I would’ve used in the absence of the actual tricks revealed by you about such area of interest. It became a very traumatic dilemma in my view, however , encountering a professional manner you processed that forced me to jump for fulfillment. I will be happier for the information as well as hope that you really know what an amazing job you are getting into training some other people through your webpage. I am sure you haven’t got to know any of us.

  7. adidas tubular

    Thanks for all your valuable labor on this site. Ellie really loves managing investigation and it’s obvious why. I know all about the lively tactic you convey powerful secrets via the website and as well as recommend contribution from others on the area of interest plus my daughter is actually starting to learn a great deal. Enjoy the remaining portion of the new year. You are always conducting a first class job.

  8. ???????? ??????????? ????? Insurance Market

    I drop a leave a response when I like a post on a site or if I have something to contribute to the conversation. It’s triggered by the fire displayed in the
    article I looked at. And after this article DIY-DI – Black Sheep.
    I was actually moved enough to drop a leave a responsea response 🙂 I actually do have a few questions
    for you if it’s okay. Could it be only me or do a
    few of these remarks come across as if they are written by brain dead folks?
    😛 And, if you are writing at additional social sites, I’d like to keep up with
    you. Would you make a list every one of all your communal
    pages like your linkedin profile, Facebook page or twitter feed?

  9. michael kors outlet

    My wife and i got very ecstatic Jordan managed to conclude his analysis out of the precious recommendations he discovered from your very own web page. It’s not at all simplistic just to possibly be giving for free thoughts that a number of people could have been selling. And we all see we’ve got you to appreciate for this. All of the explanations you made, the straightforward website menu, the friendships you can make it easier to engender – it’s got all incredible, and it’s really letting our son in addition to the family feel that that subject is awesome, and that is extremely indispensable. Thank you for the whole thing!

  10. ???????? ??????????? ?????

    I do believe all the concepts you have introduced to your post.
    They are very convincing and can certainly work. Still, the posts are too short for novices.
    May you please extend them a little from next time?
    Thank you for the post.

  11. asfaleiaautokinhtou

    This is the right webpage for anybody who wishes to understand this topic.
    You know a whole lot its almost tough to argue with you (not that I actually would want
    to…HaHa). You definitely put a new spin on a topic that’s been written about for years.
    Wonderful stuff, just wonderful!

  12. Alfonso

    Heya i’m for the primary time here. I came across this board and I to find It truly useful
    & it helped me out a lot. I’m hoping to present one thing
    back and aid others such as you helped me.

  13. ????? ???????? ??????????? ?????

    Good day! This is my first visit to your blog! We are a group of volunteers and
    starting a new project in a community in the same niche.
    Your blog provided us beneficial information to work on. You have done a marvellous job!

  14. yeezy boost 350

    A lot of thanks for all your valuable work on this website. My niece take interest in going through internet research and it is simple to grasp why. Most people notice all relating to the lively manner you offer both interesting and useful secrets through this web site and even attract participation from other ones about this issue while our simple princess is in fact discovering so much. Take advantage of the rest of the year. You’re performing a great job.

  15. lacoste polo shirts

    I want to express thanks to this writer just for bailing me out of this scenario. Just after looking out throughout the the web and getting principles which are not productive, I assumed my life was over. Existing devoid of the solutions to the problems you have solved through the site is a crucial case, and the kind that would have badly affected my entire career if I had not discovered the website. Your main natural talent and kindness in dealing with a lot of stuff was vital. I’m not sure what I would have done if I had not come upon such a point like this. I’m able to at this moment relish my future. Thanks so much for your high quality and effective help. I will not think twice to endorse the sites to any person who ought to have guide on this matter.

  16. yeezy shoes

    I simply wanted to say thanks again. I am not sure what I might have undertaken without the entire methods shared by you concerning such subject matter. It absolutely was a hard condition for me personally, however , noticing the well-written avenue you handled that took me to weep over happiness. I am grateful for your information and in addition wish you find out what an amazing job that you’re carrying out teaching people today all through your web site. I’m certain you haven’t got to know all of us.

  17. yeezy boost 350

    I just wanted to make a brief word to be able to say thanks to you for these precious concepts you are giving at this site. My rather long internet investigation has at the end of the day been compensated with really good insight to exchange with my contacts. I would mention that many of us readers are very endowed to be in a superb place with many special people with insightful strategies. I feel very much blessed to have come across your entire site and look forward to plenty of more entertaining moments reading here. Thanks again for a lot of things.

  18. fitflops sale clearance

    I wanted to draft you this very small note to give many thanks over again regarding the pleasing suggestions you have discussed on this site. It was certainly surprisingly open-handed with people like you to present unhampered exactly what many of us would have advertised for an electronic book to get some bucks for themselves, principally since you might have done it if you wanted. Those good ideas additionally served to be the fantastic way to know that many people have the same desire much like my very own to figure out a whole lot more concerning this problem. I know there are a lot more enjoyable periods in the future for individuals who discover your website.

  19. nike huarache

    I wish to show some appreciation to you just for bailing me out of this particular predicament. Just after checking through the world-wide-web and coming across solutions which are not pleasant, I was thinking my entire life was well over. Being alive without the solutions to the problems you have resolved as a result of your good write-up is a critical case, as well as ones which could have adversely affected my entire career if I had not discovered the blog. Your own know-how and kindness in controlling every aspect was useful. I’m not sure what I would have done if I hadn’t come across such a solution like this. I can at this time relish my future. Thanks so much for this impressive and result oriented guide. I won’t be reluctant to recommend the sites to anyone who ought to have guide on this matter.

  20. michael kors outlet

    I simply needed to thank you so much again. I’m not certain the things I could possibly have created without the type of creative concepts documented by you about my subject. It was actually a very horrifying case in my opinion, nevertheless taking a look at this well-written mode you handled it took me to cry with joy. Now i am happier for this service and expect you realize what a great job you happen to be accomplishing teaching the rest by way of your site. I know that you have never met all of us.

  21. hermes belt

    Thank you a lot for providing individuals with an exceptionally marvellous chance to read in detail from this site. It really is very fantastic and stuffed with a good time for me and my office peers to search the blog at minimum 3 times weekly to read through the latest secrets you have got. Of course, I am also at all times fascinated with your gorgeous tactics served by you. Some 1 facts in this posting are in truth the most beneficial we’ve ever had.

  22. michael kors factory outlet

    I wanted to construct a brief message to say thanks to you for the magnificent tips you are giving out here. My incredibly long internet search has now been paid with reasonable content to exchange with my pals. I ‘d express that most of us visitors are undoubtedly fortunate to dwell in a good website with so many special people with useful solutions. I feel somewhat privileged to have seen the website page and look forward to so many more excellent moments reading here. Thanks once more for a lot of things.

  23. Jerilyn

    I have recently started a site, the info you provide on this website has helped me tremendously. Thank you for all of your time & work.

  24. Franklyn

    Does your blog have a contact page? I’m having trouble locating it but, I’d like to send you an e-mail. I’ve got some creative ideas for your blog you might be interested in hearing. Either way, great website and I look forward to seeing it grow over time.

  25. yeezy shoes

    I precisely had to appreciate you once more. I’m not certain the things that I would have worked on without these creative ideas contributed by you relating to such a topic. It previously was a very frightful difficulty in my position, but witnessing a expert fashion you treated it took me to weep over delight. Extremely grateful for the information and as well , trust you comprehend what a great job that you are undertaking educating the others through the use of your websites. Most likely you haven’t encountered all of us.

  26. michael kors outlet online

    I must point out my respect for your generosity giving support to people who should have assistance with this one area of interest. Your very own dedication to getting the message all-around became quite valuable and have specifically helped folks like me to attain their ambitions. Your new invaluable report means a great deal a person like me and additionally to my fellow workers. Best wishes; from all of us.

  27. adidas stan smith shoes

    Thank you so much for giving everyone an exceptionally splendid opportunity to read articles and blog posts from here. It’s usually so good and as well , full of fun for me personally and my office fellow workers to visit your site the equivalent of 3 times in one week to read the fresh guidance you have got. And indeed, I am just usually fulfilled for the tremendous points you serve. Selected two ideas on this page are certainly the finest I’ve ever had.

  28. cheap jordans

    My husband and i ended up being so ecstatic when John managed to complete his reports through the entire ideas he obtained using your site. It is now and again perplexing to just find yourself giving for free strategies that many many people could have been making money from. So we discover we’ve got the blog owner to appreciate because of that. Those illustrations you have made, the simple website navigation, the friendships you can assist to create – it’s most fabulous, and it is facilitating our son and our family understand the article is amusing, which is certainly unbelievably essential. Thank you for the whole thing!

  29. yeezy boost 350 v2

    I needed to send you the little bit of note in order to thank you so much over again for your personal amazing knowledge you have discussed on this site. It has been quite shockingly open-handed with people like you to grant without restraint just what many people could have made available for an e book to help with making some profit for their own end, particularly considering that you could have tried it if you ever wanted. These pointers in addition served as the fantastic way to fully grasp many people have similar dream just as my own to see lots more on the subject of this issue. I think there are thousands of more fun times up front for people who examine your site.

  30. jordan shoes

    I would like to point out my respect for your kind-heartedness giving support to people that require guidance on your area. Your very own dedication to getting the message up and down came to be exceedingly productive and has continuously permitted men and women much like me to get to their objectives. This important report entails this much a person like me and far more to my office colleagues. With thanks; from all of us.

  31. Buy Neopoints

    Somebody essentially lend a hand to make severely articles I would state.

    That is the very first time I frequented your website page and up
    to now? I amazed with the analysis you made to create this particular put up incredible.
    Excellent activity!

  32. adidas superstar shoes

    I have to express appreciation to this writer for rescuing me from this particular scenario. Right after browsing through the the web and meeting views which are not powerful, I thought my life was done. Existing minus the solutions to the issues you have resolved as a result of the guideline is a critical case, as well as ones that might have in a wrong way damaged my career if I had not come across your web site. Your main skills and kindness in handling all the details was very useful. I don’t know what I would have done if I had not encountered such a stuff like this. I can now relish my future. Thanks for your time so much for the impressive and results-oriented help. I won’t hesitate to refer your web page to anybody who should receive guide about this area.

  33. large poster paper

    It’s appropriate time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it!

  34. yeezy shoes

    My husband and i have been quite thankful that Chris could complete his inquiry by way of the ideas he discovered through the blog. It’s not at all simplistic just to always be handing out techniques others might have been selling. We really recognize we need the website owner to give thanks to for this. Most of the illustrations you made, the simple blog navigation, the relationships you give support to foster – it is mostly overwhelming, and it’s really letting our son in addition to the family imagine that that theme is exciting, and that is exceedingly serious. Thanks for the whole lot!

  35. picture printing software

    Have you ever considered creating an ebook or guest authoring on other websites? I have a blog based upon on the same topics you discuss and would really like to have you share some stories/information. I know my readers would enjoy your work. If you are even remotely interested, feel free to shoot me an email.

  36. gel mattress

    Aw, this was a seriously good post. In thought I would like to put in writing like this furthermore – taking time and actual effort to make a very excellent article… but what can I say… I procrastinate alot and by no indicates seem to obtain some thing done.

  37. michael kors outlet

    I enjoy you because of all your effort on this web site. Kim takes pleasure in participating in internet research and it’s obvious why. All of us hear all about the powerful manner you convey reliable tips and hints by means of this blog and in addition recommend contribution from other people about this issue then our favorite simple princess has always been learning so much. Take advantage of the remaining portion of the year. Your conducting a really good job.

  38. adidas ultra boost

    Thanks a lot for giving everyone remarkably marvellous possiblity to read critical reviews from this blog. It can be very cool and also stuffed with a good time for me personally and my office fellow workers to visit your site at least 3 times in 7 days to read through the newest secrets you will have. And of course, I’m always satisfied concerning the mind-blowing information served by you. Certain 4 points in this article are honestly the most suitable we have all had.

  39. yeezy shoes

    Thanks for your entire work on this web page. My mother take interest in working on investigations and it’s simple to grasp why. Most people learn all regarding the compelling way you give vital steps via this website and therefore invigorate response from other people on this theme so my simple princess is in fact being taught a lot. Take pleasure in the rest of the new year. You’re the one carrying out a useful job.

  40. adidas neo online shop

    A lot of thanks for all your valuable effort on this web page. My mother enjoys doing research and it’s really easy to understand why. We know all relating to the dynamic medium you provide practical information via the blog and therefore cause contribution from visitors on that situation so our favorite princess is without a doubt being taught a whole lot. Have fun with the rest of the year. You have been carrying out a wonderful job.

  41. michael kors outlet

    A lot of thanks for every one of your hard work on this web site. My daughter loves setting aside time for internet research and it’s really easy to see why. My spouse and i learn all regarding the compelling tactic you produce powerful guides through your website and even boost response from website visitors on the content while our favorite princess is truly being taught a whole lot. Enjoy the remaining portion of the year. You have been doing a great job.

Leave a Reply

Your email address will not be published.