08 2020 档案
摘要:// gen generates integers in a separate goroutine and // sends them to the returned channel. // The callers of gen need to cancel the context once //
阅读全文
摘要:// gen generates integers in a separate goroutine and // sends them to the returned channel. // The callers of gen need to cancel the context once //
阅读全文
摘要:Template Method 模式 动机(Motivation) 在软件构建过程中,对于某一项任务,它常常有稳定的整体操作结构,但各个子步骤却有很多改变的需求,或者由于固有的原因 (比如框架与应用之间的关系)而无法和任务的整体结构同时实现。 如何在确定稳定操作结构的前提下,来灵活应对各个子步骤的变
阅读全文
摘要:设计模式--设计原则 重新认识面向对象 理解隔离变化 从宏观层面来看,面向对象的构建方式更能适应软件的变化,能将变化所带来的影响减为最小 各司其职 从微观层面来看,面向对象的方式更强调各个类的“责任” 由于需求变化导致的新增类型不应该影响原来类型的实现—— 是所谓各负其责 对象是什么? 从语言实现层
阅读全文