Monday
Jun012009
Cross-cutting concern
In software development cross-cutting concerns are logical parts of the program that affect (crosscut) other concerns or modules.
Examples of cross-cutting concerns are:
- Logging
- Exception Handling
- Authentication and authorization
- Validation
It is the nature of cross-cutting concerns that they often can't be cleanly decomposed from the rest of the program. This usually results in either complex and tangled code or in the code that is duplicated across the codebase (or both).
There are a few approaches that target the problem of separating and injecting cross-cutting concerns into the codebase:
- Using common development patterns referring to static specialized service locators resolving policies by name (like Microsoft Enterprise Library Application Blocks).
- Using Inversion of Control containers to inject concerns into the auto-generated interceptors.
- Using decorator classes as a well-defined injection points that receive specific concerns from the IoC Containers.
Related links: