﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Justin's Tech Blog-最新评论</title><link>http://www.cnblogs.com/justinw/CommentsRSS.aspx</link><description /><language>zh-cn</language><pubDate>Fri, 28 Oct 2011 19:32:36 GMT</pubDate><lastBuildDate>Fri, 28 Oct 2011 19:32:36 GMT</lastBuildDate><generator>cnblogs</generator><item><title>Re:[JavaScript]只需一行代码,轻松搞定快捷留言-V2升级版</title><link>http://www.cnblogs.com/justinw/archive/2011/10/19/1702763.html#2222713</link><dc:creator>王占华</dc:creator><author>王占华</author><pubDate>Wed, 19 Oct 2011 01:26:24 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/10/19/1702763.html#2222713</guid><description><![CDATA[有意思!<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">王占华</a> 2011-10-19 09:26 <a href="http://www.cnblogs.com/justinw/archive/2011/10/19/1702763.html#2222713#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]只需一行代码，轻松搞定快捷留言功能</title><link>http://www.cnblogs.com/justinw/archive/2011/10/11/1700190.html#2216924</link><dc:creator>大哥大</dc:creator><author>大哥大</author><pubDate>Tue, 11 Oct 2011 01:59:21 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/10/11/1700190.html#2216924</guid><description><![CDATA[@EriChen
<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">大哥大</a> 2011-10-11 09:59 <a href="http://www.cnblogs.com/justinw/archive/2011/10/11/1700190.html#2216924#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]ECMA-262-3 深入解析.第三章.this</title><link>http://www.cnblogs.com/justinw/archive/2011/09/30/1727295.html#2211285</link><dc:creator>skyaspnet</dc:creator><author>skyaspnet</author><pubDate>Thu, 29 Sep 2011 16:38:47 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/30/1727295.html#2211285</guid><description><![CDATA[@Justin
对于this，可以使用对象定义来替代，this用多了不是一件好事情，更直观的对象定义会更好些<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">skyaspnet</a> 2011-09-30 00:38 <a href="http://www.cnblogs.com/justinw/archive/2011/09/30/1727295.html#2211285#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:前端开发参考资源</title><link>http://www.cnblogs.com/justinw/archive/2011/09/26/1556321.html#2208415</link><dc:creator>我有我的骄傲</dc:creator><author>我有我的骄傲</author><pubDate>Mon, 26 Sep 2011 15:29:11 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/26/1556321.html#2208415</guid><description><![CDATA[@Justin
- -。链接没问题，是我机器貌似中了什么专门导致微软网站打不开的病毒，已经解决了。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">我有我的骄傲</a> 2011-09-26 23:29 <a href="http://www.cnblogs.com/justinw/archive/2011/09/26/1556321.html#2208415#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:前端开发参考资源</title><link>http://www.cnblogs.com/justinw/archive/2011/09/26/1556321.html#2208241</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Mon, 26 Sep 2011 11:01:05 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/26/1556321.html#2208241</guid><description><![CDATA[@我有我的骄傲
链接没问题吧<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-09-26 19:01 <a href="http://www.cnblogs.com/justinw/archive/2011/09/26/1556321.html#2208241#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:前端开发参考资源</title><link>http://www.cnblogs.com/justinw/archive/2011/09/19/1556321.html#2202210</link><dc:creator>我有我的骄傲</dc:creator><author>我有我的骄傲</author><pubDate>Mon, 19 Sep 2011 01:47:52 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/19/1556321.html#2202210</guid><description><![CDATA[第一个Msdn的挂了吗？？
昨天还看到。。不错的。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">我有我的骄傲</a> 2011-09-19 09:47 <a href="http://www.cnblogs.com/justinw/archive/2011/09/19/1556321.html#2202210#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:前端开发参考资源</title><link>http://www.cnblogs.com/justinw/archive/2011/09/17/1556321.html#2201402</link><dc:creator>我有我的骄傲</dc:creator><author>我有我的骄傲</author><pubDate>Sat, 17 Sep 2011 03:49:10 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/17/1556321.html#2201402</guid><description><![CDATA[感谢分享。。正在学习第一个 。。。。
—囧— 
好多啊 。。。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">我有我的骄傲</a> 2011-09-17 11:49 <a href="http://www.cnblogs.com/justinw/archive/2011/09/17/1556321.html#2201402#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:前端开发参考资源</title><link>http://www.cnblogs.com/justinw/archive/2011/09/16/1556321.html#2201206</link><dc:creator>木乃伊</dc:creator><author>木乃伊</author><pubDate>Fri, 16 Sep 2011 15:22:52 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/16/1556321.html#2201206</guid><description><![CDATA[哇，好多资源啊。好贴留名哦。。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">木乃伊</a> 2011-09-16 23:22 <a href="http://www.cnblogs.com/justinw/archive/2011/09/16/1556321.html#2201206#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]使用setTimeout减少多余事件</title><link>http://www.cnblogs.com/justinw/archive/2011/09/16/1619925.html#2200848</link><dc:creator>早起的菜鸟</dc:creator><author>早起的菜鸟</author><pubDate>Fri, 16 Sep 2011 07:10:34 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/16/1619925.html#2200848</guid><description><![CDATA[[quote]Justin：
[quote]早起的菜鸟：if (!!executionTimer)   等价  if (executionTimer) 吗？请教[/quote]
本质上，这二者是否相等是由数据类型来决定的，比如if(null)和if(!!null)的结果是完全不同的，而if(123)和if(!!123)的结果就是一样的，不过要小心，if(0)和if(!!0)效果跟if(123)和if(!!123)也是不同的。

