I LOVE AOP... Ever since <@U06TXM6AW> showed me h...
# cfml-general
g
I LOVE AOP... Ever since @markmandel showed me how to use in a user group meeting when he was finishing off ColdSpring. What a fantastic Design Pattern / toolset!
a
what do you use it for? The classic example is always logging. Be nice to know some real world use-cases.
l
Code profiling. Async logging Auto transactions
n
Swapping different vendor libraries in/out easily. Easily A/B testing different configuration options. Wrapping try/catch blocks around code in Production so that users see a "nice" message when an error occurs, but leaving the full debug info visible in Dev/QA...without violating the DRY rule. ....all kinds of things! Coincidentally, @markmandel's demo of AOP at Adobe Max ages ago is what also made it "click" for me. Before that every demo I saw seemed like a really big pile of extra work just to use the CFLog tag, with no real benefits. Mark's talk was the first one that made actual sense to me (and I give him a shout-out in my AOP talks to this day because of that).
👍🏼 1
a
Thanks all. I have used AOP before - indirectly - by using the "around" methods in ColdBox / FW1 but don't think I've ever used them directly in Wirebox or DI1 so thanks for the use cases. The A/B testing one I'd never thought of before!