gpt4 book ai didi

github - 基于限界上下文拆分源代码的最佳实践

转载 作者:行者123 更新时间:2023-12-02 01:44:58 26 4
gpt4 key购买 nike

在大多数examples我明白了,他们往往每个限界上下文都有一个 GitHub/cvs 存储库,这似乎是最好的做法。

我的问题专门针对用户界面,它们是位于仅包含 ui 的单独存储库中,还是每个界面都包含在 bc 本身的存储库中?

从多个 bc 组合数据的接口(interface)呢?

只是为了在这里明确说明,我正在尝试收集如何在 ddd 项目中物理组织代码

最佳答案

考虑到标签将应用于完整的 Git 存储库,如果满足以下条件,最好在两个单独的存储库中有两组文件(如 UI 和 BC):

  • 你可以在不影响另一个的情况下对一个进行进化(并应用​​新标签)
  • 涉及的文件数量足够重要(如果 UI 只是一个或两个文件,可能不值得为它创建一个专门的 repo)

作为OP Sudarshan总结如下 in the comments :

If a UI was dedicated to a BC, then it could live within the same repo as the BC itself or a separate one, depending on whether it will evolves on it own or not.

However for UI's that span across BC's it is better to spawn them in a repo of their own and use submodules to reference the right BC repo's

关于github - 基于限界上下文拆分源代码的最佳实践,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26175092/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com