43

老司机出品———疯狂造轮子之事件总线的设计思路

 5 years ago
source link: http://www.cocoachina.com/ios/20181107/25395.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
随着公司业务不断地迭代,数据层和UI层不断地下沉,被业务层进行包装,导致数据层想要跟UI层进行通信要经过一层层的带向上抛事件转发给对应的UI层。在重构过程中,我们希望设计一种通信方式,能直接连通数据层和UI层,而又不影响当前的业务层,在本次重构中,我们采取了事件总线的方式来解决这个问题。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK