How to make the cleanest code when reporting progress to a user?

后端 未结 13 1493
失恋的感觉
失恋的感觉 2021-02-08 09:10

I\'ve struggled for the last couple of months to come up with some clean code to report progress to a user. Everything always seems to boil down to:

ReportProgr         


        
13条回答
  •  野性不改
    2021-02-08 09:47

    Could you perhaps use Aspect Oriented Programming, and devise a Progress Aspect?

    There are a number of AOP implementations. In the Java world, the 2 most common are AspectJ and Spring (which uses either AspectJ, or Proxy based aspects).

提交回复
热议问题