正确的设计: 理应是设计出一个不是最差的架构,而不是要试图设计一个最好的架构 (Never shoot for the best architecture, but rather the least worst architecture)。other blog: https://xiang753017.gitbook.io/zixiang-blog/xi-tong-she-ji-rong-yi-chan-sheng-she-ji-mang-dian

错误:用越多 Pattern 就越猛

正确的设计: 理应是设计出一个不是最差的架构,而不是要试图设计一个最好的架构 (Never shoot for the best architecture, but rather the least worst architecture)。在工作上时常会遇到 JR. 工程师刚上工就想要导入各种系统设计,但往往都无法被接受。原因通常不外乎是没有延续本来系统的架构为理由,缺乏一制性等等。要避免这种状况,会有三个考虑的準则:

  • 对于实际 feature 无关的考量特徵:指一些明确的设计特徵,像是 “效能,扩充性...” ,且通常会载明载 Spec 中
  • 会直接影响到系统架构的考量特徵:指的是一些隐含式考量特徵,但这些不一定会被载明 spec 中,像是 安全性
  • 达成系统运行这一类型是实际撰写系统採用的设计,但原则上架构越简单越好,只包含必要的架构
  • 实际操作的时候,应该参考下列流程:Read Requirements -> Extract needs characteristics -> pick must do characteristics

    • Read Requirements阅读 Feature Requirements(实际商业需求) / non-feature (实际技术需求) 的需求,也或许可以产出隐含的需求。ex: non-feature 需求是像是 performance 等, 隐含需求像是 security 等等的
    • Extract needs characteristics除了要达到商业的目的之外,以及明确的需求之外,隐含的需求未必都要实作
    • pick must do characteristics常用的系统Characteristics 如下
    System Domain Concern
    Architecture characteristics
    Mergers and acquisitions Interoperability, scalability, adaptability, extensibility
    Time to market Agility, testability, deployability
    User satisfaction Performance, availability, fault tolerance, testability, deployability, agility, security
    Competitive advantage Agility, testability, deployability, scalability, availability, fault tolerance
    Time and budget Simplicity, feasibility

    Reference

    [1] Fundamentals of Software Architecture: An Engineering Approach, Mark Richards & Neal Ford