随笔分类 -  设计模式

模式就是一种思维方式,是一种在实践中经过检验的行为方式。
摘要:/Files/nanshouyong326/c.rar 阅读全文
posted @ 2007-09-26 17:59 南守拥 阅读(403) 评论(0) 推荐(0)
摘要:Encapsulates what varies. Favor composition over inheritance. Program to interfaces, not implementation. Classes should be open for extension, but closed for modification. Depend upon abstractions. ... 阅读全文
posted @ 2007-07-17 16:02 南守拥 阅读(387) 评论(2) 推荐(0)
摘要:/Files/nanshouyong326/identityFinally.rar 阅读全文
posted @ 2007-05-18 17:28 南守拥 阅读(783) 评论(6) 推荐(0)
摘要:/Files/nanshouyong326/ProducerConsumerQuestion.rar 阅读全文
posted @ 2007-05-16 13:59 南守拥 阅读(287) 评论(0) 推荐(0)
摘要:/Files/nanshouyong326/EnumeratorComposite.rar 阅读全文
posted @ 2007-05-09 16:13 南守拥 阅读(221) 评论(0) 推荐(0)
摘要:我们知道在用ArrayList之类时,Net对系统已经写好的许多类型有排序支持,但只是在相同类型的前提下:如都是Int或都是String。如果混合会怎么呢?/Files/nanshouyong326/TemplateAndStrategyForSort.rar 阅读全文
posted @ 2007-04-27 12:11 南守拥 阅读(223) 评论(0) 推荐(0)
摘要:表结构: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Three]') and OBJECTPROPER... 阅读全文
posted @ 2007-04-26 00:01 南守拥 阅读(235) 评论(0) 推荐(0)
摘要:Clients should not be forced to depend on methods that they do not use. 阅读全文
posted @ 2007-02-05 12:46 南守拥 阅读(321) 评论(1) 推荐(0)
摘要:a.High-level modules should not depend on low-level modules.Both should depend on abstractions.b.Abstractions should not depend on details.Detils should depend on abstractions. 阅读全文
posted @ 2007-02-05 12:39 南守拥 阅读(287) 评论(1) 推荐(0)
摘要:Subtypes must be substitutable for their base types. 阅读全文
posted @ 2007-02-05 12:33 南守拥 阅读(310) 评论(0) 推荐(0)
摘要:Software entities (class,modules,functions,etc.) should be open for extension,but closed for modification."Open for extension.":This means that the behavior of the module can be extended.As the requir... 阅读全文
posted @ 2007-02-05 12:28 南守拥 阅读(266) 评论(1) 推荐(0)
摘要:A class should have only one reason to change. 阅读全文
posted @ 2007-02-05 12:16 南守拥 阅读(216) 评论(1) 推荐(0)
摘要:Regidity--The system is hard to change because every change forces many other changes to other parts of the system. Fragility--Changes cause the system to break in places that have no concept... 阅读全文
posted @ 2007-02-05 12:05 南守拥 阅读(204) 评论(1) 推荐(0)
摘要:ElementCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.Vi... 阅读全文
posted @ 2007-01-17 13:41 南守拥 阅读(511) 评论(0) 推荐(0)
摘要:AggregateCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.... 阅读全文
posted @ 2007-01-17 11:57 南守拥 阅读(502) 评论(1) 推荐(0)
摘要:ISimpleWriterCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.N... 阅读全文
posted @ 2007-01-15 16:06 南守拥 阅读(357) 评论(2) 推荐(0)
摘要:CommandCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.In... 阅读全文
posted @ 2007-01-12 18:25 南守拥 阅读(229) 评论(1) 推荐(0)
摘要:菜单命令 ShowCommandCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.W... 阅读全文
posted @ 2007-01-12 10:42 南守拥 阅读(258) 评论(0) 推荐(0)
摘要:产品类Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.Strate... 阅读全文
posted @ 2007-01-11 15:58 南守拥 阅读(354) 评论(0) 推荐(0)
摘要:语境: DoorCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace Gof.Test.State 4{ 5 public delegate void ChangeHandler(Do... 阅读全文
posted @ 2007-01-10 17:10 南守拥 阅读(278) 评论(0) 推荐(0)