??xml version="1.0" encoding="utf-8" standalone="yes"?>国产成人无码久久久精品一,久久无码国产,久久精品无码午夜福利理论片http://www.shnenglu.com/woaidongmao/category/6007.html文章均收录自他h博客Q但不喜标题前加-[转脓]Q因其丑陋,见谅Q~zh-cnFri, 26 Dec 2008 22:51:55 GMTFri, 26 Dec 2008 22:51:55 GMT60开区间与闭区间&mdash;&mdash;从初{数学中吸取一点编E养?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/12/25/70343.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Thu, 25 Dec 2008 09:24:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/12/25/70343.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/70343.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/12/25/70343.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/70343.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/70343.html</trackback:ping><description><![CDATA[<p class=MsoNormal style="TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><span id="5553n3t" class=posttitle1><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体">开区间和闭区间</span>Q?/span></span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">学过q个很多q了吧,估计是在初中时候的数学里。今天特意查了下Q终于又知道?#8220;<strong style="mso-bidi-font-weight: normal"><span lang=EN-US style="COLOR: red">[</span></strong>”是闭的,“<strong style="mso-bidi-font-weight: normal"><span style="COLOR: red">Q?/span></strong>”是开的(详细L下面的花色字体)?span lang=EN-US><o:p></o:p></span></span></p> <p class=MsoNormal style="TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">查这个好W否Q其实是有缘qQ当然也有些用处Q我慢慢道来<span lang=EN-US><o:p></o:p></span></span></p> <p class=MsoNormal style="LINE-HEIGHT: 150%"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial"><o:p> </o:p></span></p> <p class=MsoNormal style="MARGIN-LEFT: 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体"><span style="mso-list: ignore">1.<span style="FONT: 7pt 'Times New Roman'">      </span></span></span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">~程中,L很频J的要实现对数据q行搜烦Q查扄代码。以搜烦举例Q要l定开xӞ比如写一个函敎ͼ扑ֈ<span lang=EN-US>login_begin</span>?span lang=EN-US>login_end</span>之间的帐戗如果这L代码写得很多了,׃犯糊涂,q里l的条g<span lang=EN-US>login_begin</span>?span lang=EN-US>login_end</span>Q到底有没有包含<span lang=EN-US>login_begin</span>?span lang=EN-US>login_end</span>啊?不确定,然后M码一看,噢,原来没有包含呀。不定包含与否的原因,是因为没有用统一的开闭区间规则?span lang=EN-US><o:p></o:p></span></span></p> <p class=MsoNormal style="LINE-HEIGHT: 150%"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial"><o:p> </o:p></span></p> <p class=MsoNormal style="MARGIN-LEFT: 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体"><span style="mso-list: ignore">2.<span style="FONT: 7pt 'Times New Roman'">      </span></span></span><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">STL</span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">的容器和法的实玎ͼ都有一个共性: q代器构成的区间是前闭后开?span lang=EN-US>, </span>?strong style="mso-bidi-font-weight: normal"><span lang=EN-US style="COLOR: red">[</span></strong><span lang=EN-US>vector::begin(), vector::end() <strong style="mso-bidi-font-weight: normal"><span style="COLOR: red">)</span></strong></span>Q这样在使用的时候就不会犯糊涂了Q?span lang=EN-US><o:p></o:p></span></span></p> <p class=MsoNormal style="LINE-HEIGHT: 150%"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial"><o:p> </o:p></span></p> <p class=MsoNormal style="MARGIN-LEFT: 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体"><span style="mso-list: ignore">3.<span style="FONT: 7pt 'Times New Roman'">      </span></span></span><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">C++</span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">举例Q?span lang=EN-US>for(int i= 0; i < 10; ++i)</span>q样的P代过E,使用的也是一个前闭后开区间Q?strong style="mso-bidi-font-weight: normal"><span lang=EN-US style="COLOR: red">[</span></strong><span lang=EN-US>0</span>Q?<span lang=EN-US>10</span><strong style="mso-bidi-font-weight: normal"><span style="COLOR: red">Q?/span></strong>Q如果这样写<span lang=EN-US>for(int i= 0; i <= 9; ++i)</span>Q虽然等P但已不是一个良好的格式了;<span lang=EN-US><o:p></o:p></span></span></p> <p class=MsoNormal style="LINE-HEIGHT: 150%"><span lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial"><o:p> </o:p></span></p> <p class=MsoNormal style="MARGIN-LEFT: 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333399; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体"><span style="mso-list: ignore">4.<span style="FONT: 7pt 'Times New Roman'">     </span></span></span></strong><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial">最后所说的吸取dQȝ成如下这句话Q?strong style="mso-bidi-font-weight: normal"><span style="COLOR: #333399">?font color=#ff0000>业务逻辑上和目代码</font>里用统一的开闭区间规则,推荐使用前闭后开“</span><span lang=EN-US style="COLOR: red">[ </span><span style="COLOR: red">Q?/span><span style="COLOR: #333399">”Qؓ什么?因ؓ所以没原因?span lang=EN-US><o:p></o:p></span></span></strong></span></p> <p class=MsoNormal style="LINE-HEIGHT: 150%"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: arial"><strong style="mso-bidi-font-weight: normal"><span style="COLOR: #333399"><span lang=EN-US><o:p></o:p></span></span></strong></span></p> <p> </p> <p> </p> <p>////////////////////////////////////////////////////////////////////////</p> <p class=MsoNormal><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt"> a, b </span></strong><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是两个实?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt">, </span></strong><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt"> a ≤ b.</span></strong><span lang=EN-US style="FONT-SIZE: 18pt"><br><br><strong>1</strong></span><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?span style="COLOR: maroon">满</span></span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">a ≤ x ≤ b</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实?/span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">x</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的集?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">,</span></strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"><br><strong>      </strong></span><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示?/span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: red">[ a, b ]</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">, </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">叫做</span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">闭区?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">;</span></strong><span lang=EN-US style="FONT-SIZE: 18pt"><br><br><strong>2</strong></span><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?span style="COLOR: maroon">满</span></span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">a </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: orange; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange"> x </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: orange; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">b</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实?/span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">x</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的集?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">,</span></strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"><br><strong>      </strong></span><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示?/span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: red">( a, b )</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">, </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">叫做</span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开区间</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">;</span></strong><span lang=EN-US style="FONT-SIZE: 18pt"><br><br><strong>3</strong></span><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?span style="COLOR: maroon">满</span></span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">a ≤ x </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: orange; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">b</span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange"> a </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: orange; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">x ≤ b </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实?/span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: orange">x</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的集?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">,</span></strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon"><br><strong>      </strong></span><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分别表示?/span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon"> </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: red">[ a, b )</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">, </span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: red">( a, b ]</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">, </span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: maroon; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">叫做</span></strong><strong><span style="FONT-SIZE: 18pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">半开区间</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt; COLOR: maroon">.</span></strong><span lang=EN-US style="FONT-SIZE: 18pt"><br><br></span><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q里实数</span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt"> a, b </span></strong><strong><span style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">叫做区间的端?/span></strong><strong><span lang=EN-US style="FONT-SIZE: 18pt">.</span></strong><span lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: arial; mso-bidi-font-size: 10.0pt"><o:p></o:p></span></p> <img src ="http://www.shnenglu.com/woaidongmao/aggbug/70343.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-12-25 17:24 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/12/25/70343.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>开始创立自q工具Q帮助编?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/11/21/67456.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Fri, 21 Nov 2008 02:42:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/11/21/67456.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/67456.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/11/21/67456.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/67456.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/67456.html</trackback:ping><description><![CDATA[<p>需要徏立自q工具Q基于以下的几点Q?/p> <p>1、编码的工作性质是操作文本Q?/p> <p>2、L在做大量的相似的工作Q编写大量可cL的代码,毫无效率Q?/p> <p>3、h工写代码Q往往引入更多的错误,雷同的错误;</p> <p>4、Lp太多旉在编码上Q成了打字员Q程序员N是做文本处理工作的Q;</p> <p>5、找不到适合自己的代码分析处理工P需求往往和领域挂钩,和个人挂钩,个性化的;</p> <p>6、语a的特性能够在~码上做C定的Q简化,比如宏,模版。但是受的限制太多,q且不可能实C所惌的那U智能,代码自动生成Q扩展预处理效果Q最后是你会深陷U缠其中Q可能后来却一无所P</p> <p>7、清澈和q用语言的特性需要大量的l验Q实践,耗费大量的时_倒不如做个代码处理工具吧Q就是一个文本分析工兯已Q从另一面入手,把编码就看作文本操作Q化JؓQ?/p> <p>8、自己写的,才是最适合自己Q是能够与时p的?/p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/67456.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-11-21 10:42 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/11/21/67456.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>委托本质的思?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/11/19/67293.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Wed, 19 Nov 2008 07:32:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/11/19/67293.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/67293.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/11/19/67293.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/67293.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/67293.html</trackback:ping><description><![CDATA[<p>若A变动Q一pd的B,C,D,E,F变动,可用委?/p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/67293.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-11-19 15:32 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/11/19/67293.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>未找到解x案的问题http://www.shnenglu.com/woaidongmao/archive/2008/11/19/67292.html肥仔肥仔Wed, 19 Nov 2008 07:31:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/11/19/67292.htmlhttp://www.shnenglu.com/woaidongmao/comments/67292.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/11/19/67292.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/67292.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/67292.html1、复杂对话框的控Ӟ状态逻辑Q?

