concept boundary in category dependency injection

appears as: boundary, boundaries
Dependency Injection

This is an excerpt from Manning's book Dependency Injection.

How you refactor a particular class that has grown too big depends on the particular circumstances: the object model already in place, the domain, business logic, and so on. Splitting up a budding God Class into smaller, more focused classes according to well-known design patterns is always a good move.4  Still, there are cases where business requirements oblige you to do many different things at the same time. This is often the case at the boundary of an application. Think about a coarse-grained web service operation that triggers many business events.

Because you want to wrap a transaction around some arbitrary piece of code, you need to override three of the methods of OnMethodBoundaryAspect — namely, OnEntry, OnSuccess, and OnExit. During OnEntry, you create a new TransactionScope, and during OnExit, you dispose of the scope. OnExit is guaranteed to be called. PostSharp will wrap its call in a finally block. Only when the wrapped operation succeeds will you want to invoke the Complete method. That’s why you implement this in the OnSuccess method. You make use of the MethodExecutionTag property to transfer the created TransactionScope from method to method.