一个关于我们生活点滴的网站,一个记录我们酸甜苦辣的日志。
网上看到一篇很好的介绍Bridge模式的文章,分享给大家。
蜡笔与毛笔的故事:http://www.cnblogs.com/zhenyulu/articles/67016.html
蜡笔12种颜色,三类笔,共3×12=36
毛笔12种颜色,三类笔,共3+12=15
通过Bridge模式,我们把乘法运算3×12=36改为了加法运算3+12=15。
作者通过蜡笔盒毛笔的例子,通俗的介绍了Bridge模式的好处之一。
Name (*)
E-mail (*)
URI
京ICP备07034349
Copyright © 2008 - 权记. Adsense In The City Designed By Vacation Rentals And QuanLei.com Brought by Wordpress Themes
Entries (RSS) | Comments (RSS).
Leave a reply