As I get deeper into the area of ASP.NET MVC 3, I feel like I'm finding a lot of very nice technical nuggets as well as new ways of doing things versus classic ASP.NET. One of those "nuggets" is custom action filters. You can simply decorate your controller classes or methods with attributes that, by convention, point to a "custom action filter" class that can perfom some operations given some point of execution (e.g. On Exception, On Method Execution, etc). They are VERY handy if you have some sort of operation that needs to be performed at a regular point in the execution of your code.

The question is this: How does this best fit in with object oriented design? What do you think is the best way of annotating that on a UML diagram or when you are trying to draw them up on a white board and explaining the design?

I'm very visual, so I like explaining my designs on the white board, but I'm at a loss of how to best convey custom action filters in an Object Oriented basis. They are not really an interface that needs to be implemented. They do take advantage of inheritance, but not in the context of where they are executed. They seem to fit best under the realm of "Aspect oriented" programming, where you have actions that take place under the covers for different scenarios (e.g. Logging, Exceptions).

Any thoughts are appreciated.

1 Answer 1


Yes, "Aspect-oriented" would be the best way to describe them. Their use via attributes suggests implementation of cross-cutting concerns.

Using UML for Modelling Cross-Cutting Concerns in Aspect Oriented Software Engineering

  • 1
    Thanks @robert - I don't have an IEEE subscription, but your answer did prompt me to find a good free article on the topic of cross-cutting concerns in Aspect Oriented programming - which this seems to fit well. Here is the link: google.com/url?q=http://citeseerx.ist.psu.edu/viewdoc/…
    – Catchops
    Aug 24, 2011 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.