Observer pattern or Callback?

前端 未结 4 760
长发绾君心
长发绾君心 2021-02-02 00:40

I have to do a design of a DownloadManager, but my main question is related to the notifications that a Download can send to the DownloadManager<

4条回答
  •  余生分开走
    2021-02-02 01:11

    Callbacks FTW. It is simpler, and in the vast majority of cases, simplicity influences every other aspect of the project in a positive way, including development, debugging, optimization, documentation and further maintenance.

提交回复
热议问题