proj-sc阶段总结

1. 使用DLL联合开发的好处: 直接扔个dll就行, 尤其是QA测试的时候.

2. 语言 : Enum 是 const ? 这样就能写出 “const == 左值” 这样的防御式编程了.

3. 设计的变动:

instance : entry = n : 1, 而对于每个instance, entry都是相同的, 而从 life cycle 的角度, instance的创建和消除, 依赖于 entry; 而entry 却可以独立于 instance 存在, 因此, 选择了 Composition.

instance : pid = 1 : 1, 并且instance和pid的 life cycle 是相同的, 因此,选择了 Aggregation.

v1.0 :

imageimage

v2.0 :

image

image

4.

code snippet # 1:

image

image

Default : success ? invalid ?

snippet # 2:

get rid of Exception, but not good for "continue"

image

Dirty Code :

image

Use Enum instead of if/else & code duplication

image

原文地址:https://www.cnblogs.com/permanence-practice/p/3851194.html