I got asked this question in a interview. I clearly know what a decorator pattern is and how it can be used. But I was not able to think through this question in the interview.
This is the actual question asked.
Is AOP a variation of decorator pattern ? How does the AOP implementation vary from trademark decorator pattern ?
I would say AOP (Aspect Oriented Programming) is NOT a pattern by itself (and thus not a type of decorator pattern from my POV)... its implementation can be done via one or more patterns (including the use of decorator pattern)... AOP is a programming paradigm IMHO - other paradigms are for example OOP, functional programming or procedural programming...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With