4
Shouts

Configuration Settings Are A Dependency That Should Be Injected

posted by devtrendsdevtrends 793 days, 21 hours, 10 minutes ago
Sunday, April 17, 2011 6:51:08 PM GMT

Dependency Injection does not just apply to obvious dependencies such as repositories and logging components. It is very important to inject ALL dependencies including the less obvious ones. In my experience, one of the most overlooked areas is configuration. Many people seem perfectly happy to extract settings from config deep within their code. This is plain wrong. If you need to reference an AppSetting in your business logic, inject it. If you need a connection string in your data access code, inject that too...

category: Web Dev | clicked: 2 | | source: devtrends.co.uk | show counter code
tags: IoC, Dependecy Injection

No comments yet, be the first one to post comment.

To post your comment please login or signup