在这段代码的场景里，因为executionTimer的数据类型是变化的，使用!!的方式可以写出非常优雅的代码，因为：最开始executionTimer的类型是null，所以!exec...[/quote]
哇 谢谢楼主的详细解惑！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">早起的菜鸟</a> 2011-09-16 15:10 <a href="http://www.cnblogs.com/justinw/archive/2011/09/16/1619925.html#2200848#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]使用setTimeout减少多余事件</title><link>http://www.cnblogs.com/justinw/archive/2011/09/16/1619925.html#2200701</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Fri, 16 Sep 2011 04:51:38 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/16/1619925.html#2200701</guid><description><![CDATA[[quote]早起的菜鸟：if (!!executionTimer)   等价  if (executionTimer) 吗？请教[/quote]
本质上，这二者是否相等是由数据类型来决定的，比如if(null)和if(!!null)的结果是完全不同的，而if(123)和if(!!123)的结果就是一样的，不过要小心，if(0)和if(!!0)效果跟if(123)和if(!!123)也是不同的。

在这段代码的场景里，因为executionTimer的数据类型是变化的，使用!!的方式可以写出非常优雅的代码，因为：最开始executionTimer的类型是null，所以!executionTimer是true，而!!executionTimer是false,所以第一次不会走到if (!!executionTimer) {}里，executionTimer = setTimeout()方法执行后，executionTimer的数据类型从此发生了改变，变成了number类型，所以!executionTimer 是false，而!!executionTimer就变成了true，保证此后程序逻辑永远都会走到if (!!executionTimer) {}里。

其实在这段代码的场景里写成 if (executionTimer)，因为最开始executionTimer为null，所以第一次也不会走到if (executionTimer) {}里，之后executionTimer变为数字类型以后，程序逻辑也永远都会走到if (!!executionTimer) {}里，实现效果是一样的。

不过，这两种写法我还是更喜欢if (!!executionTimer)，这样写比较明确，对于阅读这段代码者有提示作用，提高了代码的可维护性。感觉这种写法很优雅！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-09-16 12:51 <a href="http://www.cnblogs.com/justinw/archive/2011/09/16/1619925.html#2200701#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]使用setTimeout减少多余事件</title><link>http://www.cnblogs.com/justinw/archive/2011/09/15/1619925.html#2199866</link><dc:creator>早起的菜鸟</dc:creator><author>早起的菜鸟</author><pubDate>Thu, 15 Sep 2011 06:20:27 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/15/1619925.html#2199866</guid><description><![CDATA[if (!!executionTimer)   等价  if (executionTimer) 吗？请教<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">早起的菜鸟</a> 2011-09-15 14:20 <a href="http://www.cnblogs.com/justinw/archive/2011/09/15/1619925.html#2199866#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：开篇-模式和原则 [原]</title><link>http://www.cnblogs.com/justinw/archive/2011/09/13/574573.html#2198154</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Tue, 13 Sep 2011 07:39:07 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/13/574573.html#2198154</guid><description><![CDATA[@zwu
好久以前写的了，很高兴对你有帮助<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-09-13 15:39 <a href="http://www.cnblogs.com/justinw/archive/2011/09/13/574573.html#2198154#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：开篇-模式和原则 [原]</title><link>http://www.cnblogs.com/justinw/archive/2011/09/09/574573.html#2196075</link><dc:creator>zwu</dc:creator><author>zwu</author><pubDate>Fri, 09 Sep 2011 02:47:02 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/09/574573.html#2196075</guid><description><![CDATA[ 讲得太好了，我正迷惑设计模式呢。很有收获，收藏了。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">zwu</a> 2011-09-09 10:47 <a href="http://www.cnblogs.com/justinw/archive/2011/09/09/574573.html#2196075#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]Javascript的一种模块模式</title><link>http://www.cnblogs.com/justinw/archive/2011/09/07/1821159.html#2194177</link><dc:creator>SuperSaiyan</dc:creator><author>SuperSaiyan</author><pubDate>Tue, 06 Sep 2011 16:20:59 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/07/1821159.html#2194177</guid><description><![CDATA[我也用yui,asp.net,设计模式，但是我不研究这些，我只是用，我觉得够用就行，而且，就够用而言，没什么难的。

