Published Interface

Resources

  • https://martinfowler.com/ieeeSoftware/published.pdf

Published Interface

Refers to a class interface that's used outside the code base that it's defined in.

Challenges

Things rapidly change if I put that software out on the Web as a component, and other people, whom I don’t know, start building applications on top of it. If I now delete the parameter, everybody else’s code will break when I upgrade.

The key difference is being able to find and change the code that uses an interface. For a published interface, this isn’t possible, so you need a more elaborate interface update process. Interface users are either callers or are classes that subclass or implement an interface.

Suggestions

  • Don’t treat interfaces as published unless they are
  • Don’t publish interfaces inside a team, result of strong form of code ownership.
  • Publish as little as you can as late as you can
  • Try to make your changes additions

转载于:https://my.oschina.net/u/3551123/blog/994848

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值