Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一个概述,以便立即确定何时使用以下哪些创建模式:
还有什么时候最好坚持简单的课程。
您能否提供一个好的资源,或者用几句话解释它,例如“如果一个对象不依赖任何东西,请使用普通类,如果需要多个类似的构造,那么通常首选工厂。”
我通常参考OODesign
它们对模式提供了很好的解释。还有“何时使用”、“常用用法”部分有助于快速参考。