-1

I wanna explain about spring AOP to some one who new to spring programming. Could some one help me to find the real world example for Aspect Oriented Programming ?

ksn_123
  • 25
  • 5

1 Answers1

-1

Mainly a useless technology: The main application is to add one log statement automatically at the beginn of each method.
The theroetical application is to automatically add code for whatever reason.

Drawbacks
Apsects modify the byte code and add things not visble in the source code. That makes big problemns to other tools like test coverage calculation, which then give a wrong test coverage.
Further it introduces: What you see is not what you get.

Better stay away from that. That added costs to our projects with no benefit, we finally removed it after two years, and are happier now.

AlexWien
  • 28,470
  • 6
  • 53
  • 83
  • 1
    Declarative transaction handling is a far better use of aspects; doing that right without them is much more awkward and tends to require a lot of repeated code. “Tricky and boring” is a dangerous combination. – Donal Fellows Dec 22 '12 at 15:00
  • 2
    @AlexWien I stronly disagree with this answer. AOP is a very good tool for some raw but commen taks like transaction managent, error handling/logging ... – Ralph Dec 22 '12 at 15:11