知识卡片
撤销必须保存足够历史
撤销需要快照或准确的可逆操作记录,把状态恢复到旧值。把全部a改b后再把全部b改a会破坏原本就存在的b,不能充当逆操作。应明确单次还是多级撤销以及历史保留上限;已经发货等真实外部副作用可能不能撤销,不能把按钮存在误当可逆性成立。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
- · 第13章 易用性
原书出处 · 1 处
- 易用性 · 查看原书依据
Not all operations can be easily reversed. For example, changing all occurrences of the letter “a” to the letter “b” in a document cannot be reversed by changing all instances of “b” to “a”, because some of those instances of “b” may have existed prior to the original change. In such a case, the system must maintain a more elaborate record of the change.
参考来源
- 位置:《Software Architecture in Practice, 4th Edition》第13章《易用性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch13.html)
- 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。
- 原始内容:Not all operations can be easily reversed. For example, changing all occurrences of the letter “a” to the letter “b” in a document cannot be reversed by changing all instances of “b” to “a”, because some of those instances of “b” may have existed prior to the original change. In such a case, the system must maintain a more elaborate record of the change.