2007-12-25

Fake Listening《英语六级听力阅读》翻译

关键字: 英语 假装听讲
引用英语考的超级烂,但不妨碍我对英语六级这篇文章感兴趣。故将它翻译过来。 引用 If you are like most people, you’ve indulged in fake listening many times. You go to history class, sitting in the third row, and look squarely at the instructor as she speaks, but your mind is far away, floating in the clouds of pleasant daydreams. Oc ...
2007-12-25

adapter和facade模式区别

关键字: 设计模式 Adapter facade
引用我不是在设计模式上钻牛角尖,而是在写设计文档的时候对这两个模式的描述有点疑惑,区分概念是重要的,否则看文档的人很容易被误导。 写下这篇文章,做个记录,同时也让自己更明白。 adapter模式和Facade模式都是包装,用对象将遗留系统包装起来使其更容易使用。 但是他们是不同类型的包装: [list=A]在Facade模式中,我们不需要按照某个接口设计,而adapter模式中则相反。 Facade模式的动机是简化接口,而在Adapter模式中,尽管也是越简单越好,但是设计必须遵循一个已有的接口,不能再简化任何东西。[/list] 有些人认为两个设计模式的另一个差异是:Facade隐藏了 ...
xombat
搜索本博客
存档
最新评论