装饰器设计模式 [英] Decorator Design Pattern

查看:83
本文介绍了装饰器设计模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我谁是此解决方案中第2个项目中真正的装饰设计模式

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


这篇关于装饰器设计模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