知识卡片
四类过滤器各有处理职责
生产者只发出流程输入;转换器接收并加工数据;测试器根据条件决定是否继续或选择路径;消费者结束流程,可展示或持久化结果。过滤器通常无状态且只做一项任务,复杂任务应由多个过滤器组合。原书“低于五美元的订单不转发”是测试器的教学例子,不是通用业务规则。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Pipeline Architecture Style · 查看原书依据
Filters are self-contained pieces of functionality that are independent from other filters. They are generally stateless, and should perform one task only.
参考来源
- 位置:《Fundamentals of Software Architecture》原书第12章《Pipeline Architecture Style》(阅读计划第15项;源文件:`OEBPS/ch12.html`)
- 结论依据:原文逐一定义 producer、transformer、tester、consumer,并说明单职责与通常无状态。
- 原始内容:Filters are self-contained pieces of functionality that are independent from other filters. They are generally stateless, and should perform one task only.