Technology Radar
Published : Apr 13, 2021
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar.
Understand more
Apr 2021
Adopt
API扩张-收缩模式,有时也被称为并行修改,很多人对这个模式都很熟悉,尤其是在与数据库或代码一起使用的时候,而在API方面我们只看到较低的采用率。它具体指的是,人们通常会采用复杂的版本控制和破坏性的修改来实现API升级,而其实简单的扩张再收缩就可以满足需求。例如,在想要弃用API中的某个元素时,先添加一个不包含这个元素的API,然后在消费者都切换到新的API之后,再删除该元素以及包含该元素的旧API。这种方式确实需要API消费者的一些协调和可见性,可能需要通过消费者驱动的契约测试之类的技术来实现。