知识卡片

普通读书笔记卡 · 3389

业务规则与数据优先放服务

理解等级:中级

共享业务规则、持久化业务记录或高频变化的能力,优先放在服务边界内。服务可独立维护实现和数据;若放入共享库,版本迁移和数据库访问可能跨团队传播。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第6章《Principles of Proper Services》(源文件:`_epub-src/OPS/ch06.xhtml`,归一化正文 [4214:8435)) - 结论依据:原文列出封装业务规则、业务持久化和高变化率作为优先建服务的条件。 - 原始内容:Encapsulating business rules: Related to your core business. For example: calculate interest rate, calculate sales commission, decide the best delivery route for a driver, rent a car, book a flight, process payments. Needs business persistence: Business records should be persisted and queried by services. Internal shared libraries should not access datastores like relational databases. High rate of change: When the frequency of change is high - happening every week or even daily - services are the right choice.