相对而言，我比较关注的有，software factory, 数据库有关的东西，我觉得，数据库关系到一个大型网站的生死存亡，所以非常的重要。里面的变化和曲折很多，有嚼头。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">SuperSaiyan</a> 2011-09-07 00:20 <a href="http://www.cnblogs.com/justinw/archive/2011/09/07/1821159.html#2194177#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]ECMA-262-3 深入解析.第三章.this</title><link>http://www.cnblogs.com/justinw/archive/2011/09/01/1727295.html#2190947</link><dc:creator>EricW</dc:creator><author>EricW</author><pubDate>Thu, 01 Sep 2011 14:47:43 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/01/1727295.html#2190947</guid><description><![CDATA[function a() {
  var b = 10;
  function c() {
    alert(this);
  }
  c();
  alert(b);
}

a();
楼主能不能给分析下这种情况下:
激活对象总是作为this的值返回——null（即伪代码AO.bar()相当于null.bar()）。(译者注：不明白参考这里)这里我们再次回到上面描述的情况，this的值最终还是被设置为全局对象。
按照第2章说的VO===AO, 变量b同样也是AO的一个属性,那么同理(即为代码AO.b相当于null.b),那么null的情况就变成了全局对象了,那么全局对象并没有b这个属性为什么可以alert出正确的值呢.<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">EricW</a> 2011-09-01 22:47 <a href="http://www.cnblogs.com/justinw/archive/2011/09/01/1727295.html#2190947#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[职业生涯]你和你的工作</title><link>http://www.cnblogs.com/justinw/archive/2011/09/01/1870050.html#2190374</link><dc:creator>我有我的骄傲</dc:creator><author>我有我的骄傲</author><pubDate>Thu, 01 Sep 2011 02:54:34 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/01/1870050.html#2190374</guid><description><![CDATA[@Justin
觉得吧，环境只是一个因素，关键还是要自觉。这也许是我无能的借口！！当我具备选择环境的实力的时候再说吧- -。也许。我来改变环境？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">我有我的骄傲</a> 2011-09-01 10:54 <a href="http://www.cnblogs.com/justinw/archive/2011/09/01/1870050.html#2190374#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[职业生涯]你和你的工作</title><link>http://www.cnblogs.com/justinw/archive/2011/09/01/1870050.html#2190337</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Thu, 01 Sep 2011 02:22:37 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/09/01/1870050.html#2190337</guid><description><![CDATA[@我有我的骄傲
如果无法改变自己去适应环境，就改变环境来适应自己吧<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-09-01 10:22 <a href="http://www.cnblogs.com/justinw/archive/2011/09/01/1870050.html#2190337#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[职业生涯]你和你的工作</title><link>http://www.cnblogs.com/justinw/archive/2011/08/30/1870050.html#2189050</link><dc:creator>我有我的骄傲</dc:creator><author>我有我的骄傲</author><pubDate>Tue, 30 Aug 2011 09:25:17 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/08/30/1870050.html#2189050</guid><description><![CDATA[[quote]•如果你没有和哪些和你一样在团队工作和协作方面投入相应的思考和精力的人一起工作 – leave 并去寻找这些人[/quote]
对于这个，求解该如何去做。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">我有我的骄傲</a> 2011-08-30 17:25 <a href="http://www.cnblogs.com/justinw/archive/2011/08/30/1870050.html#2189050#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[Share]商务web应用程序的界面设计</title><link>http://www.cnblogs.com/justinw/archive/2011/08/01/1831038.html#2166154</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Mon, 01 Aug 2011 11:22:29 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/08/01/1831038.html#2166154</guid><description><![CDATA[[quote]华夏之章：图都看不到啊~~[/quote]
看原文吧<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-08-01 19:22 <a href="http://www.cnblogs.com/justinw/archive/2011/08/01/1831038.html#2166154#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[Share]商务web应用程序的界面设计</title><link>http://www.cnblogs.com/justinw/archive/2011/07/31/1831038.html#2165172</link><dc:creator>华夏之章</dc:creator><author>华夏之章</author><pubDate>Sun, 31 Jul 2011 03:09:41 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/07/31/1831038.html#2165172</guid><description><![CDATA[图都看不到啊~~<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">华夏之章</a> 2011-07-31 11:09 <a href="http://www.cnblogs.com/justinw/archive/2011/07/31/1831038.html#2165172#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]技术文化和惨淡命运 — 怀念中国雅虎</title><link>http://www.cnblogs.com/justinw/archive/2011/07/25/1870029.html#2159916</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Mon, 25 Jul 2011 03:40:53 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/07/25/1870029.html#2159916</guid><description><![CDATA[[quote]argb：为什么不保留原文地址呢？[/quote]
应该是忘记了，标题和评论里都已经说明是转的了。
如果想看原文，随便百度一下就能找到<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-07-25 11:40 <a href="http://www.cnblogs.com/justinw/archive/2011/07/25/1870029.html#2159916#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]技术文化和惨淡命运 — 怀念中国雅虎</title><link>http://www.cnblogs.com/justinw/archive/2011/07/24/1870029.html#2159254</link><dc:creator>argb</dc:creator><author>argb</author><pubDate>Sun, 24 Jul 2011 07:23:06 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/07/24/1870029.html#2159254</guid><description><![CDATA[为什么不保留原文地址呢？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">argb</a> 2011-07-24 15:23 <a href="http://www.cnblogs.com/justinw/archive/2011/07/24/1870029.html#2159254#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[职业生涯]美到极致是疯狂</title><link>http://www.cnblogs.com/justinw/archive/2011/07/10/1886227.html#2147247</link><dc:creator>v5koma</dc:creator><author>v5koma</author><pubDate>Sun, 10 Jul 2011 04:43:45 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/07/10/1886227.html#2147247</guid><description><![CDATA[我喜欢.net啊，呵呵。可以看看这方面的，加深下内功。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">v5koma</a> 2011-07-10 12:43 <a href="http://www.cnblogs.com/justinw/archive/2011/07/10/1886227.html#2147247#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]在VS里支持js源代码简单折叠</title><link>http://www.cnblogs.com/justinw/archive/2011/06/11/1753717.html#2122632</link><dc:creator>wolf111</dc:creator><author>wolf111</author><pubDate>Sat, 11 Jun 2011 01:44:27 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/06/11/1753717.html#2122632</guid><description><![CDATA[不错<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">wolf111</a> 2011-06-11 09:44 <a href="http://www.cnblogs.com/justinw/archive/2011/06/11/1753717.html#2122632#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[jQuery]Great Ways to Learn jQuery</title><link>http://www.cnblogs.com/justinw/archive/2011/06/09/1773349.html#2121149</link><dc:creator>heronote</dc:creator><author>heronote</author><pubDate>Thu, 09 Jun 2011 06:50:09 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/06/09/1773349.html#2121149</guid><description><![CDATA[Free jQuery &amp; jQuery UI eBook:
&lt;a href=&quot;http://www.heronote.com/files/jQuery.htm&quot;&gt;http://www.heronote.com/files/jQuery.htm&lt;/a&gt;<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">heronote</a> 2011-06-09 14:50 <a href="http://www.cnblogs.com/justinw/archive/2011/06/09/1773349.html#2121149#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[jQuery]Great Ways to Learn jQuery</title><link>http://www.cnblogs.com/justinw/archive/2011/06/09/1773349.html#2121148</link><dc:creator>heronote</dc:creator><author>heronote</author><pubDate>Thu, 09 Jun 2011 06:49:46 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/06/09/1773349.html#2121148</guid><description><![CDATA[Free jQuery &amp; jQuery UI eBook:
http://www.heronote.com/files/jQuery.htm<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">heronote</a> 2011-06-09 14:49 <a href="http://www.cnblogs.com/justinw/archive/2011/06/09/1773349.html#2121148#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：开篇-模式和原则 [原]</title><link>http://www.cnblogs.com/justinw/archive/2011/05/31/574573.html#2111009</link><dc:creator>薄鹰</dc:creator><author>薄鹰</author><pubDate>Tue, 31 May 2011 03:36:14 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/05/31/574573.html#2111009</guid><description><![CDATA[正在学习中。。。，作者很长时间没有添加这个系列了。。。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">薄鹰</a> 2011-05-31 11:36 <a href="http://www.cnblogs.com/justinw/archive/2011/05/31/574573.html#2111009#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:几则经典的故事[转]</title><link>http://www.cnblogs.com/justinw/archive/2011/05/23/607498.html#2103845</link><dc:creator>popzhou</dc:creator><author>popzhou</author><pubDate>Mon, 23 May 2011 04:21:36 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/05/23/607498.html#2103845</guid><description><![CDATA[收藏了~
<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">popzhou</a> 2011-05-23 12:21 <a href="http://www.cnblogs.com/justinw/archive/2011/05/23/607498.html#2103845#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：鸭子-策略模式（Strategy）[原]</title><link>http://www.cnblogs.com/justinw/archive/2011/05/21/641414.html#2102726</link><dc:creator>chenliang0904</dc:creator><author>chenliang0904</author><pubDate>Sat, 21 May 2011 07:06:58 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/05/21/641414.html#2102726</guid><description><![CDATA[看了楼主的解释，受益匪浅。
也阅读了楼主的代码，不过心中有些疑问，看看是否值得讨论一下：
Duck类中声明了
 protected IFlyBehavior flyBehavior;
 protected IQuackBehavior quackBehavior;
