Traditional logging vs AOP logging

前端 未结 4 1328
离开以前
离开以前 2020-12-01 14:40

I\'m starting this new project and we are thrashing out our logging/debugging approach and I wanted to put the question to the rest of you on SO, given

priva         


        
4条回答
  •  粉色の甜心
    2020-12-01 15:16

    For performance, AOP approach certainly has a little overhead against the traditional one.

    One of the many strengths of AOP is that it allows you to separate your non-business concerns from your business logic. It also helps you in mundane tasks such putting a logging logic in each of your method or place a try-catch statement on each method.

    I think the real issue is that if the performance overhead (in my experience which is only minimal) would compensate on the mundane tasks that you have to go through while developing.

    A friend told me before that it's better to have a slower app that is maintainable and scalable than having a faster app that would give you hell in maintenance. Slowness could be compensated in many ways, such as upgrading hardware and etc.

    This is just my two cents, hope this helps.

提交回复
热议问题