What are the disadvantages of Aspect-Oriented Programming (AOP)?

前端 未结 7 1236
眼角桃花
眼角桃花 2021-02-02 09:54

What are the possible and critical disadvantages of Aspect-Oriented Programming?

For example: cryptic debugging for newbies (readability impact)

7条回答
  •  花落未央
    2021-02-02 10:20

    Maintenance and Debugging. With aop, you suddenly have code that is being run at a given point ( method entry, exit, whatever ) but in just looking at the code, you have no clue that it's even getting called, especially if the aop configuration is in another file, like xml config. If the advice causes some changes, then while debugging an application, things may look strange with no explanation. This doesn't affect only newbies.

提交回复
热议问题