随笔分类 -  设计模式

摘要:Understanding the need of Visitor Pattern The visitor pattern is a solution to a more general design problem: I have a hierarchy of different classes. 阅读全文
posted @ 2021-04-25 07:53 ChuckLu 阅读(49) 评论(0) 推荐(0) 编辑
摘要:Visitor Design Pattern Intent Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation w 阅读全文
posted @ 2021-04-25 07:52 ChuckLu 阅读(36) 评论(0) 推荐(0) 编辑
摘要:Template Method Design Pattern Rules of thumb Strategy is like Template Method except in its granularity粒度. Template Method uses inheritance to vary p 阅读全文
posted @ 2020-06-16 14:21 ChuckLu 阅读(139) 评论(0) 推荐(0) 编辑
摘要:What is the difference between the template method and the strategy patterns? The main difference between the two is when the concrete algorithm is ch 阅读全文
posted @ 2020-06-16 13:30 ChuckLu 阅读(177) 评论(0) 推荐(0) 编辑
摘要:中介者模式 中介者模式(Mediator Pattern)是用来降低多个对象和类之间的通信复杂性。这种模式提供了一个中介类,该类通常处理不同类之间的通信,并支持松耦合,使代码易于维护。中介者模式属于行为型模式。 介绍 意图:用一个中介对象来封装一系列的对象交互,中介者使各对象不需要显式地相互引用,从 阅读全文
posted @ 2020-06-10 18:34 ChuckLu 阅读(178) 评论(0) 推荐(0) 编辑
摘要:Explanation of the UML arrows https://www.cnblogs.com/chucklu/p/10623671.html 想要学习设计模式,你得先会看类图,一张图读懂UML 虚线箭头指向依赖dependency; 实线箭头指向关联associate; 虚线三角指向接 阅读全文
posted @ 2020-05-14 16:33 ChuckLu 阅读(350) 评论(0) 推荐(0) 编辑
摘要:https://csharpindepth.com/Articles/Singleton 懒汉,饿汉,以及双层锁之外 Fourth version - not quite as lazy, but thread-safe without using locks public sealed class 阅读全文
posted @ 2019-03-28 14:28 ChuckLu 阅读(183) 评论(0) 推荐(0) 编辑
摘要:http://www.runoob.com/design-pattern/facade-pattern.html 外观模式 外观模式(Facade Pattern)隐藏系统的复杂性,并向客户端提供了一个客户端可以访问系统的接口。这种类型的设计模式属于结构型模式,它向现有的系统添加一个接口,来隐藏系统 阅读全文
posted @ 2019-03-27 19:46 ChuckLu 阅读(278) 评论(0) 推荐(0) 编辑
摘要:What are the differences between Flyweight and Object Pool patterns? They differ in the way they are used. Pooled objects can simultaneously be used b 阅读全文
posted @ 2019-03-18 18:58 ChuckLu 阅读(419) 评论(0) 推荐(0) 编辑
摘要:https://stackoverflow.com/questions/49002/prefer-composition-over-inheritance 解答1 Prefer composition over inheritance as it is more malleable / easy t 阅读全文
posted @ 2019-02-01 10:52 ChuckLu 阅读(518) 评论(0) 推荐(0) 编辑
摘要:https://www.codewars.com/kata/patterncraft-decorator/train/csharp https://www.dofactory.com/net/decorator-design-pattern 阅读全文
posted @ 2019-01-30 19:45 ChuckLu 阅读(159) 评论(0) 推荐(0) 编辑
摘要:Patterns in the Composite Application Library Inversion of Control https://www.codeproject.com/Articles/29271/Design-pattern-Inversion-of-control-and- 阅读全文
posted @ 2018-02-06 18:49 ChuckLu 阅读(155) 评论(0) 推荐(0) 编辑
摘要:#region Assembly Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35// F:\CodeFor91\ZBMYUN20\WebAPP\Source\ 阅读全文
posted @ 2017-03-03 10:44 ChuckLu 阅读(226) 评论(0) 推荐(0) 编辑
摘要:原型模式 http://www.cnblogs.com/zhili/p/PrototypePattern.html ICloneable接口 https://msdn.microsoft.com/en-us/library/system.icloneable(v=vs.110).aspx Suppo 阅读全文
posted @ 2017-01-12 17:36 ChuckLu 阅读(225) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/cbf4life/archive/2009/12/15/1624435.html 阅读全文
posted @ 2016-03-27 22:58 ChuckLu 阅读(177) 评论(0) 推荐(0) 编辑
摘要:https://msdn.microsoft.com/en-US/library/aa970850(v=vs.100).aspxIn applications, it is possible that handlers that are attached to event sources will ... 阅读全文
posted @ 2015-10-21 20:42 ChuckLu 阅读(381) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/lzhlyle/p/4696645.html 如题,实际上,我想这是很困难的。 除非——只是为了给自己做一个提醒,能够看一眼就快速回想起该设计模式的种种记忆。 下列是我之前在学习《大话设计模式》时做的笔记总结,当中有部分措辞来自其作者程杰。(非常感谢他为 阅读全文
posted @ 2015-08-03 12:11 ChuckLu 阅读(211) 评论(0) 推荐(0) 编辑
摘要:Here are three short phrases to help remember the 23 design patterns, ordered by category: Creational Patterns: "Abstract Building Factories Produce S 阅读全文
posted @ 2015-06-01 09:49 ChuckLu 阅读(291) 评论(0) 推荐(0) 编辑
摘要:http://www.codeproject.com/Articles/42415/Builder-Design-Pattern In Elizabeth's day care center, the teacher helps the kids to build all kinds of toys 阅读全文
posted @ 2015-05-27 19:44 ChuckLu 阅读(410) 评论(0) 推荐(0) 编辑
摘要:.net中的线程池ThreadPool还有和数据库交互的连接池,比如SQL Server Connection Pooling (ADO.NET)https://msdn.microsoft.com/en-us/library/8xx3tyca.aspxSQL Server Connection P... 阅读全文
posted @ 2015-05-17 09:40 ChuckLu 阅读(383) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示