﻿<?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>语源科技BlogJava-www.alphatom.com</title><link>http://www.blogjava.net/idior/</link><description /><language>zh-cn</language><lastBuildDate>Sun, 03 May 2026 08:12:55 GMT</lastBuildDate><pubDate>Sun, 03 May 2026 08:12:55 GMT</pubDate><ttl>60</ttl><item><title>重构－－－Who are you?! </title><link>http://www.blogjava.net/idior/archive/2006/02/06/29683.html</link><dc:creator>idior</dc:creator><author>idior</author><pubDate>Mon, 06 Feb 2006 04:31:00 GMT</pubDate><guid>http://www.blogjava.net/idior/archive/2006/02/06/29683.html</guid><wfw:comment>http://www.blogjava.net/idior/comments/29683.html</wfw:comment><comments>http://www.blogjava.net/idior/archive/2006/02/06/29683.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/idior/comments/commentRss/29683.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/idior/services/trackbacks/29683.html</trackback:ping><description><![CDATA[不要当你需要新的功能的时候，或者原来的程序出了Bug，你才想起重构。<BR><BR>《重构》那本书你看过了吗？它写的是什么？那本书的价值何在？介绍重构这门技术？告诉你为什么重构？错！那本书的价值就在于它把应该引起重构的Bad Smell一一列了出来，并给出了该如何重构解决这些Bad Smell的意见，不然那本书看一遍就可以扔了！<BR><BR>你知道什么是面向对象吗？接口！ 你知道什么是TDD吗？重构！<BR><BR><A href="http://www.cnblogs.com/idior/archive/2006/02/05/325809.html">详细内容</A><img src ="http://www.blogjava.net/idior/aggbug/29683.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/idior/" target="_blank">idior</a> 2006-02-06 12:31 <a href="http://www.blogjava.net/idior/archive/2006/02/06/29683.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Enterprise Test Driven Develop </title><link>http://www.blogjava.net/idior/archive/2005/08/09/9654.html</link><dc:creator>idior</dc:creator><author>idior</author><pubDate>Tue, 09 Aug 2005 06:00:00 GMT</pubDate><guid>http://www.blogjava.net/idior/archive/2005/08/09/9654.html</guid><wfw:comment>http://www.blogjava.net/idior/comments/9654.html</wfw:comment><comments>http://www.blogjava.net/idior/archive/2005/08/09/9654.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/idior/comments/commentRss/9654.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/idior/services/trackbacks/9654.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TDD<SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个概念出现至少也有两年多了</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在大家刚接触它时候</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">几乎没人不拍手鼓掌</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">测试驱动的概念确实可以为我们带来很多的好处</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">泡泡在前不久写了一篇很不错的</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的文章</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可是我还是忍不住在他的评论中说到这篇文章有点</SPAN><SPAN lang=EN-US>”</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">老</SPAN><SPAN lang=EN-US>”. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">确实</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">同样的概念在书中</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在大家的口中已经被说烂了</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但是</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">真正给我们带来什么呢</SPAN><SPAN lang=EN-US>? </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有多少人在用</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">呢</SPAN><SPAN lang=EN-US>? </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为什么这么好的技术到了应用中就被人们</SPAN><SPAN lang=EN-US>”</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抛弃</SPAN><SPAN lang=EN-US>”</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了呢</SPAN><SPAN lang=EN-US>? </SPAN>
<P class=MsoNormal><SPAN lang=EN-US>(</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注</SPAN><SPAN lang=EN-US>: Design Pattern</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">面世都十几年了</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现在还是有不少好书在介绍它</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所以</SPAN><SPAN lang=EN-US>”</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">老</SPAN><SPAN lang=EN-US>”</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不代表不好</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><A href="http://briansun.cnblogs.com/archive/2005/07/31/203896.html"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">泡泡的总结</SPAN></A>在园子里还是最好的一篇</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文章</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">特别建议刚接触</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的参考之</SPAN><SPAN lang=EN-US>.)<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TDD<SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的应用</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是阻挠</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">发展的重要原因</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">回想一下有关</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">书中举的那些例子</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">再想想你学习了解</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自己又做了哪些应用</SPAN><SPAN lang=EN-US>? --- </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类库</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最基本的几个类之间协作</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不涉及数据库</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不涉及</SPAN><SPAN lang=EN-US>UI,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不涉及企业服务</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这样看来</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最适用的场合就是不涉及复杂应用的类库</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">比如一个保龄球游戏</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个</SPAN><SPAN lang=EN-US>Money</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">兑换系统</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果是这样那</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自然没有人用了</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">真正的项目有几个不涉及负责应用呢</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有几个不和数据库</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">界面打交道</SPAN><SPAN lang=EN-US>? </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可是一旦你想将</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用于此时</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你就会发现烦不胜烦</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">无从下手</SPAN><SPAN lang=EN-US>.</SPAN> </P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">难道</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">真得这么不堪一击</SPAN><SPAN lang=EN-US>?...&nbsp; <A href="http://www.cnblogs.com/idior/archive/2005/08/09/210320.html">详细内容</A><BR><BR></P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FIELDSET style="WIDTH: 538px; HEIGHT: 117px"><LEGEND style="WIDTH: 180px; HEIGHT: 19px">Something&nbsp;you should know</LEGEND>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不要去测试类中的每个方法</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要测试这个类对外所能提供的功能</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这些功能可能是其中的几个重要方法</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可能需要类中的几个方法协作</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">记住一点</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US>TDD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中测试代码也是文档的一部分</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你应该通过你的测试代码告诉别人如何使用这个类</SPAN><SPAN lang=EN-US>.</SPAN></P></FIELDSET></SPAN></SPAN></SPAN> <img src ="http://www.blogjava.net/idior/aggbug/9654.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/idior/" target="_blank">idior</a> 2005-08-09 14:00 <a href="http://www.blogjava.net/idior/archive/2005/08/09/9654.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Generics to Eliminate Casting ? </title><link>http://www.blogjava.net/idior/archive/2005/08/01/8945.html</link><dc:creator>idior</dc:creator><author>idior</author><pubDate>Mon, 01 Aug 2005 10:05:00 GMT</pubDate><guid>http://www.blogjava.net/idior/archive/2005/08/01/8945.html</guid><wfw:comment>http://www.blogjava.net/idior/comments/8945.html</wfw:comment><comments>http://www.blogjava.net/idior/archive/2005/08/01/8945.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/idior/comments/commentRss/8945.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/idior/services/trackbacks/8945.html</trackback:ping><description><![CDATA[<P><A href="http://idior.cnblogs.com/archive/2005/08/01/204801.html">详细内容</A></P><img src ="http://www.blogjava.net/idior/aggbug/8945.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/idior/" target="_blank">idior</a> 2005-08-01 18:05 <a href="http://www.blogjava.net/idior/archive/2005/08/01/8945.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Enterprise Persistence Design</title><link>http://www.blogjava.net/idior/archive/2005/07/18/7919.html</link><dc:creator>idior</dc:creator><author>idior</author><pubDate>Mon, 18 Jul 2005 08:46:00 GMT</pubDate><guid>http://www.blogjava.net/idior/archive/2005/07/18/7919.html</guid><wfw:comment>http://www.blogjava.net/idior/comments/7919.html</wfw:comment><comments>http://www.blogjava.net/idior/archive/2005/07/18/7919.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/idior/comments/commentRss/7919.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/idior/services/trackbacks/7919.html</trackback:ping><description><![CDATA[<DIV class=postbody><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在前不久发布的</SPAN><SPAN lang=EN-US><A href="http://idior.cnblogs.com/archive/2005/07/15/193769.html">”<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><SPAN lang=EN-US>质疑国内</SPAN></SPAN>.Net<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><SPAN lang=EN-US>社区</SPAN></SPAN>”</A></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的随笔中</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我个人算是对社区的力量抱怨了一把</SPAN><SPAN lang=EN-US>. </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面该有些实际行动来推动社区的发展</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其实在写那篇随笔的时候正在总结一些心得</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现在我把它发表出来供大家讨论</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也算是带个好头</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">希望能起到抛砖引玉的作用</SPAN><SPAN lang=EN-US>.</SPAN> 
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在阅读此文之前推荐阅读</SPAN><SPAN lang=EN-US><A href="http://www.cnblogs.com/idior/archive/2005/07/04/186086.html">O/R Mapping <SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><SPAN lang=EN-US>基本概念</SPAN></SPAN></A>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在基本概念上达成共识</SPAN><SPAN lang=EN-US>.</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>&nbsp;&nbsp;&nbsp; <A href="http://idior.cnblogs.com/articles/195193.html">Enterprise Persistence Design</A></SPAN></P></DIV>
<P>&nbsp;</P><img src ="http://www.blogjava.net/idior/aggbug/7919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/idior/" target="_blank">idior</a> 2005-07-18 16:46 <a href="http://www.blogjava.net/idior/archive/2005/07/18/7919.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>多态? 你的理解是什么?</title><link>http://www.blogjava.net/idior/archive/2005/04/09/3040.html</link><dc:creator>idior</dc:creator><author>idior</author><pubDate>Sat, 09 Apr 2005 08:13:00 GMT</pubDate><guid>http://www.blogjava.net/idior/archive/2005/04/09/3040.html</guid><wfw:comment>http://www.blogjava.net/idior/comments/3040.html</wfw:comment><comments>http://www.blogjava.net/idior/archive/2005/04/09/3040.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/idior/comments/commentRss/3040.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/idior/services/trackbacks/3040.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">在博客园我曾经发过这么一个随笔,<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">得到不少的相应<SPAN lang=EN-US>,<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">同样</SPAN></SPAN></SPAN>希望能听到java朋友们的高见 <IMG height=19 src="http://www.blogjava.net/Emoticons/shades_smile.gif" width=19 border=0><BR><BR>wayfarer</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">在<SPAN lang=EN-US><A href="http://www.cnblogs.com/wayfarer/archive/2005/03/05/113410.html"><SPAN lang=EN-US><SPAN lang=EN-US>他的随笔</SPAN></SPAN></A></SPAN>中谈到了面试别人时的一个问题<SPAN lang=EN-US>. </SPAN>你是如何理解多态的<SPAN lang=EN-US>. <BR><BR></SPAN>我想每个人的理解都不同<SPAN lang=EN-US>,</SPAN>那么我们就来集思广义吧<SPAN lang=EN-US>. <BR></SPAN>你可以从概念层 实现层<SPAN lang=EN-US>,</SPAN>各个层面谈谈你对它的理解<SPAN lang=EN-US>.</SPAN>角度越多<SPAN lang=EN-US>,</SPAN>越能加深我们对它的理解<SPAN lang=EN-US>. <BR><BR></SPAN>不过有个小要求<SPAN lang=EN-US>,</SPAN>就是用一两句话把你的意思表达出来<SPAN lang=EN-US>.</SPAN>越是精练的语言<SPAN lang=EN-US>,</SPAN>越能反应问题的实质<SPAN lang=EN-US>. <BR></SPAN>我们不要求全面但是要有内容<SPAN lang=EN-US>.</SPAN>比如<SPAN lang=EN-US>sumtec</SPAN>的面向对象就是面向接口<SPAN lang=EN-US>. <BR><BR></SPAN>不过这里不要求一定是自己的见解<SPAN lang=EN-US>,</SPAN>也可以是别的大家的看法<SPAN lang=EN-US>. <BR></SPAN>毕竟我们的目的是理解多态<SPAN lang=EN-US>! <BR><BR></SPAN>我先抛砖引玉<SPAN lang=EN-US>: <BR></SPAN>多态就是实现将接口<SPAN lang=EN-US>(</SPAN>不特指关键字<SPAN lang=EN-US>interface)</SPAN>与实现分离的技术<SPAN lang=EN-US>. <BR><BR></SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><BR></SPAN><B><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">评论<SPAN lang=EN-US>:</SPAN></SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114087">#</A>&nbsp;<A name=114087></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-06 23:38 | <A href="http://www.cnblogs.com/jm_tek" target=_blank>alittlefish</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在实际操作中，多态可以让我不用关心某个对象到底是什么具体类型，就可以使用该对象的某些方法，而这些方法通过一个抽象类或者接口来实现。<SPAN lang=EN-US> <BR></SPAN>从下往上看的话，多态实际上是多个对象的抽象，对它们进行通用编码。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl0$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114131">#</A>&nbsp;<A name=114131></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 08:41 | <A href="http://www.cnblogs.com/zhumi" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>一切从.NET</SPAN></SPAN><SPAN lang=EN-US><SPAN lang=EN-US>开始</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">没有多态，工厂方法模式的效果就大打折扣，或者可以说不可能实现 ：）<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl1$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114132">#</A>&nbsp;<A name=114132></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 08:47 | <A href="http://www.cnblogs.com/mancini" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>小诈</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">对于相同的事件（不指一般我们说的那些事件），不同的对象表现出不同的行为（特征）。<SPAN lang=EN-US> <BR><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl2$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114162">#</A>&nbsp;<A name=114162></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 09:22 | KingofSC<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态给我的感觉就是提供父类调用子类代码的一个手段而已<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl3$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114170">#</A>&nbsp;<A name=114170></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 09:29 | idior<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">很好，继续，希望看到更多更新的观点。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl4$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114189">#</A>&nbsp;<A name=114189></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 10:08 | age0<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">继承的目的是复用，继承复用包括两方面的复用：抽象（接口）复用，实现（过程）复用。<SPAN lang=EN-US> <BR><BR></SPAN>多态的目的就是要将抽象复用及实现复用剥离开来，子类虽然拥有和父类一样的抽象接口，但实现过程却未必一样，多态的引入就是要在继承的基础上实现变异的可能性。当然子类继承也不一定会产生实现差异，所以多态允许在产生差异的时候<SPAN lang=EN-US>override</SPAN>父类接口，没有产生差异的时候直接继承。<SPAN lang=EN-US> <BR><BR>interface</SPAN>则是另一种复用方式，<SPAN lang=EN-US>interface</SPAN>只允许抽象复用，而禁止实现复用，所以<SPAN lang=EN-US>interface</SPAN>比继承显得更轻量，但实际上系统中的实现复用必须由其他机制来保证。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl5$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114195">#</A>&nbsp;<A name=114195></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 10:15 | age0<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">To idior</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">，想用一两句话来解释清楚一个深奥的概念是不是有点不切实际。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl6$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114231">#</A>&nbsp;<A name=114231></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 10:53 | rIPPER<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">一时 找不到<SPAN lang=EN-US>sun </SPAN>的<SPAN lang=EN-US> oo-226</SPAN>课程了，里面应该有比较简单明确的定义<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl7$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114240">#</A>&nbsp;<A name=114240></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 10:59 | sysword<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我的理解，一个问题一般会表现在多个层面上，各个层面上抽象程度不同，多态正是思考问题过程中跨越各层的桥梁。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl8$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114248">#</A>&nbsp;<A name=114248></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 11:09 | <A href="http://www.cnblogs.com/dudu" target=_blank>dudu</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我觉得多态是在对象的基础上更高级的抽象<SPAN lang=EN-US>, </SPAN>它描述了一组具有共性的对象。<SPAN lang=EN-US> <BR>Allen Lee</SPAN>的《今天你多态了吗<SPAN lang=EN-US>?</SPAN>》值得一读<SPAN lang=EN-US>: <A href="http://www.cnblogs.com/allenlooplee/archive/2004/11/02/59519.html" target=_new>http://www.cnblogs.com/allenlooplee/archive/2004/11/02/59519.html</A><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl9$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114308">#</A>&nbsp;<A name=114308></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 12:38 | <A href="http://www.cnblogs.com/lifework" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>生活、工作</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">运行时，才明确具体是指那个对象，这给<SPAN lang=EN-US>client</SPAN>代码，带来了很大的灵活性。使依赖注入、针对抽象与接口编程、同一行代码操作不同类的对象<SPAN lang=EN-US>(</SPAN>用接口<SPAN lang=EN-US>)</SPAN>等等成为可能。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl10$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114322">#</A>&nbsp;<A name=114322></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 12:50 | idior<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我比较喜欢<SPAN lang=EN-US> “</SPAN>生活、工作<SPAN lang=EN-US>”</SPAN>的描述<SPAN lang=EN-US> <BR>◎age0 <BR></SPAN>如果概念解释是很难用一两句话说清。<SPAN lang=EN-US> <BR></SPAN>但是就像<SPAN lang=EN-US>“</SPAN>生活、工作<SPAN lang=EN-US>”</SPAN>这样的描述就能有意义。<SPAN lang=EN-US> <BR><BR><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl11$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114543">#</A>&nbsp;<A name=114543></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 17:43 | </SPAN>班门弄斧<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态是多个对象<SPAN lang=EN-US>UpCast</SPAN>的过程<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl12$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114592">#</A>&nbsp;<A name=114592></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 19:56 | <A href="http://www.cnblogs.com/ericguo/" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>丁丁</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">用人来表示基对象，多态就是对于不同种类的人（情圣或者情盲），拍<SPAN lang=EN-US>MM</SPAN>马屁虽然目的相同，但是效果很不相同，情圣说<SPAN lang=EN-US>“</SPAN>你好漂亮<SPAN lang=EN-US>”</SPAN>就抱得<SPAN lang=EN-US>MM</SPAN>归，而情盲拍得话，可能就被锯<SPAN lang=EN-US><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shape id=_x0000_i1026 style="WIDTH: 14.25pt; HEIGHT: 14.25pt" alt="" type="#_x0000_t75"> <v:imagedata o:href="http://www.cnblogs.com/Emoticons/emteeth.gif" src="file:///C:\DOCUME~1\xuning\LOCALS~1\Temp\msohtml1\01\clip_image002.gif"></v:imagedata></v:shape><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl13$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114681">#</A>&nbsp;<A name=114681></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-07 22:57 | <A href="http://www.cnblogs.com/goldcoast" target=_blank>Neter</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我比较同意小诈的观点，多态就是具有相似功能的对象，有着不同的表现方法和行为。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl14$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114708">#</A>&nbsp;<A name=114708></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-08 01:32 | <A href="http://www.nixspot.net/" target=_blank>NickLedson</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我的观点是大大增强代码的复用性<SPAN lang=EN-US>,</SPAN>使得项目架构更加清晰<SPAN lang=EN-US>,</SPAN>松耦合<SPAN lang=EN-US>. <BR></SPAN>比如在实际应用中我可以轻松继承一个<SPAN lang=EN-US>System.Window.Forms.Control</SPAN>命名空间下的类比如<SPAN lang=EN-US>Button</SPAN>打造属于自己的<SPAN lang=EN-US>NixButton</SPAN>类而当一些原有系统的方法参数要求的传入的参数类型是<SPAN lang=EN-US>Button</SPAN>时<SPAN lang=EN-US>,</SPAN>我不必修改原有代码而直接把<SPAN lang=EN-US>NixButton</SPAN>的实例对象传进去依然可用<SPAN lang=EN-US>. <BR><BR></SPAN>从而达到代码复用和架构松耦合的效果<SPAN lang=EN-US> <BR><BR></SPAN>子类继承了父类的所有接口<SPAN lang=EN-US>,</SPAN>包括<SPAN lang=EN-US>invoke handler/object</SPAN>对应表然后按继承关系和<SPAN lang=EN-US>invoke handler</SPAN>不同而调用不同的实现代码<SPAN lang=EN-US>! <BR><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl15$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#114779">#</A>&nbsp;<A name=114779></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-08 09:44 | <A href="http://www.cnblogs.com/idior" target=_blank>idior</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">小诈的观点确实比较简明的说出了多态的表现<SPAN lang=EN-US>. <BR></SPAN>希望看到更加深刻透彻的观点<SPAN lang=EN-US>.<BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl16$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<A href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html?CommentID=114779#Post"><SPAN lang=EN-US><SPAN lang=EN-US>修改评论</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#116950">#</A>&nbsp;<A name=116950></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-11 16:15 | myx<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">一位司机在公共汽车上，有可能是乘客，有可能是司机，就就是多态吧<SPAN lang=EN-US>^_^<BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl17$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#117690">#</A>&nbsp;<A name=117690></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-13 06:21 | <A href="http://www.cnblogs.com/jonnyyu" target=_blank>MindScape</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">和小作的差不多，多态的本质根本是语义相同。<SPAN lang=EN-US> <BR><BR></SPAN>多态是指，不同对象对应于同一动作语义具有不同的实际行为。<SPAN lang=EN-US> <BR><BR><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl18$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#117983">#</A>&nbsp;<A name=117983></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-13 18:10 | <A href="http://www.cnblogs.com/NeoLee" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>龙蛰(NeoLee)</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">呵，我也常在面试中提到对<SPAN lang=EN-US>“</SPAN>多态<SPAN lang=EN-US>”</SPAN>的理解，我的理解是：<SPAN lang=EN-US> <BR><BR></SPAN>接口是面象对象的实现，多态是面象接口的应用！<SPAN lang=EN-US> <BR><BR>BTW:</SPAN>不太认同<SPAN lang=EN-US>sumtec</SPAN>的面向对象就是面向接口<SPAN lang=EN-US>. </SPAN>面象对象更多的是一种开发思想，接口更多的是实现技术，用<SPAN lang=EN-US>“</SPAN>就是<SPAN lang=EN-US>”</SPAN>来表达不确切，但这么形容也道出接口是面象对象开发中实现抽象最主要的手段<SPAN lang=EN-US>!<BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl19$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#118070">#</A>&nbsp;<A name=118070></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-13 21:56 | idior<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">sumtec</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的那句话当然<SPAN lang=EN-US>”</SPAN>不对<SPAN lang=EN-US>“</SPAN>，关键是道出很本质的东西。<SPAN lang=EN-US> <BR><BR></SPAN>我觉得多态是面向接口的保证，支持。 而不是应用，关系反了吧。<SPAN lang=EN-US> <BR></SPAN>由于多态的支持才能面向接口。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl20$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#118136">#</A>&nbsp;<A name=118136></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-14 00:32 | <A href="http://www.cnblogs.com/NeoLee" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>龙蛰(NeoLee)</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">句中的<SPAN lang=EN-US>“</SPAN>应用<SPAN lang=EN-US>”</SPAN>有两重含义：<SPAN lang=EN-US> <BR></SPAN>其一，多态是接口的特性。其二，就是对接口的应用，如在子类中<SPAN lang=EN-US>override</SPAN>父类接口。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl21$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#126464">#</A>&nbsp;<A name=126464></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-26 23:09 | <A href="http://www.jsports.org/" target=_blank>jsports</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我认为多态，首先蕴含有<SPAN lang=EN-US>decorator </SPAN>的味道<SPAN lang=EN-US>----------&gt;</SPAN>一样的接口，但是功能上增强了。<SPAN lang=EN-US> <BR><BR></SPAN>另外一方面，多太表明实现多态的<SPAN lang=EN-US>class</SPAN>是一族的，<SPAN lang=EN-US> <BR></SPAN>对外部（外人）来讲，只要知道有这个方法（标签），<SPAN lang=EN-US> <BR></SPAN>具体运行时你是这个系列（族）的谁，我不关心，我只关心你能给我进行这个服务就行。<SPAN lang=EN-US> <BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl22$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#126519">#</A>&nbsp;<A name=126519></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-27 08:30 | <A href="http://www.cnblogs.com/lifework" target=_blank><SPAN lang=EN-US><SPAN lang=EN-US>生活、工作</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">通俗的说，先说明一项功能或动作，风马牛不相及的东西去实现它。<SPAN lang=EN-US> <BR><BR></SPAN>对服务器段代码而言：<SPAN lang=EN-US> <BR></SPAN>订下这个功能的设计时间较长，但写时一下了就完成了，用<SPAN lang=EN-US>1%</SPAN>的时间，但风马牛不相及的东西去实现它时，耗时就多了，用<SPAN lang=EN-US>99%</SPAN>的时间。<SPAN lang=EN-US> <BR><BR></SPAN>对客户端代码而言：<SPAN lang=EN-US> <BR></SPAN>从使用的角度说：好处还是我上面所说的。<SPAN lang=EN-US> <BR></SPAN>从学院派的角度说：就是小诈的说法<SPAN lang=EN-US>“</SPAN>对于相同的事件（不指一般我们说的那些事件），不同的对象表现出不同的行为<SPAN lang=EN-US>”</SPAN>。<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl23$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#126592">#</A>&nbsp;<A name=126592></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-03-27 11:41 | <A href="http://www.cnblogs.com/idior" target=_blank>idior</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">jsports</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">和生活、工作的观点都不错<SPAN lang=EN-US> :)<BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl24$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<A href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html?CommentID=126592#Post"><SPAN lang=EN-US><SPAN lang=EN-US>修改评论</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#130195">#</A>&nbsp;<A name=130195></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-04-01 13:54 | <A href="http://www.cnblogs.com/ttyp" target=_blank>ttyp</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态是和继承相反的概念<SPAN lang=EN-US> <BR></SPAN>多态是父类调子类的实现，继承是子类调父类的实现，由于多态时不知道会被哪个子类继承，所以定义的东西都是虚函数，当你执行这个虚函数时，首先找到该虚函数代表的实体子类，并执行子类中的相关代码<SPAN lang=EN-US><BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl25$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#130207">#</A>&nbsp;<A name=130207></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>? 2005-04-01 14:08 | <A href="http://www.cnblogs.com/idior" target=_blank>idior</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">@ttyp <BR></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态是和继承相反的概念<SPAN lang=EN-US> interesting idea! <BR><A href="javascript:__doPostBack('Comments1$CommentList$_ctl26$DeleteLink','')"><SPAN lang=EN-US><SPAN lang=EN-US>删除评论</SPAN></SPAN></A>&nbsp;&nbsp;<A href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html?CommentID=130207#Post"><SPAN lang=EN-US><SPAN lang=EN-US>修改评论</SPAN></SPAN></A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><A title="permalink: re: 多态? 你的理解是什么?" href="http://www.cnblogs.com/idior/archive/2005/03/06/113727.html#134635">#</A>&nbsp;<A name=134635></A>re: </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">多态<SPAN lang=EN-US>? </SPAN>你的理解是什么<SPAN lang=EN-US>?<A name=Post></A> 2005-04-09 13:24 | <A href="http://www.cnblogs.com/SupperCabbage" target=_blank>huangyi</A><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我从客户和服务的角度来理解 就是<SPAN lang=EN-US> <BR><BR></SPAN>服务可以由许多人来提供。<SPAN lang=EN-US> <BR></SPAN>而客户只管使用服务，不需要知道服务的来源更不需要知道服务是如何实现的。另外，客户也许还会有小秘，专门帮客户选择服务的。<SPAN lang=EN-US> <BR><BR></SPAN>哎 多态让客户太舒服了啊 呵呵<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><o:p>&nbsp;</o:p></SPAN></P><img src ="http://www.blogjava.net/idior/aggbug/3040.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/idior/" target="_blank">idior</a> 2005-04-09 16:13 <a href="http://www.blogjava.net/idior/archive/2005/04/09/3040.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>测试驱动开发 --- Rss Reader Item Marker </title><link>http://www.blogjava.net/idior/archive/2005/04/09/3039.html</link><dc:creator>idior</dc:creator><author>idior</author><pubDate>Sat, 09 Apr 2005 08:12:00 GMT</pubDate><guid>http://www.blogjava.net/idior/archive/2005/04/09/3039.html</guid><wfw:comment>http://www.blogjava.net/idior/comments/3039.html</wfw:comment><comments>http://www.blogjava.net/idior/archive/2005/04/09/3039.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/idior/comments/commentRss/3039.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/idior/services/trackbacks/3039.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo2; tab-stops: list 21.0pt left 207.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT></SPAN></SPAN><SPAN class=MsoHyperlink><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><FONT color=#0000ff>Refactory away External Loops</FONT></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">尽量将集合遍历的操作放在集合内</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><?XML:NAMESPACE PREFIX = O /><O:P></O:P></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><FONT face="Times New Roman">2.<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN><SPAN class=MsoHyperlink><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><FONT color=#0000ff>Reduce Private Method<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT></SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">尽量减少私有方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><O:P></O:P></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><FONT face="Times New Roman">3.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN class=MsoHyperlink><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><FONT color=#0000ff><SPAN style="mso-tab-count: 1">&nbsp;&nbsp; </SPAN>Open-Close Principle<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</SPAN></FONT></SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">封闭开放原则</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><O:P></O:P></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><FONT face="Times New Roman">4. <SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN><SPAN class=MsoHyperlink><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><FONT color=#0000ff>Specification Pattern<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何从一组对象中选出满足特定条件的对象</SPAN><SPAN class=MsoHyperlink><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: windowtext"><O:P></O:P></SPAN></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本文将围绕以上主题就最近很流行的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><FONT face="Times New Roman">RSS</FONT></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">阅读器的一个功能</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><FONT face="Times New Roman">(Mark)以测试驱动开发的方式</FONT></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">展开</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><FONT face="Times New Roman">.<O:P></O:P></FONT></SPAN> <FONT size=2>最后给出一个通用的处理集合的框架.</FONT> <BR><BR><A href="http://www.cnblogs.com/idior/articles/128134.html"><FONT color=#ff1493 size=2>详见文章</FONT></A> <BR><FONT size=2>blogJava首贴</FONT> <IMG height=20 src="http://www.blogjava.net/Emoticons/QQ/15.gif" width=20 border=0><BR></P><img src ="http://www.blogjava.net/idior/aggbug/3039.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/idior/" target="_blank">idior</a> 2005-04-09 16:12 <a href="http://www.blogjava.net/idior/archive/2005/04/09/3039.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>