主题索引
测试有效性与验证手段
比较单元测试、变异、模糊测试、静态分析与故障注入各自能证明什么。
来源书籍
7/7
Skill 版本:未记录
类别:前端架构与设计系统类(2026-09-27 按授权新建,见 category-checklists.md)
本次实际使用规则:book-notes v8(2026-09-27 P1→v8 批处理修订),详见 _workflow.md。书中 Grunt/Gulp、Compass、Hologram、PhantomCSS、Bower 等工具以 2016 年前后为准,多数已停止维护。
四象限判定:高信息浓度 × 低稳定性 → 工程实践
理由: - 信息浓度高:全书不是单纯罗列工具命令,而是在反复回答“为什么需要前端架构”。第1章把前端架构定义为工具与流程组成的质量系统;第3章提出代码、流程、测试、文档四个核心;第7章从 Red Hat 案例中提炼出布局/组件分离、唯一选择器、数据属性变体和语义化网格;第17章进一步把样式文档、模式库、Twig 渲染和 JSON Schema 连接成可验证的设计系统流水线。 - 稳定性低:大量示例绑定 2016 年前后的工具生态与实践细节,如 Grunt/Gulp、Compass、Hologram、SassDoc、Pattern Lab、Bower、PhantomCSS、CasperJS 等。虽然背后的设计系统、自动化、测试和文档原则仍可迁移,但具体工具链在 2026 年视角下已有明显时效性。
综合来看,这是一本“用当年前端工具生态讲透架构职责”的工程实践书:最值得保留的是系统化思维、流程设计和 Red Hat 案例中的可迁移原则,而不是具体工具安装和配置步骤。
| 章节号 | 章节标题 | 精读/略读 | 状态 | 卡片数 |
|---|---|---|---|---|
| 前言部分 | 版权声明/O’Reilly介绍/前言/作者介绍/封面介绍 | 略读 | done | 0 |
| 第一部分 | 引言 | 略读 | done | 0 |
| 1 | 前端架构原则 | 精读 | done | 4 |
| 2 | Alpha 项目 | 精读 | done | 3 |
| 3 | 前端架构的核心 | 精读 | done | 3 |
| 第二部分 | 代码核心 | 略读 | done | 0 |
| 4 | HTML | 精读 | done | 4 |
| 5 | CSS | 精读 | done | 4 |
| 6 | JavaScript | 精读 | done | 3 |
| 7 | Red Hat 代码 | 精读 | done | 6 |
| 第三部分 | 流程核心 | 略读 | done | 0 |
| 8 | 工作流 | 精读 | done | 6 |
| 9 | 任务处理器 | 精读 | done | 3 |
| 10 | Red Hat 流程 | 精读 | done | 4 |
| 第四部分 | 测试核心 | 略读 | done | 0 |
| 11 | 单元测试 | 精读 | done | 3 |
| 12 | 性能测试 | 精读 | done | 5 |
| 13 | 视觉还原测试 | 精读 | done | 3 |
| 14 | Red Hat 测试方法 | 精读 | done | 3 |
| 第五部分 | 文档核心 | 略读 | done | 0 |
| 15 | 样式文档 | 精读 | done | 4 |
| 16 | 图形库 | 精读 | done | 4 |
| 17 | Red Hat 文档 | 精读 | done | 7 |
| 18 | 总结 | 精读 | done | 2 |
| 序号 | 实践卡 | 实践方式 | 状态 |
|---|---|---|---|
| 001 | [[给组件加视觉回归]] | 真实任务 | 计划已写,未执行 |
| 002 | [[设CI性能预算]] | 真实任务 | 计划已写,未执行 |
| 必答维度 | 覆盖状态 | 关联卡片标题或未覆盖理由 |
|---|---|---|
| 标记与样式组织 | 已覆盖 | [[标记生成权]]、[[自动与可控]]、[[方法服从约束]]、[[继承的副作用]]、[[组件样式边界]]、[[布局不碰内容]]、[[唯一选择器]] |
| 设计系统与模式复用 | 已覆盖 | [[设计系统是翻译器]]、[[先分解设计]]、[[模式库是语言]]、[[单一样式来源]]、[[标记单一来源]]、[[系统越用越省]] |
| 开发工作流 | 已覆盖 | [[需求要跨职能]]、[[原型是共同真相]]、[[新人上手成本]]、[[故事按系统写]]、[[审查保护系统]]、[[CI编译资源]] |
| 构建自动化 | 已覆盖 | [[自动化封装规则]]、[[从最小流程开始]]、[[工具不是身份]] |
| 测试体系 | 已覆盖 | [[一次只做一件事]]、[[TDD先定行为]]、[[覆盖率要权衡]]、[[性能预算]]、[[自动性能闸门]]、[[视觉回归的价值]]、[[组件级视觉测]] |
| 文档与数据契约 | 已覆盖 | [[文档贴近代码]]、[[自由与严格]]、[[标准产出物]]、[[模式驱动流程]]、[[JSON模式约束]]、[[自动生成录入]] |
| 架构推行与演进 | 已覆盖 | [[早期介入的价值]]、[[架构需要窗口期]]、[[成功案例的悖论]]、[[架构持续跟进]]、[[迭代不是失败]]、[[别崇拜工具]] |
本书以 Red Hat 项目为例讲前端架构的代码、流程、测试、文档四个核心;新建“CSS 架构与设计系统”“Web 性能预算”两个主题,其余卡片复用架构师成长、架构设计流程与重构、可读性与模块化、CI/CD、测试有效性、迭代流程与原型等既有主题。
| 卡片标题 | 结论 | 主题文件或原因 |
|---|---|---|
| 前端架构即系统 | 已复用 | notes/_topics/architect-growth.md |
| 架构师的读者 | 已复用 | notes/_topics/architect-growth.md |
| 早期介入的价值 | 已复用 | notes/_topics/architecture-design-process.md |
| 架构持续跟进 | 已复用 | notes/_topics/architecture-design-process.md |
| 架构需要窗口期 | 已复用 | notes/_topics/architecture-refactoring.md |
| 成功案例的悖论 | 已复用 | notes/_topics/architecture-refactoring.md |
| 从零不是逃避 | 已复用 | notes/_topics/architecture-refactoring.md |
| 四个核心 | 已复用 | notes/_topics/architecture-design-process.md |
| 复杂度要匹配 | 已复用 | notes/_topics/architecture-design-process.md |
| 架构师要学习 | 已复用 | notes/_topics/architect-growth.md |
| 标记生成权 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 自动与可控 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 设计系统是翻译器 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 方法服从约束 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 继承的副作用 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 组件样式边界 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 单一样式来源 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 修饰符要可选 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 可能不需要框架 | 已复用 | notes/_topics/architecture-decision-making.md |
| 整洁代码是协作 | 已复用 | notes/_topics/code-readability.md |
| 复用函数有边界 | 已复用 | notes/_topics/modularity-information-hiding.md |
| 先分解设计 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 布局不碰内容 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 规则要不可变 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 唯一选择器 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 数据属性做变体 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 语义化网格 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 需求要跨职能 | 已复用 | notes/_topics/iterative-process-tailoring.md |
| 原型是共同真相 | 已复用 | notes/_topics/ux-ideation-prototyping.md |
| 新人上手成本 | 已复用 | notes/_topics/iterative-process-tailoring.md |
| 故事按系统写 | 已复用 | notes/_topics/iterative-process-tailoring.md |
| 审查保护系统 | 已复用 | notes/_topics/ci-cd-pipeline-design.md |
| CI编译资源 | 已复用 | notes/_topics/ci-cd-pipeline-design.md |
| 自动化封装规则 | 已复用 | notes/_topics/ci-cd-pipeline-design.md |
| 从最小流程开始 | 已复用 | notes/_topics/ci-cd-pipeline-design.md |
| 工具不是身份 | 已复用 | notes/_topics/ci-cd-pipeline-design.md |
| 最后一英里 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 标准产出物 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 模式驱动流程 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 模板传递边界 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 一次只做一件事 | 已复用 | notes/_topics/modularity-information-hiding.md、notes/_topics/testing-effectiveness.md |
| TDD先定行为 | 已复用 | notes/_topics/testing-effectiveness.md |
| 覆盖率要权衡 | 已复用 | notes/_topics/testing-effectiveness.md |
| 性能预算 | 已创建 | notes/_topics/web-performance-budgets.md |
| 基线来自环境 | 已创建 | notes/_topics/web-performance-budgets.md |
| 原始指标有限 | 已创建 | notes/_topics/web-performance-budgets.md |
| 计时度量 | 已创建 | notes/_topics/web-performance-budgets.md |
| 自动性能闸门 | 已创建 | notes/_topics/web-performance-budgets.md、notes/_topics/ci-cd-pipeline-design.md |
| 视觉回归的价值 | 已复用 | notes/_topics/testing-effectiveness.md |
| 返工的三个根源 | 已复用 | notes/_topics/testing-effectiveness.md |
| 基准图是契约 | 已复用 | notes/_topics/testing-effectiveness.md |
| 组件级视觉测 | 已复用 | notes/_topics/testing-effectiveness.md |
| 测试靠近组件 | 已复用 | notes/_topics/testing-effectiveness.md |
| 失败要能修复 | 已复用 | notes/_topics/testing-effectiveness.md |
| 文档贴近代码 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 自由与严格 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 示例就是接口 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 文档可定制 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 模式库是语言 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 共享生产资源 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 数据驱动组合 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 系统越用越省 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 标记单一来源 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 数据选择模板 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 拆分文档仓库 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 统一渲染引擎 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| JSON模式约束 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 自动生成录入 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 模式限制选择 | 已创建 | notes/_topics/css-architecture-design-systems.md |
| 迭代不是失败 | 已复用 | notes/_topics/architect-growth.md |
| 别崇拜工具 | 已复用 | notes/_topics/architect-growth.md |
从本书的主题进入跨书阅读,对照其他书籍的讲解。下方数量包含主题关联的全部卡片与书籍。
主题索引
比较单元测试、变异、模糊测试、静态分析与故障注入各自能证明什么。
主题索引
比较备选方案设计、评估选择、容量预估与详细设计等架构设计流程中的判断方法。
主题索引
流水线的资源模型、任务隔离与显式依赖、定义与运行分离、事件触发,以及构建/发布/运行分离和配置外置如何让同一制品安全跨环境交付。
主题索引
比较以函数、闭包、包或服务划定模块边界并隐藏实现细节的方法。
主题索引
比较在不确定性下做架构决策的方法:以风险而非结果评价决策、期望值与决策树、认知偏差、根因追问与避免不必要的决策。
主题索引
比较架构师所需的判断力、执行力、创新力及其积累方式与成长阶段。
主题索引
比较识别重构目标、沟通推动与分段实施等架构重构方法。
主题索引
比较迭代与预测式开发、时间盒与过程裁剪在不同需求稳定性下的适用性。
主题索引
比较命名、注释、变量提取与结构选择等降低阅读负担、让代码表达意图的做法。
主题索引
比较标记控制权、CSS 方法论、组件与布局分离、单一样式来源、模式库、样式文档与模板数据模式等构建可维护前端设计系统的做法。
主题索引
比较体验目标设定、草图与低保真原型等构思手段如何降低试错成本。
主题索引
比较如何依据竞品和行业基线制定性能预算、选择资源与计时指标,以及在构建流程中自动检查预算的做法。