You Don't Need Logging Code
This an opinion I’ve held for some years now. The title is a little disingenuous. What I actually mean is that business classes should not be concerned with what they need to log. Take this example.
.NET Developer from the UK
Aspect-Oriented Programming is a style of programming that separates cross-cutting concerns.
I’m quite an advocate of ensuring code is divided into single responsibilities and that common behaviours have their own place.
This an opinion I’ve held for some years now. The title is a little disingenuous. What I actually mean is that business classes should not be concerned with what they need to log. Take this example.
Those that have worked with me will know I’m a big advocate for Aspect-Oriented Programming. I generally like to “bolt on” concerns that sit outside of the main logic using the decorator pattern or some kind of behaviour that can wrap around a class or method, which follows the Open/Closed principle.