Cross Cutting Concerns
Cross cutting concerns are those general, standard issue things we want to implement
in our applications once and just forget about but unfortunately permeate the whole
application. Things like Logging and Security are perfect examples. From the U.I.
through to the Database we want to make use of some sort of logging occurs and certainly
want the abilty to define and implement some sort of security. The problem therfore
is that we have a basic piece of functionality spread across and intertwined the
application; we no longer have seperation of concerns. What happens when we want
to change our means of logging? Do we have to modifiy every assembly in the application
to use this new piece of functionality?
Development
Aspect Orientated Programming is a means of inserting functionality into currently
existing code. It can appear quite foriegn to tradition OO developers as there is
some appearance of 'magic' as it is not always completely apparent where or how
the additonal funtionality is added. Frameworks like Spring.Net and PostSharp both
help in this regard, albeit in rather different manners. As most of the functionality
that we use AOP with is generic, it provides high levels of reuse meaning faster
time to delivery and increase time working on business problems and less on non
functional deliverables. On a new project we can with one line of code potential
provide logging for every method in the assembly. In addtion changes to the way
logging is handled can be done in one place and affect the whole application stack.
Now that is serious reduction in technical/non-functional coding time, keeping all
those Agile
Project Managers & clients very happy.