Take the following article for example:
I don’t see what benefit there is from the IOC approach as opposed to the traditional soft-coding approach. Can someone tell me what I am missing?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The article itself pretty much answers your question:
Generally speaking, design patterns, practices and approaches (IoC is not much a pattern) try to help you at least one thing: minimize coupling and maxmize cohesion. When you’re directly using
ConfigurationManagerand all that (Convert.ToBoolean, etc) you are:ConfigurationManager(bad for testing and reuse).configfile; bad for testing and reuse as well)Granted, using IoC only for reading configuration settings is an overkill, but surely this post deals only with a small part of a much bigger picture.