問題文
A team has written a piece of functionality that two of their backend plugins both need. Which of the three kinds of thing they can add to a backend fits, and what constraint follows from choosing it?
選択肢
- A service, whose reference has to carry a globally unique identifier and whose implementation cannot depend on a per-plugin one if it is declared at the root scope.
- A plugin, which the two others can then call directly in code.
- None of the three; the code has to be duplicated.
- A module, whose extension points can be reached by any plugin in the same backend, which is how a single module can serve two plugins that need what it provides.