装饰器设计模式
问题描述:
Please Tell Me who is the true decorator design pattern from the 2 project in this solution Decorator Design Pattern.zip and why ?
thanks in advance.
答
目前,出于对SOPA和PIPA法案的回应,Wikipedia的停电原因非常充分.请参阅:
http://en.wikipedia.org/wiki/Main_Page [ http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more [ ^ ].
即将推出.希望将来和互联网自由一样好.当Wikipedia恢复操作时,找到有关此设计模式的文章,然后请自己分析代码.有关该主题的Wikipedia文章非常清晰.
我还要强调一点,就是某些设计是否准确地匹配称为装饰器设计模式"的设计,这并不是很重要.更重要的是设计本身; 是否足以满足软件项目的最终目标.
设计模式应该用来促进良好的设计,而不是设计可以服务于设计模式.这样,您的问题就不会那么重要,因为它无助于解决任何实际问题.真正的问题是:某些设计是否适合某些通用或特定用途.—SA
Wikipedia is on a blackout for a really good reason at this moment, in response to SOPA and PIPA bills. Please see:
http://en.wikipedia.org/wiki/Main_Page[^],
http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more[^].
It will be available soon. Hope it will be fine in future as well as Internet freedom. When Wikipedia resumes the operation, find an article on this design pattern and please analyze you code by yourself. The Wikipedia article on this topic is crystal clear.
I also would like to emphasize that it is not so important if some design matches something which is called "Decorator Design Pattern" precisely or not. What''s more important is the design itself; is it adequate to the ultimate goals of your software project or not.
Design Pattens are supposed to serve for promoting good designs, not that designs serve Design Patterns. In this way, your question cannot be so important, as it does not help to address any practical issue. The real question would be: is some design good for some general or particular purpose or not.—SA