civet@drM 他之前给了我很多编程代码还没有机会完全去看,记录一下今天跟他上课内容。介绍了用signals的代码。要好好跟他学一下!
* Removing unnecessary code feels great.
* Composition and interfaces are favored over inheritance.
* Events in interfaces are a good thing.
* Event types are classes,not strings.
* Event classes should focus on the data they contain.
* Event classes should not contain string constants that varIoUs other classes use.
* Test-Driven Development (TDD) is essential and fun.
* No singletons.
我译给你看看:
* 移除不必要的代码感觉很爽
* 比起继承,更喜欢组合和接口
* 事件用接口好
* 事件类型是类,不是字符串
* 事件类应该注重在他们含有的数据
* 事件类不应该含有字符串常量(被其他类所引用)
* TDD(Test-Driven Development)必要又有趣
* 无单例
http://github.com/robertpenner/as3-signals/tree/master/src/org/osflash/signals/