是否应该考虑赋予默认值，即提供默认行为。假设新增一种行为walk，在修改Duck时追加声明IWalkBehavior walkBehavior, 并提供对应的performWalk方法。如果未提供默认行为，而且旧的Duck的子类未及时修改构造函数，同时又错误地调用了performWalk方法，会否出现异常，类似于Java的NullPointException。

另外关于Setter注入的方式，是否有这样的可能性，客户端实例已经生成，而后被恶意重新注入别的策略类实例，因为setter毕竟是公开的。我在考虑如果使用构造器注入的方式，是否能杜绝此类恶意破坏。不过构造器注入的方式，当有新增新行为时，也就需要提供新的构造器，如果新增新行为的可能性比较大，貌似也是件麻烦事。（不过可以考虑使用Builder来代替各种构造器）。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">chenliang0904</a> 2011-05-21 15:06 <a href="http://www.cnblogs.com/justinw/archive/2011/05/21/641414.html#2102726#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：来杯咖啡-装饰者模式（Decorator）[原] </title><link>http://www.cnblogs.com/justinw/archive/2011/05/06/779356.html#2088396</link><dc:creator>erduo</dc:creator><author>erduo</author><pubDate>Fri, 06 May 2011 04:18:04 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/05/06/779356.html#2088396</guid><description><![CDATA[很不错呀，谢谢！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">erduo</a> 2011-05-06 12:18 <a href="http://www.cnblogs.com/justinw/archive/2011/05/06/779356.html#2088396#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：来杯咖啡-装饰者模式（Decorator）[原] </title><link>http://www.cnblogs.com/justinw/archive/2011/05/01/779356.html#2084341</link><dc:creator>Lieo</dc:creator><author>Lieo</author><pubDate>Sun, 01 May 2011 10:03:54 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/05/01/779356.html#2084341</guid><description><![CDATA[写得不错，就是太啰嗦了，希望楼主下次改进<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Lieo</a> 2011-05-01 18:03 <a href="http://www.cnblogs.com/justinw/archive/2011/05/01/779356.html#2084341#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]ECMA-262-3 深入解析.第三章.this</title><link>http://www.cnblogs.com/justinw/archive/2011/04/26/1727295.html#2079937</link><dc:creator>winting</dc:creator><author>winting</author><pubDate>Tue, 26 Apr 2011 00:49:32 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/04/26/1727295.html#2079937</guid><description><![CDATA[(foo.bar)();
为什么是引用类型值的base : foo.
我一直看不懂?<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">winting</a> 2011-04-26 08:49 <a href="http://www.cnblogs.com/justinw/archive/2011/04/26/1727295.html#2079937#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]在VS里支持js源代码简单折叠</title><link>http://www.cnblogs.com/justinw/archive/2011/04/12/1753717.html#2068567</link><dc:creator>lhking</dc:creator><author>lhking</author><pubDate>Tue, 12 Apr 2011 05:44:58 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/04/12/1753717.html#2068567</guid><description><![CDATA[不错
<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">lhking</a> 2011-04-12 13:44 <a href="http://www.cnblogs.com/justinw/archive/2011/04/12/1753717.html#2068567#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：开篇-模式和原则 [原]</title><link>http://www.cnblogs.com/justinw/archive/2011/04/07/574573.html#2063679</link><dc:creator>会长</dc:creator><author>会长</author><pubDate>Thu, 07 Apr 2011 01:08:47 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/04/07/574573.html#2063679</guid><description><![CDATA[@dodo_bear
挺好的。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">会长</a> 2011-04-07 09:08 <a href="http://www.cnblogs.com/justinw/archive/2011/04/07/574573.html#2063679#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：开篇-模式和原则 [原]</title><link>http://www.cnblogs.com/justinw/archive/2011/04/06/574573.html#2062820</link><dc:creator>Justin</dc:creator><author>Justin</author><pubDate>Wed, 06 Apr 2011 02:45:32 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/04/06/574573.html#2062820</guid><description><![CDATA[[quote]dodo_bear：
@会长
UML与模式应用，怎么样？[/quote]