2、Log与业务逻辑分离的问题;

3、聚合导致接口冗余的问题?/p>

肥仔 2008-11-19 15:31 发表评论
]]>
保留POD信息可以带来的用?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/11/11/66582.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Tue, 11 Nov 2008 02:30:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/11/11/66582.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/66582.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/11/11/66582.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/66582.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/66582.html</trackback:ping><description><![CDATA[<p>1、从binanry的序列化Q装载;</p> <p>2、从XML的序列化Q装载;</p> <p>3、从HTML的序列化Q装载;</p> <p>4、打印PODQ?/p> <p>5、POD多键值比较;</p> <p>6、从文g导入导出POD</p> <p>7、基本上依靠保留POD信息Q可以实C个数据库?/p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/66582.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-11-11 10:30 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/11/11/66582.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>不允许出现全局函数http://www.shnenglu.com/woaidongmao/archive/2008/10/27/65185.html肥仔肥仔Mon, 27 Oct 2008 03:39:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/10/27/65185.htmlhttp://www.shnenglu.com/woaidongmao/comments/65185.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/10/27/65185.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/65185.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/65185.html1、如果这个函数带需要有自己才能讉K数据Q那么它是应该一个类Q?/p>

2、如果这个函数只是一个过E,没有U有数据Q那么他应该属于一l类DE的一个成员,q一l类DE就应该是一个类Q一个功能或者逻辑单元Q?/p>

3、因此,每当需要增加一个全局函数的时候,需要考虑它应该是一个什么样的类中间的一个成员函敎ͼ于是增加q样的一个类。达C集中理的而不是分散而ؓ的模式?/p>

肥仔 2008-10-27 11:39 发表评论
]]>
层数据l构Q结构型Qvs 深层数据l构Q聚合型Q?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/10/25/64977.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Fri, 24 Oct 2008 18:36:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/10/25/64977.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/64977.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/10/25/64977.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/64977.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/64977.html</trackback:ping><description><![CDATA[     摘要: 构徏pȝ数据模型Ӟ?共选择Q以Qgroup->account->son account举例 <br> <br>  <a href='http://www.shnenglu.com/woaidongmao/archive/2008/10/25/64977.html'>阅读全文</a><img src ="http://www.shnenglu.com/woaidongmao/aggbug/64977.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-10-25 02:36 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/10/25/64977.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>数据对象和业务逻辑对象http://www.shnenglu.com/woaidongmao/archive/2008/10/25/64975.html肥仔肥仔Fri, 24 Oct 2008 17:32:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/10/25/64975.htmlhttp://www.shnenglu.com/woaidongmao/comments/64975.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/10/25/64975.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/64975.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/64975.html1、数据对象就是数据的容器Q或者说配置的管理,只包含基本的装蝲Q保存,增加Q删除,修改Q查扄操作Q需要保证数据的有效?---若多U程则加锁;

2、业务逻辑对象Q是一l处理过E的集合Q一l函数组合成的类Q这l函数组合能够代表系l中的一个处理单元或者功能模块,因ؓ不包含数据,所以不需要锁Q?/p>

3、业务逻辑对象需要引用数据对象里面的数据来完成整个流E;

4、简单的模块Q数据对象和业务逻辑对象可以l合在一个类里面完成Q当然这是一U耦合Q?/p>

5、复杂的模块Q或者系l由多个模块构成Q那么数据对象和业务逻辑对象分离是降低复杂度的好办法Q这是一U解耦合Q?/p>

6、一个数据与业务逻辑完全分离的事例是Q数据库 + 业务层。数据库是数据的持久Q不涉及业务Q业务层是逻辑的执行不兛_数据的存储。这是一U完全的松耦合Q?/p>

7、从目前所l历以及吸取的教训与l验来看Q?font color="#ff0000">从开始就做到数据的的归数据,业务的归业务Q会大大降低复杂度,化系l,降低耦合Q十分必要!

 

image



肥仔 2008-10-25 01:32 发表评论
]]>
class在项目中角色汇?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63826.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Sun, 12 Oct 2008 10:48:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63826.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/63826.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63826.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/63826.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/63826.html</trackback:ping><description><![CDATA[<p>1、抽象接口,abstractQCAPIInterface</p> <p>2、DLL包装后的工厂QCManagerDLL</p> <p>3、上游参与者的调用接口QCommand of callingQCAdminCmd</p> <p>4、下游参与者的包装QAsk for doing sthQCSysDataBase</p> <p>5、纯_的容器Q一般是比较大的容器Q因为数据种c较多,其中不含执行逻辑QCCommonData</p> <p>6、容器与逻辑的结合体Q数据单一Q逻辑只关心容器里的数据;COrderFilter</p> <p>7、纯_的逻辑QCClientCmdCheck</p> <p>8、静态的。CErrorDescription</p> <p>9、对pȝAPI的包装, CNetFuncs</p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/63826.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-10-12 18:48 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63826.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>两种cd的随手记?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63823.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Sun, 12 Oct 2008 10:22:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63823.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/63823.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63823.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/63823.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/63823.html</trackback:ping><description><![CDATA[<p>开发测试程序的时候,喜欢用笔记录下来一些东西,但是目前都只限于记录下发现和{待修正的bugQ?/p> <p>那么其实q有另外一U更加重要的信息Q以前忘了记录:<font color="#ff0000">代码需要重构地方,比如cȝ分解Q以及如何重构?q个需要持久保留,所以最好写在电脑里?txtQ而不是纸?</font></p> <p><font color="#ff0000"></font></p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/63823.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-10-12 18:22 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63823.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>class模式Q降低复杂度http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63817.html肥仔肥仔Sun, 12 Oct 2008 09:53:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/10/12/63817.htmlhttp://www.shnenglu.com/woaidongmao/comments/63817.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/10/12/63817.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/63817.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/63817.html最l还是发玎ͼ粗的类拆分开来,成ؓQOne Funcation------One Class的小cL式, 降低了复杂度Q较之前者,效果好很多。原因:

1、小class模式Q让人的x炚w中了Q关注ƈ作好一个小classҎ许多Q?/p>

2、小class模式Q让一个类的代码不会那么多Q容易查找,修改Q?/p>

3、分来开来后Q关注减,更不Ҏ引入错误Q把功能拆封Ch的思维能力能够控制的规模之内?/p>

肥仔 2008-10-12 17:53 发表评论
]]>
业务逻辑与界面彻底分ȝ一个参考原?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63818.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Sun, 12 Oct 2008 09:53:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63818.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/63818.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63818.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/63818.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/63818.html</trackback:ping><description><![CDATA[<p>如何才能UCZ务逻辑与界面达Cd的分?回答q个问题困难。但是如果能够找C个参考原型,那就会很好理解?/p> <p>我找的一个参考原型是QSQL Server + SQL Admin</p> <p>1、SQL Server是服务器Q它只有业务逻辑Q没有界面;</p> <p>2、SQL Admin是SQL Server的界面,没有业务逻辑Q?/p> <p>3、SQL Server与SQL Admin通过TCP交互Q它们是d分离的,影射成就是:q是一U业务逻辑与界面彻底分ȝ完美形式Q?/p> <p> </p> <p>他们是如何彻底分?其实很简单:</p> <p>SQL Server提供了SQL Admin的一个TCP命o调用接口Q也是Command模式来完成,影射成就是:E序的业务逻辑应该提供l界面一个Command接口Q界面只能够通过Command接口来执行命令,而不能直接操作业务逻辑里面的数据?/p> <p>当然Q如果考虑到界面需要不挂vQ若Command执行是阻塞模式就有些问题Q需要变换成回调q回的异步模式,q会复杂许?/p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/63818.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-10-12 17:53 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/10/12/63818.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对于界面Q要闭Q要开放什?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/09/12/61684.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Fri, 12 Sep 2008 07:33:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/09/12/61684.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/61684.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/09/12/61684.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/61684.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/61684.html</trackback:ping><description><![CDATA[<p>1、对于界面之,他要Get什么和如何Display我不,可以l它对象和接口,他可以自q合成自己的显C,昄永远都不是业务逻辑的部?</p> <p>2、对于界面之,他要Change什么我要管Q不能让他调用能够改变模型的接口Q因为改变肯定是业务逻辑的部分,界面中直接调用方法来改变Q意味着业务逻辑存在耦合到界面中的部分,q是不允许的?/p> <p>3?font color="#ff0000">ȝQQ何Change都必通过UserCommandQ让UserCommandq个抽象层来完成q个事情Q一个参与者会有一pd的命令接口?/font></p> <p>==============================================================================</p> <p>备注Q后来的一炚w悟,M改变和执行都是业务逻辑的部分。如果能够确保界面只能够调用Get?Q可以通过const来解冟?/p> <p>a、界面得C个const object* 或者const object&;</p> <p>b、const对象或者指针,只能调用constҎQconst Ҏ意味着no change</p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/61684.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-09-12 15:33 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/09/12/61684.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>拆分与效率的忧虑http://www.shnenglu.com/woaidongmao/archive/2008/08/18/59231.html肥仔肥仔Mon, 18 Aug 2008 08:10:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/08/18/59231.htmlhttp://www.shnenglu.com/woaidongmao/comments/59231.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/08/18/59231.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/59231.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/59231.html1、一个大的类Q拆成的c,有没有效率损失?{案是没有的Q因为类的本质就是提供接口,q行函数调用。一个大cd?00个函敎ͼ与分解成10个小c,每个10个函敎ͼ在效率上没有差别Q?/p>

2、小cL式,会不会增加复杂性?{案是部分增加,部分降低。小cL式增加了cȝ个数Q一个项目抽象体多Q复杂度高Q这不容|疑Q所有者一部分增加了复杂性。另一斚w类模式Q表明一个类只完成需要的功能Q所以在层次划分上更加的清晰Q这在一个层面上降低了复杂性?/p>

肥仔 2008-08-18 16:10 发表评论
]]>
逻辑复杂度的评估http://www.shnenglu.com/woaidongmao/archive/2008/08/08/58292.html肥仔肥仔Thu, 07 Aug 2008 16:10:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/08/08/58292.htmlhttp://www.shnenglu.com/woaidongmao/comments/58292.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/08/08/58292.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/58292.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/58292.htmlimage

观点一Q深度带来复杂?/p>

模式1?U深度,模式2?U深度;

 

观点二:深度带来耦合

模式1中,A耦合了BCDE, B耦合了CDE, C耦合了DEQD耦合了E, 耦合数目为:10Q?/p>

模式2中:控制器耦合了ABCDEQ耦合数据为:5?/p>

 

观点三:串联改ƈ联,提取控制逻辑到独立模块,减低复杂度?/p>

肥仔 2008-08-08 00:10 发表评论
]]>
两种模式的选择http://www.shnenglu.com/woaidongmao/archive/2008/08/07/58291.html肥仔肥仔Thu, 07 Aug 2008 15:54:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/08/07/58291.htmlhttp://www.shnenglu.com/woaidongmao/comments/58291.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/08/07/58291.html#Feedback3http://www.shnenglu.com/woaidongmao/comments/commentRss/58291.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/58291.html阅读全文

肥仔 2008-08-07 23:54 发表评论
]]>
一定要坚守的原?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/08/05/58100.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Tue, 05 Aug 2008 15:47:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/08/05/58100.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/58100.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/08/05/58100.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/58100.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/58100.html</trackback:ping><description><![CDATA[<p>1、不能从法和数据结构的l织q个层面上考虑设计Q而应该从从模块和数据的层面上考虑设计。把数据搞清楚Q按照需求,拆分成能够完成需求的各自独立的模块,让数据从L到终Ҏ动,被处理,最后得到结果?/p> <p>      比如Q数据存储模块、h格发生器、hD滤器、交叉盘h合成器、h格发布器、视图模块;</p> <p><a href="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/ec5826bf7981_14456/image_2.png"><img height=455 alt=image src="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/ec5826bf7981_14456/image_thumb.png" width=860></a> </p> <p>2、根据数据流图,拆分出来的独立模块,设计c;</p> <p>3、类的分别原则是Q属于流E不同模块,即功能怼或者相q,也不能合成一个类Q?/p> <p>4、一个类只做有限的事情,大而全的类虽然有可能是一U方案,但决不是最好的ҎQ它增加了耦合和复杂性,l护性也很低Q?/p> <p>5、类的实现部分,量不要直接调用cL员以外的数据Q比在类的函CQ直接对某个全局对象调用ҎQ这L函数执行的前提是Q这个全局对象必须存在Q而这是一U耦合。解耦是单的Q那是把这个全局对象作ؓcd数的参数传入Q?/p> <p>6、类的方法接口,应该只接受能够完成类Ҏ所需要的数据Q如果传递一个指针,q个指针包含的内容,可能q远过cL法所需要的Q?/p> <p>7、关于上一点的解决办法是:构徏c需要参数的PODQ不要怕{换,不要怕生成时对象,事实上我需要这样做?/p> <p> </p> <p>===========================================================================================</p> <p>改进后的版本</p> <p>1、界面视图本来可以承担控制器的作用,也就是MVC化成MV。但是这样就必须让视图来处理命oQ试囑ֿd备双向的能力Q即解析命oQƈ向下执行同步到模型(数据)Q根据模型(数据)Q同步视图,向上更新界面Q?/p> <p>2、控制器和视N中在视图里面Q增加了视图的复杂性,如果增加一个命令控制器Q最l变成MVCQ那么视囑ְ只需要具备向上更新UI的能力,向下执行命o更改模型Q数?的能力交l了命o控制器。这样就实现了一上一下,各司其职的架构;</p> <p>3、Ş成视囄l常不只是一U数据流Q往往多种数据共同Ş成一个视图:比如下面的结构中Q视图是由:配置,h,日志三U组合而成的;</p> <p>4、增加命令控制器的作用的事显而易见的Q它让业务控制的接口可以q视图而存在。反q来理解Q如果用视图来同时充当用户命令接口,那么用户命o接口存在的前提是视图必须存在。而视图是多变的,或者说可以Ҏ不存在,那么把用户命令接口放在其中极其不合适。试想一下,一个项目它可以是个对话框,可以是个多文档,也可以是个控制台Q多变的界面Q多变的视图Q但是用户命令接口确实不便的Q把用户命o耦合到视囄实现里面去,׃合适了Q?/p> <p>5、把命o控制器抽d来的另一个好处是Q集中管理用L命oQ便于维护。试想一个如果对用户命o的处理分散在若干?cpp文gQ几十个C***Dailog的On***Button()消息相应函数里面Q理解,调试Q维护v来,是一件多为痛苦的事情Q?/p> <p>6、更多想写的一句话Q就是业务逻辑Q不要和界面耦合hQ?font color=#ff0000>界面需要做的就是:昄视图Q接受用户命令两个功能,其他的都没必要在界面里面存在</font>。D个例子,用得很多的MFC OnTimer()函数Q事实上定时操作应该是业务逻辑的部分,攑֜界面里执行就不合适了Q?/p> <p>7?font color=#ff0000>界面与业务逻辑耦合E度的一个标志就是:把程序里界面代码剥离后,业务逻辑依然完整Q程序依然可以运行?/font>如上面所说的Q界面中处理OnTImer()函数Q则L界面代码后,业务逻辑׃完整了,了执行定时业务处理的部分,q就是一中明昄界面与业务逻辑耦合?/p> <p><a href="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/ec5826bf7981_14456/image_6.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=462 alt=image src="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/ec5826bf7981_14456/image_thumb_2.png" width=842 border=0></a> </p> <p>8、程序可以分为很多功能模块,命o控制器能够控制这些功能模块的行ؓ是应该,q些功能模块输出信息到视N面也是应该的?/p> <p> </p> <p>===========================================================================================</p> <p>struct ViewResult<br>{<br>    struct ViewSource <br>    {<br>        char  symbol[12];<br>        int        digits;<br>        double minprice;<br>        double minspread;<br>        double peerminm;<br>        BOOL    usepremium;<br>        double premiumex;<br>        char   session_current;<br>        char    remark[256];<br>        BOOL   session_enable;<br>    } view_source;<br>    struct ViewTrans<br>    {<br>        BOOL   b_bid_success;<br>        BOOL    b_ask_success;<br>    }view_trans;<br>    struct ViewPrice <br>    {<br>        double bid;<br>        double ask;<br>    }view_price;<br>}; <p> </p> <p>    BOOL UpdateViewSource(int index, const ViewResult::ViewSource& vs);<br>    BOOL UpdateViewTrans(int index, const ViewResult::ViewTrans& vt);<br>    BOOL UpdateViewPrice(int index, const ViewResult::ViewPrice& vp);<br>    BOOL UpdateViewMsg(const ViewMsg& vm);<br>p</p> <img src ="http://www.shnenglu.com/woaidongmao/aggbug/58100.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-08-05 23:47 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/08/05/58100.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>代码的整?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/06/27/54824.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Fri, 27 Jun 2008 10:19:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/06/27/54824.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/54824.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/06/27/54824.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/54824.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/54824.html</trackback:ping><description><![CDATA[<p>需要把自己的代码,和得到的代码整理h攑ֈ一个称之ؓ“my self”库里面Q?/p> <p>到处拯Q粘贴绝对不是一个好的办法,保存一个备份,而不是多个备份;</p> <p><font color="#ff0000">只有一个备份,也就意味着代码需要达到通用U别的复用,不知不觉Q你的设计就会改善?/font></p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/54824.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-06-27 18:19 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/06/27/54824.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>语言的语ahttp://www.shnenglu.com/woaidongmao/archive/2008/05/17/50119.html肥仔肥仔Fri, 16 May 2008 16:46:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/05/17/50119.htmlhttp://www.shnenglu.com/woaidongmao/comments/50119.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/05/17/50119.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/50119.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/50119.htmlQUOTE:

原帖?"albcamus" 发表Q?/i>
我感觉那U遇到大型项目问题,觉得目前的开发环境不够完,从而ؓ此设计一U语a的,都是尖U的牛h。一?.........

最q新?面向语言的程序设?

QUOTE:

借助工具的帮助,允许开发者创qDSL。这LDSL当然能够最贴切地描q领域问题,从而大大提高开发效率?

 

 

[quote]原帖?"aero"]那种为项目开发语a的事情,应该是计机的传说了吧。感觉现在,语言_了。[/quote 发表Q?/i>
“ؓ目”确实太奢侈了?br>不过好的通用产品大多都有一套自q脚本语言?br>毕竟单纯?.ini 配置文g的功能太׃Q?br>不能适应客户们无Ih的需求?br>因此Q要惛_一个通用的、面向各U客L产品Q?br>必须要把业务有关的部分从核心里边剥离出来Q以便于灉|配置?br>我这D|间就天天在编q种破脚本,烦死了?/p>

肥仔 2008-05-17 00:46 发表评论
]]>
函数、模块、耦合http://www.shnenglu.com/woaidongmao/archive/2008/04/16/47304.html肥仔肥仔Wed, 16 Apr 2008 10:36:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2008/04/16/47304.htmlhttp://www.shnenglu.com/woaidongmao/comments/47304.htmlhttp://www.shnenglu.com/woaidongmao/archive/2008/04/16/47304.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/47304.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/47304.html1、函数就是一个模块,必须独立Q?/p>

2、尽一切减关联,降低耦合Q?/p>

3、努力不要调用其他对象,变量Q仅仅完成自q功能Q如果要调用Q应该作为变量传入;

4、一Ҏ及到与具体应用相关的对象Q那么这个源码的复用是一句屁话?/p>

5、函数的调用规则应该是控刉辑里的事情Q?/p>

6、耦合的模块很难进行自动化的单元测试?/p>

肥仔 2008-04-16 18:36 发表评论
]]>
服务器编E的思?/title><link>http://www.shnenglu.com/woaidongmao/archive/2008/04/16/47220.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Wed, 16 Apr 2008 06:02:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2008/04/16/47220.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/47220.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2008/04/16/47220.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/47220.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/47220.html</trackback:ping><description><![CDATA[<p>   1、所谓服务器软gQ就是通过协议解析{等手段Q把q在internet|络上的现实参与者,映射为系l内栔R的抽象参与者,l而而加以处理。这里是“参与者”的概念Q相当于p?l首先把外在的用户个体,一步一步拉q,抽象Q最l变成系l内部的一个操作接口集合。另外,因ؓ内部参与者是外部用户的在pȝ内的一个映,需要维护好q一层关pR?br>   <br>2、如果系l服务多个参与者,而参与者之间本w就存在交互的话。是让参与者直接交互还是通过间接的“桥”来交互。也是_pȝ内的参与者需要对pȝ了解吗?是需要了解多个接口还是一个接口?q是把系l当作一个黑盒来使用q是一个白盒来使用Q后者耦合降低。但是作为“桥”的那个东西Q复杂性也不言而喻Q需要多多考虑一下;</p> <p>3、系l内的数据应该属于业务逻辑层还是数据层Q关键的一点就是看q个数据对象是否需要持久性,是不是只是运行时存在。D个例子来_数据库属于数据层Q但是从数据库内取出数据~存在系l内Q用作判断就属于业务逻辑层内的东ѝ业务逻辑层的东西可以灉|构造,但是数据层的数据q对稳定,也只要支持少量的接口Q比如增?删、修{。不能在数据层加入业务逻辑判断的代码,否则D数据层和业务层耦合。业务逻辑如果需要判断数据层内部的一些东西,应该把这些数据缓存到业务层的零时对象内?/p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/47220.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2008-04-16 14:02 <a href="http://www.shnenglu.com/woaidongmao/archive/2008/04/16/47220.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.hadonghoon.cn" target="_blank">þþƷ</a>| <a href="http://www.hkrczp.cn" target="_blank">ɫݺݾþAVۺ</a>| <a href="http://www.6t0n.cn" target="_blank">þһ</a>| <a href="http://www.ditiewang.com.cn" target="_blank">91þ㽶Ů߿</a>| <a href="http://www.wkbxdlr.cn" target="_blank">þþþ޾Ʒþþþþþ </a>| <a href="http://www.webidea.com.cn" target="_blank">99þˬ޾ƷŮ</a>| <a href="http://www.weixinqun688.cn" target="_blank">Ʒѿþþ㽶</a>| <a href="http://www.xkart.cn" target="_blank">Ʒþþþþ벻</a>| <a href="http://www.hedv.com.cn" target="_blank">þˬˬˬ˾þþ</a>| <a href="http://www.dbwlcom.cn" target="_blank">Ʒþˬ</a>| <a href="http://www.galidun.cn" target="_blank">ƷþþþóѶ</a>| <a href="http://www.hthotel.com.cn" target="_blank">þAV</a>| <a href="http://www.vaez.cn" target="_blank">þˬˬƬAV鷳</a>| <a href="http://www.impark.cn" target="_blank">þseƷһ</a>| <a href="http://www.hbqw.net.cn" target="_blank">Ʒպþ</a>| <a href="http://www.dlwz8.cn" target="_blank">ҹƷþ</a>| <a href="http://www.htja.com.cn" target="_blank">˾þþƷӰԺ</a>| <a href="http://www.carswg.cn" target="_blank">˺ݺۺ88ۺϾþ</a>| <a href="http://www.uniontruck.cn" target="_blank">99þþùƷ޿</a>| <a href="http://www.lmka.com.cn" target="_blank">˾Ʒþþþ7777</a>| <a href="http://www.wtxpxt.cn" target="_blank">˾þ</a>| <a href="http://www.yufuzhi.cn" target="_blank">˾þô߽槼</a>| <a href="http://www.thesmarterwaytofaster.cn" target="_blank">þֻǾƷ66</a>| <a href="http://www.rhtyyls.cn" target="_blank">Ʒþþþþþþþ</a>| <a href="http://www.cizbuk.cn" target="_blank">2020þþƷ</a>| <a href="http://www.54wk.cn" target="_blank">þþƷAV鶹 </a>| <a href="http://www.vzrg.cn" target="_blank">þۺϳDž</a>| <a href="http://www.2782yh.cn" target="_blank">þѹƵ</a>| <a href="http://www.51083114.cn" target="_blank">Ʒþþþþۺձ</a>| <a href="http://www.rnsqwp.cn" target="_blank">þ˽˹Ʒ</a>| <a href="http://www.magicok.cn" target="_blank">ݺɫþþۺƵպ</a>| <a href="http://www.ithaiyang.com.cn" target="_blank">þ99Ʒþþþþò</a>| <a href="http://www.info88.cn" target="_blank">88þþƷһëƬ</a>| <a href="http://www.sebyse.cn" target="_blank">Ʒһþ㽶߿</a>| <a href="http://www.shufa520.cn" target="_blank">ٸþĻһ </a>| <a href="http://www.xxxls.cn" target="_blank">ھƷþþþӰԺ</a>| <a href="http://www.3secshop.cn" target="_blank">ҹƷþþþþ99</a>| <a href="http://www.sxmkw.cn" target="_blank">re99þþƷ99</a>| <a href="http://www.aystone.cn" target="_blank">պƷþĻ</a>| <a href="http://www.mt4.net.cn" target="_blank">޾Ʒרþþ</a>| <a href="http://www.xcfsfl.cn" target="_blank">þAvԴվ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>