非常好！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Justin</a> 2011-04-06 10:45 <a href="http://www.cnblogs.com/justinw/archive/2011/04/06/574573.html#2062820#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：开篇-模式和原则 [原]</title><link>http://www.cnblogs.com/justinw/archive/2011/04/05/574573.html#2062433</link><dc:creator>dodo_bear</dc:creator><author>dodo_bear</author><pubDate>Tue, 05 Apr 2011 11:36:46 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/04/05/574573.html#2062433</guid><description><![CDATA[@会长
UML与模式应用，怎么样？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">dodo_bear</a> 2011-04-05 19:36 <a href="http://www.cnblogs.com/justinw/archive/2011/04/05/574573.html#2062433#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[JavaScript]在VS里支持js源代码简单折叠</title><link>http://www.cnblogs.com/justinw/archive/2011/03/23/1753717.html#2052866</link><dc:creator>Mort_1990</dc:creator><author>Mort_1990</author><pubDate>Wed, 23 Mar 2011 08:16:21 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/03/23/1753717.html#2052866</guid><description><![CDATA[好东西。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">Mort_1990</a> 2011-03-23 16:16 <a href="http://www.cnblogs.com/justinw/archive/2011/03/23/1753717.html#2052866#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[jQuery]10 Pretty Useful and Cool jQuery Plugins</title><link>http://www.cnblogs.com/justinw/archive/2011/03/09/1755123.html#2042973</link><dc:creator>kush kalwani</dc:creator><author>kush kalwani</author><pubDate>Wed, 09 Mar 2011 15:36:47 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/03/09/1755123.html#2042973</guid><description><![CDATA[superb info :))<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">kush kalwani</a> 2011-03-09 23:36 <a href="http://www.cnblogs.com/justinw/archive/2011/03/09/1755123.html#2042973#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[jQuery]50 Useful JavaScript and jQuery Techniques and Plugins</title><link>http://www.cnblogs.com/justinw/archive/2011/03/09/1781733.html#2042956</link><dc:creator>kush kalwani</dc:creator><author>kush kalwani</author><pubDate>Wed, 09 Mar 2011 15:13:39 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/03/09/1781733.html#2042956</guid><description><![CDATA[hey... thanks 4 teaching me some awesome jQuery techniques<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">kush kalwani</a> 2011-03-09 23:13 <a href="http://www.cnblogs.com/justinw/archive/2011/03/09/1781733.html#2042956#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:设计模式随笔系列：气象站的故事-观察者模式（Observer）[原] </title><link>http://www.cnblogs.com/justinw/archive/2011/03/07/734522.html#2040402</link><dc:creator>arvid</dc:creator><author>arvid</author><pubDate>Mon, 07 Mar 2011 06:59:35 GMT</pubDate><guid>http://www.cnblogs.com/justinw/archive/2011/03/07/734522.html#2040402</guid><description><![CDATA[@SARA520
观察者一般只用推模式。 为什么这样， 这个是因为类的设计精炼性和功能单一性做前提的。 气象站只提供气象信息。 那么不同的观察者只取他感兴趣的部分，这个没有问题， 比如只要气压信息的， 和只要温度信息的。你只需要多添加监听。 LZ这里只是举例， 所以把所有信息打包了。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/justinw/" target="_blank">arvid</a> 2011-03-07 14:59 <a href="http://www.cnblogs.com/justinw/archive/2011/03/07/734522.html#2040402#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>
