﻿<?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-kukooBlog-随笔分类-Programming</title><link>http://www.blogjava.net/kukoo/category/1245.html</link><description>look to the master, follow the master, walk with the master, see through the master, become the master.</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 10:36:04 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 10:36:04 GMT</pubDate><ttl>60</ttl><item><title>Ruby on Rails: 随想一</title><link>http://www.blogjava.net/kukoo/archive/2007/01/04/91819.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 04 Jan 2007 10:57:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2007/01/04/91819.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/91819.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2007/01/04/91819.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/91819.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/91819.html</trackback:ping><description><![CDATA[
<p>利用假期在家的时间，找了一本书看，Manning出版的《Ruby for Rails - Ruby Techniques for Rails Developers》。 偶尔在网上googling一下RoR，找到这么一张有趣的图:</p>
<p style="TEXT-ALIGN: center"><a href="http://www.kompakar.com.cn/blog/wp-content/uploads/2007/01/ruby_java_books.jpg" rel="lightbox" title="ruby_java_books.jpg"><img src="http://www.kompakar.com.cn/blog/wp-content/uploads/2007/01/ruby_java_books.jpg" name="urn:zoundry:jid:ruby_java_books.jpg" title="ruby_java_books.jpg" height="412" width="500" alt="ruby_java_books.jpg" border="0" id="urn:zoundry:jid:ruby_java_books.jpg"/></a></p>
<p style="TEXT-ALIGN: left">这张图的意思大致也就是说，目前的图书中，关于Java, Java EE的书简直就是多如牛毛，而关于Ruby和RoR的书只有2本（我现在在看的，算是第3本吧，O'Reilly也有一本关于RoR的书，算是第4本）。 但是RoR这个新应用框架却正在以狂风暴雨之势席卷 Web 开发社区，特别是Java和PHP。</p>
<p>汇总一下网上的以及自己从书中看到的资料:</p>
<ol>
<li><strong>什么是Ruby?</strong><br/><p>Matsumoto Yukihiro （"Matz"）是Ruby这个编程语言的发明人，他从1993年起便开始着手Ruby的研发工作，1993年2月24日Ruby诞生，1995年12月Matz推出了Ruby的第一个版本Ruby 0.95。Ruby 是一种动态编程语言，它在许多方面类似于 Perl、Python 和 Smalltalk，但是它是自成体系的，Ruby成功的组合了Smalltalk的优雅以及Python的易用性，还有Perl的实用主义。Java 和 PHP 编程人员应该可以很轻松的掌握这一语言。</p>
<p>Ruby 的历史不短，先于在1995 年便为公众知晓的 Java 和 PHP。所以尽管 Ruby 是一个成熟的语言，却不如其它语言普及。这造成了 Ruby 编程语言阵营并不如 Java、PHP 和 Perl 阵营强大（这也是上面这张图展示出来的现状）。</p>
</li>
<li><strong>什么是Rails?</strong><br/><p>Rails是一个用来开发以数据库为后台的Web应用的开源框架。 David Heinemeier Hanson 发明的 Rails 框架是 Ruby 诞生以来最受欢迎的应用程序，Ruby 社区推广能力不济的颓势也得到了扭转。Rails 将 Ruby 编程语言扩展为极其适用于 Web 开发的领域特定语言。它还借用了 ActiveRecord 扩展，将对象关系持久性引入了 Ruby 语言。</p>
<p>Rails使用了严格的 Model-View-Controller (模式-视图-控制器)体系结构，赢得了自尊且醉心于设计模式的Java程序员的尊敬 - 这是 J2EE 开发人员对其情有独钟的原因； 同时 Rails 可以非常方便地构建基础系统 - 这是它吸引 PHP 开发人员的原因。</p>
<p>但Rails有它自己的一些薄弱的地方: 从数据库角度来看，Rails 有一些非常明显的缺陷。Rails 对数据库布局和应用程序需求作了许多假定。比如，Rails 假定所有表都使用一个非复合的主键。它不支持复合主键也不支持双步提交（two-phase commit），它只能用于单个数据库后端的情况。</p>
</li>
<li><strong>RoR的优势?</strong><br/><p>Ruby on Rails最大的优点就是在于简单！RoR的核心思想就是"更少的编程，更简单的配置！"</p>
<ul>
<li>安装和配置非常简单，不象Java需要安装运行环境，安装应用服务器，然后再进行一大堆的配置。Ruby只需要装一个简单的解释环境就可以了。RoR避免了繁杂的XML配置文件，你的应用程序和数据库里已经包含了所有Rails需要的东西。</li>
<li>编码简单，很多代码都是可以自动生成，可以自动生成MVC，可以自动生成框架、Web服务。甚至你只要写上一行代码就可以实现以前使用Java上百行代码的工作量，越少的编程量就意味着越少的bug。</li>
</ul>
<br/></li>
<li><strong>RoR稳定吗，适合企业应用吗?</strong>
<p>企业应用需要的是稳定和高效。 Ruby和PHP一样，属于解释性语言。 目前使用PHP来开发的Web应用，适合于企业应用的不少，blog系统和讨论组系统也都大量使用PHP。 配合Ruby的RoR在效率上应该没有什么问题。 至于稳定性，目前还没有什么实际的数据可以来讨论。</p>
</li>
</ol>
<p>【相关链接】</p>
<p><strong><span style="TEXT-DECORATION: underline">Ruby</span></strong>: <a href="http://www.ruby-lang.org/en/" class="externalLink" target="_blank">http://www.ruby-lang.org/en/</a><br/><strong><span style="TEXT-DECORATION: underline">Rails</span></strong>: <a href="http://www.rubyonrails.org/" class="externalLink" target="_blank">http://www.rubyonrails.org/</a></p>
<img src ="http://www.blogjava.net/kukoo/aggbug/91819.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2007-01-04 18:57 <a href="http://www.blogjava.net/kukoo/archive/2007/01/04/91819.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Groovy 1.0 正式发布</title><link>http://www.blogjava.net/kukoo/archive/2007/01/04/91821.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 04 Jan 2007 10:57:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2007/01/04/91821.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/91821.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2007/01/04/91821.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/91821.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/91821.html</trackback:ping><description><![CDATA[
<p>Groovy 1.0 <a href="http://glaforge.free.fr/weblog/?itemid=200" target="_blank" class="externalLink" title="Groovy 1.0 正式发布">正式发布</a>了。 正式的发布申明是这么写的:</p>
<blockquote>
<p>Groovy is a dynamic language for the JVM that integrates seamlessly with the Java platform. It offers a Java-like syntax, with language features inspired by Smalltalk, Python or Ruby, and lets your reuse all your Java libraries and protect the investment you made in Java skills, tools or application servers.</p>
</blockquote>
<p>很早以前就曾经关注过Groovy，还在Ruby和Groovy中犹豫过。 目前虽然在看一些Ruby和RoR的书籍和资料，Groovy还是不会忽略掉的，当然还有<a href="http://grails.org/" target="_blank" class="externalLink" title="Grails">Grails</a>，这个以Groovy写成的Web应用框架 (Groovy + Grails &amp; Ruby + Rails)。</p>
<p>【相关链接】</p>
<p>下载Groovy: <a href="http://dist.codehaus.org/groovy/distributions" target="_blank" class="externalLink" title="下载Groovy 1.0">http://dist.codehaus.org/groovy/distributions</a></p>
<p>About Groovy: <a href="http://www.aboutgroovy.com/item/list" target="_blank" class="externalLink" title="About Groovy">http://www.aboutgroovy.com/item/list</a><br/></p>
<img src ="http://www.blogjava.net/kukoo/aggbug/91821.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2007-01-04 18:57 <a href="http://www.blogjava.net/kukoo/archive/2007/01/04/91821.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;img src="http://static.flickr.com/16/20444369_df4dc5957b_o.gif" border=0 align="top"/&gt; 使用Eclipse中内嵌的Tomcat服务器</title><link>http://www.blogjava.net/kukoo/archive/2006/06/27/55332.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Tue, 27 Jun 2006 07:08:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2006/06/27/55332.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/55332.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2006/06/27/55332.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/55332.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/55332.html</trackback:ping><description><![CDATA[
<p>Eclipse带有其内置的Tomcat服务器，用于支持Eclipse的Help服务。 通常在打开Help页面的时候，Help系统会启动内置的Tomcat。我们在开发基于RCP的应用系统时，也同样可以通过API来启动并且使用这个内置的Tomcat服务器（尽管Eclipse没有提供相应的文档，并且不推荐使用这类功能）。</p>
<p>Eclipse的org.eclipse.help.internal.appserver包中，含有一个重要的类：WebappManager，几乎所有和Tomcat相关的操作，都和这个WebappManager有关，其中比较重要的几个方法是：</p>
<ol>
<li>getHost()，返回运行Tomcat的主机名或者IP地址</li>
<li>getPort()，返回Tomcat监听的端口号，这个端口号在每次Tomcat启动时，都不一样</li>
<li>start(String webappName, String pluginId, IPath path)，启动应用程序，其中的pluginId为包含web应用的插件ID（后面做详细解释）</li>
</ol>
<p>在了解了基本的方法以后，我们可以实验一下：</p>
<ol>
<li>创建一个插件(plug-in): com.kompakar.webapp，这个插件可以不需要UI的支持</li>
<li>插件com.kompakar.webapp需要依赖以下Eclipse插件：</li>
<li style="LIST-STYLE-TYPE: none">
<ol>
<li>org.eclipse.help.appserver</li>
<li>org.eclipse.help.base</li>
</ol>
</li>
<li>在com.kompakar.webapp目录下面，建立WEB-INF，WEB-INF/lib和WEB-INF/classes目录。 这里的WEB-INF目录结构和普通的web application完全一致，用于存放你的JSP，Servlet和classes。 如果你的web application需要其他库的支持，那么放在WEB-INF/lib下面。</li>
<li>启动Tomcat: WebappManager.start("myapp", "com.kompakar.webapp", Path.EMPTY); 在启动方法中:</li>
<li style="LIST-STYLE-TYPE: none">
<ol>
<li>第一个参数myapp就是web application的上下文目录；</li>
<li>第二个参数就是包含了web application的插件ID；</li>
</ol>
</li>
<li>得到完整的URL: "http://" + WebappManager.getHost() + ":" + WebappManager.getPort();</li>
<li style="LIST-STYLE-TYPE: none">
<ol>
<li>这个操作返回的结果可能是：http://127.0.0.1:52235，最后的端口号是随机的</li>
</ol>
</li>
</ol>
<p>OK，如果你启动了你的插件，并且在WEB-INF下面有一个简单的index.jsp的话，打开你的浏览器，打开: http://127.0.0.1:52235/myapp，那么你就可以看到你的index.jsp了。 如果你的插件同时捆绑了Eclipse的Web Browser插件的话，你就可以在你的插件里打开浏览器，直接访问你的web application了。</p>
<p>这样做有什么好处吗？ 其中的一个好处是，你可以把支持web的报表系统（比如BIRT)安装在一个特殊的插件中，那么你的桌面RCP系统就有一个支持web的报表系统了，你可以通过启动Tomcat来使用你的报表。</p>
<p>【参考文章】<a href="http://www.eclipsezone.com/eclipse/forums/t62852.html" class="externalLink" target="_blank">Use Embedded Tomcat in Eclipse for a Webapp</a></p>
<p class="zoundry_bw_tags">
  <!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com -->
  <span class="ztags"><span class="ztagspace">Technorati</span> : <a href="http://technorati.com/tag/eclipse" class="ztag" rel="tag">eclipse</a></span> 
</p><img src ="http://www.blogjava.net/kukoo/aggbug/55332.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2006-06-27 15:08 <a href="http://www.blogjava.net/kukoo/archive/2006/06/27/55332.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;img src="http://static.flickr.com/16/20444370_974742af75_o.gif" border=0 align="top"/&gt; Top 5 Principles of Enterprise Architecture</title><link>http://www.blogjava.net/kukoo/archive/2005/08/28/11361.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Sun, 28 Aug 2005 03:07:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/08/28/11361.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/11361.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/08/28/11361.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/11361.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/11361.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 企业级架构最关键的原则问题是什么。 这些“大腕”一共总结出来40条，然后投票得出了最关键的5条 (Top 5 Principles of Enterprise Architecture)&nbsp;&nbsp;<a href='http://www.blogjava.net/kukoo/archive/2005/08/28/11361.html'>阅读全文</a><img src ="http://www.blogjava.net/kukoo/aggbug/11361.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-08-28 11:07 <a href="http://www.blogjava.net/kukoo/archive/2005/08/28/11361.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ted Neward 的读书清单</title><link>http://www.blogjava.net/kukoo/archive/2005/08/23/10773.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Tue, 23 Aug 2005 02:50:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/08/23/10773.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/10773.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/08/23/10773.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/10773.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/10773.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Ted Neward, 畅销书 Efective Enterprise Java 作者, 在他自己的新blog中给出了一份Recommended Reading List。Ted 说这是一个非常“旧”的读书清单了，但是还是可以参考一下的。 &nbsp;&nbsp;<a href='http://www.blogjava.net/kukoo/archive/2005/08/23/10773.html'>阅读全文</a><img src ="http://www.blogjava.net/kukoo/aggbug/10773.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-08-23 10:50 <a href="http://www.blogjava.net/kukoo/archive/2005/08/23/10773.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;img src="http://photos17.flickr.com/20444371_203e5a75b6_m.jpg" border=0 align="top"/&gt; Groovy on JavaOne 2005</title><link>http://www.blogjava.net/kukoo/archive/2005/06/30/6961.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 30 Jun 2005 12:22:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/30/6961.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/6961.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/30/6961.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/6961.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/6961.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Groovy这个新近的脚本语言（其实也不是很新了），在JavaOne 2005上又被热炒了一回。 来自OpenLogic, Inc的Rod Cope在Day 1做了Groovy的技术讲座：Groovy = Java Technology + Ruby + Python for JVM，同时演示了一些Groovy的强项和最新的功能，比如操作Excel工作表单，通过Groovy的脚本，在Groovy的控制台中，向一个Excel的表单中添加数据（当然是通过MS COM接口的）。 Artima.com上也发表了Eric Armstrong的一篇文章：It’s a Groovy Day。 [<a href="http://kukoo.blogsome.com/2005/06/30/groovy-on-javaone-2005/" class="externalLink">阅读全文</a>]&nbsp;&nbsp;<a href='http://www.blogjava.net/kukoo/archive/2005/06/30/6961.html'>阅读全文</a><img src ="http://www.blogjava.net/kukoo/aggbug/6961.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-30 20:22 <a href="http://www.blogjava.net/kukoo/archive/2005/06/30/6961.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;img src="http://photos17.flickr.com/20444371_203e5a75b6_m.jpg" border=0 align="top"/&gt; JavaOne Day 0: NetBeans Day</title><link>http://www.blogjava.net/kukoo/archive/2005/06/27/6780.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Mon, 27 Jun 2005 09:34:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/27/6780.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/6780.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/27/6780.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/6780.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/6780.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: java.net上已经充满了各种关于JaveOne 2005的blog了。 而且，NetBeans Day 0先于JavaOne在昨天就举行了。 我虽然不是NetBeans的“fans”，但是这个优秀的IDE还是吸引了我去看相关的blog...... [<a href="http://kukoo.blogsome.com/2005/06/27/javaone-day-0-netbeans-day/" class="externalLink">详细阅读</a>]&nbsp;&nbsp;<a href='http://www.blogjava.net/kukoo/archive/2005/06/27/6780.html'>阅读全文</a><img src ="http://www.blogjava.net/kukoo/aggbug/6780.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-27 17:34 <a href="http://www.blogjava.net/kukoo/archive/2005/06/27/6780.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;img src="http://photos16.flickr.com/20444370_974742af75_m.jpg" border=0 align=top/&gt; Patterns and Practice [Erich Gamma] </title><link>http://www.blogjava.net/kukoo/archive/2005/06/26/6724.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Sun, 26 Jun 2005 09:30:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/26/6724.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/6724.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/26/6724.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/6724.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/6724.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 这是Artima Developer的总编 Bill Venners对Erich Gamma的采访中的第四部分。 在第四部分中，Bill和Erich讨论了设计模式如何与解决问题相配对，设计模式如何帮助你理解问题解决的意图以及pattern本身的不足之处，最后如何通过练习成为一个好的设计师。&nbsp;&nbsp;<a href='http://www.blogjava.net/kukoo/archive/2005/06/26/6724.html'>阅读全文</a><img src ="http://www.blogjava.net/kukoo/aggbug/6724.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-26 17:30 <a href="http://www.blogjava.net/kukoo/archive/2005/06/26/6724.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt="ProgrammingIcon" src="http://photos17.flickr.com/20444371_203e5a75b6_m.jpg" border=0 align=top&gt; 2005 June WebSphere Dev Tech Journal</title><link>http://www.blogjava.net/kukoo/archive/2005/06/22/6573.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Wed, 22 Jun 2005 13:53:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/22/6573.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/6573.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/22/6573.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/6573.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/6573.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: The June 2005 issue of IBM WebSphere Developer Technical Journal is now available.&nbsp;&nbsp;<a href='http://www.blogjava.net/kukoo/archive/2005/06/22/6573.html'>阅读全文</a><img src ="http://www.blogjava.net/kukoo/aggbug/6573.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-22 21:53 <a href="http://www.blogjava.net/kukoo/archive/2005/06/22/6573.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt="ProgrammingIcon" src="http://photos17.flickr.com/20444371_203e5a75b6_m.jpg" border=0 align=top&gt; [收藏] “那本”J2EE书</title><link>http://www.blogjava.net/kukoo/archive/2005/06/22/6572.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Wed, 22 Jun 2005 13:48:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/22/6572.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/6572.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/22/6572.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/6572.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/6572.html</trackback:ping><description><![CDATA[<DIV id=main>
<DIV class=post>
<DIV class=postText>
<DIV align=left>
<P>目前正在重读《Core J2EE Patterns》这本书。经历了几年的编程生活和系统设计，重读这本书的第二版，感触良多。 恰好看到<A href="http://blog.csdn.net/gigix/">gigix</A>在blog中发表的<A href="http://blog.csdn.net/gigix/archive/2005/02/25/301690.aspx">“那本”J2EE书——《J2EE核心模式》（第二版）译者序</A> 。 虽然我很少看中文的技术书籍，但是这篇译者序却值得收藏，收录在自己的blog中。借此，感谢译者翻译这本书，为广大的中国程序员带来了一本好书。</P></DIV>　</DIV>
<DIV align=center><SPAN style="FONT-SIZE: 20pt; LINE-HEIGHT: 32pt"><B><FONT color=#ff0000>“那本”J2EE书</FONT></B></SPAN></DIV>
<DIV class=font1 align=center>　</DIV>
<DIV class=font1 align=center>刘天北　熊节<BR>　</DIV>
<DIV align=center><FONT color=#ff3300>（原文刊登于《中华读书报》2005年2月23日号）</FONT><BR>　
<HR width=590 color=#638db8 SIZE=1>
 </DIV><!--enpcontent-->
<P><IMG alt="" hspace=0 src="http://images.amazon.com/images/P/0131422464.01._PIdp-schmoo2,TopRight,7,-26_SCMZZZZZZZ_.jpg" align=right border=0>　　翻开这本《J2EE核心模式》，你首先就会注意到软件方法论领域的两位大师GradyBooch和MartinFowler撰写的序言。在这样两份序言后面再附上一篇“译序”，这个念头本身就足够荒谬和僭越，不啻于在莎翁之后再写一出关于丹麦王子复仇的剧本。大师们的判断是中肯而毫不含糊的：“没有这本书，就别开发EJB。”他们的担保足以确认本书在其论域中舍我其谁的地位。它就是“那本”J2EE书（THEJ2EEbook）。 </P>
<P>　　当然，对于广大中国开发者而言，我们早就已经在“没有这本书”的条件下开发了大量J2EE、乃至EJB应用系统。那些充满了波折和磨难的开发历程似乎让不少程序员产生了某种自信；在掌握了若干API细节、若干应用服务器配置诀窍、若干框架类库用法之后，他们或是公开、或是暗自地把自己当成了当之无愧的Java企业开发专家———不，这些话没有任何揶揄的意思：我们想说的其实是，本书恰恰是为以上这一类开发者写的。对于他们想成为 “Java企业开发专家”的隐秘欲望，这本《J2EE核心模式》就是最大限度的补救和成全。如果说，此前的各种教程都是在介绍J2EE开发中的“内容”要素———也就是，教给我们“做什么”———的话，本书关注的则是这里的“形式”要素，是“怎样做”才能开发出高效的、优雅的J2EE系统。读者从中学到的，将不仅仅是“J2EE技术”，而是“如何使用J2EE技术进行设计”。 </P>
<P>　　换句话说，如果你以前没有过J2EE实践，但明早将应聘一个需要“1年J2EE开发经验”的职位，本书中不包含你今晚要彻夜吞咽的那一类知识；相反，如果你，这位隐形的“Java企业开发专家”，追求的职位是“资深Java应用系统架构师”，如果你预料到未来的上司明天将问起“怎样实现访问控制”、“何时采用细粒度的接口设计”等“高阶”问题，那么恭喜你，今晚———乃至今后———你选对了补课的读物。 </P>
<P>　　作为本书第一版的忠实读者，我们（半是欣喜、半是惊讶）发现眼前的这部第二版构成了全新的阅读经验。作者们按照最新版J2EE技术规范（尤其是EJB2.1）全面修订了技术细节；根据模式社区的研究交流，作者们补入了若干模式；即使是一些不涉及技术更新的部分，论述方式、示例也完全不同于第一版；原有的PSA项目（第一版“尾声”一章）融入了其余各章的“示例代码”部分；而新增的整整一章讨论“微架构”的尾声、对WebService 等技术的关注、对各种的持久化方案（定制持久化、EJB、JDO等）的深入讨论，都体现出作者们对本书新版的持续投入。 </P>
<P>　　受益于本书有年，在此我们也想不揣冒昧地为本书的中国读者们建议一条高效的阅读路径：与第一章相比，第五章“J2EE模式概览”是读者更合理的起步点。请尤其关注其中对“分层”、“术语”和模式/策略区别的讨论，这些都是贯穿全书的重要概念！其次，应该通读第二章“表现层设计考虑和不佳实践”和第三章“业务层设计考虑和不佳实践”：即使你不打算使用任何模式，甚至，即使你根本不关心J2EE开发，只要你的工作与分布式企业应用系统有关，这两章考察的问题都是你迟早会遇到的。至于每个具体模式本身，我们则推荐读者留意其中详尽的“策略”部分和那些散布其中的“设计手记”。前者讨论了对同一个模式的多种实现方案，后者则突出介绍了特定开发领域的一些核心概念和考虑。 </P>
<P>　　一部英文技术论著在汉语中的旅行，永远是一段难以捉摸的行程。对于本书的汉语译者，“技术难度”并非挑战：全书讨论的正是译者们最为熟知的一个领域，所以我们能够负责任地说，在这个中译本里，没有任何技术细节会因为译者的无知或生疏而发生变形或曲解。这次翻译的原则和前提是对原文的彻底领会。 </P>
<P>　　事实上，译者的工作中遇到的困难主要发生在“语汇”层面。简单地说，J2EE专著的译者总要面对“翻，还是不翻”的两难处境：对象、函数的名称，UML图中的各种元素，这些内容由英语表示早就是约定俗成，即使是英语程度略低的开发者大概也都能读懂，所以，在读者能够理解的部分尽可能保留原文似乎是一种合理的做法———毕竟开发工作最终是与代码有关，而代码则肯定是要出之以“英文”的。但在另一方面，翻译的责任就在于让不谙原文的读者也能通达作品，如果译文中大量段落（不包括示例代码）都仍保留为英文或“类英文”，那么读者也就无法直观地获得原文包含的信息。反复权衡之后，在这个译本中译者的解决方式还是折衷的。工作中我们采取了以下原则： </P>
<P>　　首先，术语尽可能采用通用文献定译，不自创译法。对于各个模式的名称、模式文档模版各部分名称、重构手法名称，我们参考了李英军等译《设计模式》、熊节等译《重构》等译作，以及IBMDe鄄veloperWorks中文网站的部分资源。 </P>
<P>　　其次，本领域的一些常见术语，如果没有定译，本书也不自我作古、强译为中文，而是保留英文原字。这一类的术语包括：applet、 servlet、bean、entitybean、sessionbean、cookie、WebService等。根据我们的观察，在日常工作中，国内的开发者已经习惯按原文使用以上术语。在一些情况下，我们也以注释形式澄清了这些术语的用法。 </P>
<P>　　第三，模式中的对象名称，往往按照代码风格命名，比如“BusinessObject”、“CustomerTO”等。如果对此完全不加翻译，那么很多充斥这类表达的段落就很难理解。我们的原则是，在每个自然段第一次出现某个这类表达方式时，用括号注明，比如 “BusinessObject（业务对象）”、“CustomerTO（客户传输对象）”等。希望这个做法能够维持易懂和简洁之间的平衡。 </P>
<P>　　第四，书中示例代码占有相当大的比重，而代码注释则是理解这些代码的关键。我们把所有代码注释译为中文。而对在视图中显示特定结果的代码（比如调试信息等），我们没有改为中文，只是在必要时对输出信息的涵义加以注解。如果读者更信赖代码原貌，还可以从本书官方网站http //www.corej2eepatterns.com/下载。 </P>
<P>　　第五，原书不包含注释。目前的所有注解都是译注。书中申义未畅处，译文中以方括号“ ”加以解释、补足，略去生涩。这与上面两条原则一样，都类似于在原作讲话时的插嘴———但翻译任务本身，似乎本就已经是一种“插嘴”了。在博学的读者看来，有时候译者或许还不如保持体面的沉默———但我们只能力图做到插嘴而不多嘴。 </P>
<P>　　原书经多人、多版修订完成，难免存在打字、排印错误。译本根据本书官方网站的最新勘误表订正，并结合参照本书第一版，另外修正了数十处错误。 </P>
<P>　　（本文为即将于2005年3月出版的《J2EE核心模式》中文版的译序，本报刊登时有删节）</P></DIV></DIV><img src ="http://www.blogjava.net/kukoo/aggbug/6572.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-22 21:48 <a href="http://www.blogjava.net/kukoo/archive/2005/06/22/6572.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=PatternIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_PatternsIcon.gif" border=0 align=top&gt; 读 Design Principles from Design Patterns 心得</title><link>http://www.blogjava.net/kukoo/archive/2005/06/11/5904.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Sat, 11 Jun 2005 03:53:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/11/5904.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5904.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/11/5904.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5904.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5904.html</trackback:ping><description><![CDATA[<P>Erich在他和Bill的访谈第三部分中谈到，他希望支持Eclipse的整个社群，可以维持10到20年的生命期（“ We always keep in mind as we design Eclipse that it has to last ten or twenty years. ….. I really mean that Eclipse should still be able to support an active community in ten or twenty years. ”），甚至更长（虽让他不敢奢望Eclipse社群会像埃及的金字塔一样保存上千年）。这种想法，现在确实已经非常普遍了，就连Sun的首席执行官Jonathan Schwartz也认为，“you can compete against a product, but it's close to impossible to compete against a community. （和一个产品竞争容易，但是和一个社群竞争几乎接近不可能）”（<A href="http://blogs.sun.com/roller/page/jonathan/20050528#random_cool_things">Ecology, Communities and Platform Adoption</A>）。所以，Sun也在不断的培养Solaris和Netbean的开发和使用者的社群。 
<P>Eclipse需要保持竞争力，关键也在于开发和使用者的这个社团。 Eclipse的plug-in架构，已经保证了这个社群会很快的成长（因为会有大量的开发者去写plug-in），大公司（如IBM，BEA，Borland）的加入和支持，也扩大了Eclipse的知名度，使得更多的开发者加入进去。 但是如何更好的融合这个社群，如何保证Eclipse的核心基础架构不受外部的困惑（变得更加庞大，或者臃肿）但又会不断创新，如何协调好Eclipse和其他Eclipse.org下面的顶级项目（如BIRT，WTP，AspectJ等）的整合关系，这些，确实也值得思考。 
<P>对interface编程，这个似乎是个老生常谈的问题了，但是却从来没有思考过，这种编程方式会影响到这个开发团队的协同工作，特别是一个超过10人的开发团队，而对一个分布在不同地方的开发团队（比如项目外包以后，不同的开发小组位于不同的城市，甚至国家），这种编程方式带来的影响更大。 
<P>为什么会这样呢？ 在一个只有3-4人的开发团队里面，任何的改动，可以快速的通知其他的人，而且，现在IDE中的重构工具会解决大部分的工作。 但是，当一个开发团队变大的时候，通常就会分成小组，不同的小组对不同的部分负责。 在这种情况下，你在自己的模块中发布了API，你就必须确保这个API是稳定的。“Once you have published an API then it is your responsibility to keep them stable. Otherwise you will break the other components and nobody is able to make progress. Having stable APIs is a key to making progress in a project of this size.” 所以这是一个是否把API发布以及发布了以后如何维护的问题：“So it's the difference, as Martin Fowler would say, between public and published. Something can be public, but that doesn't mean you have <I>published</I> it. ” 即使定义了API，公开发布(publish)和这个API是公共的(public)是有区别的：API公开发布以后，就需要非常的小心，因为任何的API改动都可能会破坏其他在使用这个API的代码。 <BR>
<P><FONT size=1><A href="mailto:?subject=kukooWeb:Read Design Principles from Design Patterns"><BR>Email this store to a friend</A> (send a short email with a subject to this story)<BR><A href="http://www.blogjava.net/kukoo/Rss.aspx">Subscribe to kukooBlog</A> (subscribe kukooBlog's RSS feed)<BR><A href="mailto:hello_kukoo@hotmail.com?subject=Re:Read Design Principles from Design Patterns">Send me feedback on this story</A> </FONT>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/eclipse" rel=tag align="top"><FONT size=2>Eclipse</FONT></A>，<A href="http://technorati.com/tag/designpattern" rel=tag align="top"><FONT size=2>Design Pattern</FONT></A> <A href="http://www.technorati.com/cosmos/search.html?rank=&url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F06%2F11%2F5904.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A> <A href="http://www.technorati.com/ping.html?url=http://www.blogjava.net/kukoo/archive/2005/06/11/5904.html"><IMG height=16 alt=refresh.gif src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/refresh.gif" width=16 border=0></A> <BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A> </P></I></I><img src ="http://www.blogjava.net/kukoo/aggbug/5904.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-11 11:53 <a href="http://www.blogjava.net/kukoo/archive/2005/06/11/5904.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=PatternIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_PatternsIcon.gif" border=0 align=top&gt; Design Principles from Design Patterns</title><link>http://www.blogjava.net/kukoo/archive/2005/06/07/5704.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Tue, 07 Jun 2005 11:37:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/07/5704.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5704.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/07/5704.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5704.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5704.html</trackback:ping><description><![CDATA[这是Artima Developer的总编 Bill Venners对Erich Gamma的采访中的第三部分。Bill 和 Erich 讨论了设计模式中的两个原则：对接口编程(program to an interface), 使用object composition而不是类继承。 在前两部分中，Bill和Erich讨论了<A href="http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html"><U>如何思考和使用Design Pattern</U></A>和<A href="http://www.blogjava.net/kukoo/archive/2005/05/31/5369.html"><U>灵活性以及可重用性</U></A>。 
<P>将陆续更新一些心得。 
<P><A href="http://www.artima.com/lejava/articles/designprinciples.html"><U>第三部分的原文</U></A>。 
<P><BR><BR><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top">Software</A>，<A href="http://technorati.com/tag/designpattern" rel=tag align="top">Design Pattern</A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/cosmos/search.html?rank=&amp;url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F06%2F07%2F5704.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5704.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-07 19:37 <a href="http://www.blogjava.net/kukoo/archive/2005/06/07/5704.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; [转译]Pay less for Strings</title><link>http://www.blogjava.net/kukoo/archive/2005/06/03/5496.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Fri, 03 Jun 2005 01:04:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/03/5496.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5496.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/03/5496.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5496.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5496.html</trackback:ping><description><![CDATA[<P><A href="http://www.eclipsepowered.org/archives/2005/03/25/pay-less-for-strings/"><U>这是在eclipsepowered上看到的</U></A>。 Ed提到了<A href="http://www.eclipse.org/mail/index.html"><U>eclipse-dev committers mailing list</U></A>中，Jerome Lanneluc 指出的一个String#substring和String(String)的问题。按照Jerome的说法，使用String#substring()的时候，原有的长字符串所占据的空间仍然被占据，并没有释放，使用String(String)可以解决这个问题。Jerome的原文：</P>
<BLOCKQUOTE>
<P>I just noticed that String#substring(…) shares the underlying char array. So if you have a big string, take a substring of it, throw away the big string, you will still hold on the big char array. A simple way to solve this is to make a copy of the substring using the String(String) constructor.</P>
<P>I saved 550KB in JDT Core by changing the following code:<CODE></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">String&nbsp;simpleName&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"><BR>fullyQualifiedName.substring(fullQualifiedName.lastIndexOf(</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">.</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">));<BR></SPAN></DIV></DIV>
<P></CODE>to<CODE></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">String&nbsp;simpleName&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"><BR>String(fullyQualifiedName.substring(fullQualifiedName.lastIndexOf(</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">.</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">)));&nbsp;<BR></SPAN></DIV></DIV></BLOCKQUOTE>
<P></CODE>Eclipse3.1发布以后，使用者发现，<A href="http://www.eclipsepowered.org/archives/2004/11/30/eclipse-grand-challenges/"><U>3.1占据了大量的Heap（大约200-300M）</U></A>。Eclipse的开发小组正在不断地解决这个问题，而String#substing的改进，将在Eclipse 3.1M6中发布(4月1日)。 </P>
<P>这个提示，其实也可以运用在我们自己的项目之中 
<P>[Note: This blog was migrated from my old CSDN blog.] 
<P>为什么重发这个blog呢？因为昨天看到Eclipse.org网站上关于<A href="http://www.eclipse.org/eclipse/development/performance/bloopers.html"><U>Eclipse Performance</U></A>的一个文档。这份文档主要是提示，在开发基于Eclipse的应用时（不管是Eclipse程序本身，还是Plug-in），在性能问题上需要注意的一些地方。其中，第一条就是如何使用substring()的问题。Eclipse 3.1M7以及RC1，都已经进行了这方面的调整，所以现在的Eclipse，对Heap的占用已经大幅减少，从而在性能上也有所提高。 <BR></P>
<P><BR><BR><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://www.eclipse.org/"><FONT size=2>Eclipse.org</FONT></A><BR><A href="http://www.eclipsepowered.org/"><FONT size=2>eclipsepowered.org</FONT></A> 
<P><FONT size=1><A href="mailto:?subject=kukooWeb:Pay less for Strings">Email this store to a friend</A> (send a short email with a subject to this story)<BR><A href="http://www.blogjava.net/kukoo/Rss.aspx">Subscribe to kukooBlog</A> (subscribe kukooBlog's RSS feed)<BR><A href="mailto:hello_kukoo@hotmail.com?subject=Re:Pay less for Strings">Send me feedback on this story</A> </FONT>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/eclipse" rel=tag align="top"><FONT size=2>Eclipse</FONT></A>，<A href="http://technorati.com/tag/java" rel=tag align="top"><FONT size=2>Java</FONT></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1242.html"><FONT size=2>Eclipse</FONT></A>，<A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5496.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-03 09:04 <a href="http://www.blogjava.net/kukoo/archive/2005/06/03/5496.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; Ruby IDE in Eclipse</title><link>http://www.blogjava.net/kukoo/archive/2005/06/02/5465.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 02 Jun 2005 05:47:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/02/5465.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5465.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/02/5465.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5465.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5465.html</trackback:ping><description><![CDATA[Recently, I am reading a book about Ruby Programming (see my sidebar was changed to display the book's cover). When installing the Ruby for Windows, the Ruby IDE, FreeRIDE, would be installed. It is free and quite a good small IDE for Ruby. 
<P>Luckily, today I found another Ruby IDE which is based on Eclipse, which name is RDE (Ruby Development Environment). <BR>
<P><BR><BR><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://rubyeclipse.sourceforge.net/"><FONT size=2>RDE</FONT></A><BR><A href="http://www.ruby-doc.org/"><FONT size=2>About Ruby</FONT></A> </P>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top"><FONT size=2>Software Programming</FONT></A>，<A href="http://technorati.com/tag/ruby" rel=tag align="top"><FONT size=2>Ruby</FONT></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5465.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-02 13:47 <a href="http://www.blogjava.net/kukoo/archive/2005/06/02/5465.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; The Business Layer</title><link>http://www.blogjava.net/kukoo/archive/2005/06/02/5445.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 02 Jun 2005 01:19:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/02/5445.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5445.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/02/5445.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5445.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5445.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">The middle component of a typical web application is the business or service layer. This service layer is often the most ignored layer from a coding perspective. It is not uncommon to find this type of code scattered around in the UI layer or in the persistence layer. This is not the correct place because it leads to tightly coupled applications and code that can be hard to maintain over time. Fortunately, several frameworks exist that address these issues. Two of the most popular frameworks in this space are Spring and PicoContainer. ........</P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">..... The business layer should be responsible for the following:</P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 1in; DIRECTION: ltr; unicode-bidi: embed" type=disc>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Handling application business logic and business validation </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Managing transactions </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Allowing interfaces for interaction with other layers </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Managing dependencies between business level objects </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Adding flexibility between the presentation and the persistence layer so they do not directly communicate with each other </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Exposing a context to the business layer from the presentation layer to obtain business services <BR>Managing implementations from the business logic to the persistence layer </SPAN></LI></UL>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: Verdana; mso-outline-level: 2">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1"><SPAN lang=EN-US>Excerpt from </SPAN><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue">"Wiring Your Web</SPAN></A><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue"> </SPAN></A><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue">Application with Open Source Java"</SPAN></A><SPAN lang=EN-US> by </SPAN><A href="http://www.oreillynet.com/pub/au/1804"><SPAN lang=ZH-CN style="COLOR: blue">Mark Eagle</SPAN></A></P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; mso-outline-level: 1"><SPAN lang=EN-US style="FONT-FAMILY: Georgia">[Note</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: 宋体">：</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Georgia">This blog was migrated from my very old blog which was in the blogspirit.]<BR></SPAN></P>
<P><BR><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top">Software Programming</A>，<A href="http://technorati.com/tag/opensource" rel=tag align="top">Open Source</A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5445.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-02 09:19 <a href="http://www.blogjava.net/kukoo/archive/2005/06/02/5445.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; The Presentation Layer</title><link>http://www.blogjava.net/kukoo/archive/2005/06/02/5444.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 02 Jun 2005 01:17:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/02/5444.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5444.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/02/5444.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5444.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5444.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">At one end of a typical web application is the presentation layer. Many Java developers understand what Struts provides. However, too often, coupled code such as business logic is placed into an org.apache.struts.Action. So, let's agree on what a framework like Struts should provide. Here is what Struts is responsible for:</P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 1in; DIRECTION: ltr; unicode-bidi: embed" type=disc>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Managing requests and responses for a user. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Providing a controller to delegate calls to business logic and other upstream processes. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Handling exceptions from other tiers that throw exceptions to a Struts Action. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Assembling a model that can be presented in a view. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Performing UI validation. </SPAN></LI></UL>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">Here are some items that are often coded using Struts but should not be associated with the presentation layer:</P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 1in; DIRECTION: ltr; unicode-bidi: embed" type=disc>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Direct communication with the database, such as JDBC calls. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Business logic and validation related to your application. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Transaction management. </SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Introducing this type of code in the presentation layer leads to type coupling and cumbersome maintenance.</SPAN></LI></UL>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Georgia; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1"><SPAN lang=EN-US>Excerpt from </SPAN><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue">"Wiring Your Web</SPAN></A><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue"> </SPAN></A><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue">Application with Open Source Java"</SPAN></A><SPAN lang=EN-US> by </SPAN><A href="http://www.oreillynet.com/pub/au/1804"><SPAN lang=ZH-CN style="COLOR: blue">Mark Eagle</SPAN></A></P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; mso-outline-level: 1"><SPAN lang=EN-US style="FONT-FAMILY: Georgia">[Note</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: 宋体">：</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Georgia">This blog was migrated from my very old blog which was in the blogspirit.]<BR></SPAN></P>
<P><BR><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top">Software Programming</A>，<A href="http://technorati.com/tag/opensource" rel=tag align="top">Open Source</A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5444.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-02 09:17 <a href="http://www.blogjava.net/kukoo/archive/2005/06/02/5444.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; The Persistence Layer</title><link>http://www.blogjava.net/kukoo/archive/2005/06/02/5443.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 02 Jun 2005 01:14:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/02/5443.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5443.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/02/5443.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5443.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5443.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">.... At the other end of a typical web application is the persistence layer. .... There are several open source object-to-relational mapping (ORM) frameworks that solve much of this problem. In particular, the Hibernate framework allows object-to-relational persistence and query service for Java. Hibernate has a medium learning curve for Java developers who are already familiar with SQL and the JDBC API. Hibernate persistent objects are based on plain-old Java objects and Java collections. ..... The following list contains the type of code that you would write inside a persistence framework:</P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 1in; DIRECTION: ltr; unicode-bidi: embed" type=disc>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Querying relational information into objects. Hibernate does this through an OO query language called HQL, or by using an expressive criteria API. HQL is very similar to SQL except you use objects instead of tables and fields instead of columns. There are some new specific HQL language elements to learn; however, they are easy to understand and well documented. HQL is a natural language to use for querying objects that require a small learning curve.</SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Saving, updating, and deleting information stored in a database.</SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Advanced object-to-relational mapping frameworks like Hibernate have support for most major SQL databases, and they support parent/child relationships, transactions, inheritance, and polymorphism.</SPAN></LI></UL>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">Here are some items that should be avoided in the persistence layer:</P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<UL style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 1in; DIRECTION: ltr; unicode-bidi: embed" type=disc>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">Business logic should be in a higher layer of your application. Only data access operations should be permitted.</SPAN></LI>
<LI style="MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle; mso-outline-level: 2"><SPAN style="FONT-FAMILY: Georgia">You should not have persistence logic coupled with your presentation logic. Avoid logic in presentation components such as JSPs or servlet-based classes that communicate with data access directly. </SPAN></LI></UL>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1">By isolating persistence logic into its own layer, the application becomes flexible to change without affecting code in other layers. For example, Hibernate could be replaced with another persistence framework or API without modification to the code in any other layer.</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; COLOR: blue; FONT-FAMILY: Georgia; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Georgia; mso-outline-level: 1"><SPAN lang=EN-US>Excerpt from </SPAN><A href="http://www.onjava.com/lpt/a/4744"><SPAN lang=ZH-CN style="COLOR: blue">"Wiring Your Web Application with Open Source Java"</SPAN></A><SPAN lang=EN-US> by </SPAN><A href="http://www.oreillynet.com/pub/au/1804"><SPAN lang=ZH-CN style="COLOR: blue">Mark Eagle</SPAN></A> </P>
<P lang=ZH-CN style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1">&nbsp;</P>
<P style="FONT-SIZE: 10pt; MARGIN: 0in; mso-outline-level: 1"><SPAN lang=EN-US style="FONT-FAMILY: Georgia">[Note</SPAN><SPAN lang=ZH-CN style="FONT-FAMILY: 宋体">：</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Georgia">This blog was migrated from my very old blog which was in the blogspirit.]</SPAN></P>
<P><BR><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top">Software Programming</A>, <A href="http://technorati.com/tag/opensource" rel=tag align="top">Open Source</A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5443.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-02 09:14 <a href="http://www.blogjava.net/kukoo/archive/2005/06/02/5443.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=AllIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_AllIcon.gif" border=0 align=top&gt; Computing Thoughts - Bruce Eckel 的 Weblog</title><link>http://www.blogjava.net/kukoo/archive/2005/06/01/5416.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Wed, 01 Jun 2005 07:20:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/01/5416.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5416.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/01/5416.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5416.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5416.html</trackback:ping><description><![CDATA[<A href="http://www.artima.com/weblogs/index.jsp?blogger=beckel"><U>Bruce Eckel</U></A> （Think in Java 和 Think in C++的作者，被Eric Raymond称为将未公开发表的书在网上发表的“第二人”）将他的Weblog移到了Artima的blog系统中。 
<P>Bruce原来的blog: On the Thought就是我常看的一个blog之一，原因不仅仅是因为Bruce是Think in Java的作者，他也在blog中发表了相当有意思的帖子。 
<P>而Aitima的blog系统也挺有意思的：你发表评论的时候，像是在一个论坛里面（那种很像BBS的论坛）。我没有找到如何trackeback Bruce的weblog，但是这种发表评论的作法，确实新颖。按照Bruce的介绍，在发表评论的时候，也不是任何东西都可以发表的（要不就变成了“blog spam”），因为Aritima Blog建立了一种机制，“keep the discussions civilized ”，而且Artima更注重开发者。这两点，是Bruce迁移他的blog的原因。 
<P>如果你也关注Bruce Eckel，去他新的<A href="http://www.artima.com/weblogs/index.jsp?blogger=beckel"><U>Webblog</U></A>吧。 <BR>
<P><BR><BR><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://www.bruceeckel.com/"><FONT color=#0000ff size=2>Bruce Eckel的homepage</FONT></A><BR><A href="http://www.artima.com/weblogs/feeds/bloggers/beckel.rss"><FONT color=#0000ff size=2>Bruce Eckel的Weblog Feed</FONT></A> 
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/blog" rel=tag align="top"><FONT size=2>blog</FONT></A><FONT size=2>，</FONT><A href="http://technorati.com/tag/software" rel=tag align="top"><FONT size=2>Software Programming</FONT></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1246.html"><FONT size=2>Blog/RSS</FONT></A><FONT size=2>，</FONT><A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5416.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-01 15:20 <a href="http://www.blogjava.net/kukoo/archive/2005/06/01/5416.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; Struts 5 岁了!</title><link>http://www.blogjava.net/kukoo/archive/2005/06/01/5405.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Wed, 01 Jun 2005 05:18:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/06/01/5405.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5405.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/06/01/5405.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5405.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5405.html</trackback:ping><description><![CDATA[Struts 5岁了。 
<P>Craig R. McClanahan 说，Struts的第一个版本，是在5年前的那个纪念日（Memorial Day ，美国的公共假日）的周末（大约是2000年5月底的时候），在他的一次旅行中，在他笔记本电脑中写的（ "the first version of the actual code (for Struts) was written (on) my laptop (during) a Memorial Day weekend vacation trip (end of May, 2000)" ，摘自 <A href="http://struts.apache.org/volunteers.html"><U>http://struts.apache.org/volunteers.html</U></A> ) 
<P>我第一接触Struts，大约在2001年的年中。那时候，我刚好结束了一个项目（我的第一个J2EE项目），基本上是以Sun的PetStore的设计思想开发的（其实，PetStore已经含有MVC 2的思想了）。我的一个朋友推荐我看看Struts。我一下子就被Struts简单，灵活而又高效的设计思路吸引了，特别是看到ActionForm可以“自动的”得到页面的输入，而不需要自己写大量的request.getAttribute()的时候，几乎喜出望外了。当时，还没有足够多的Struts的资料，市面上可以买到的，也只有O'Reilley出版的唯一的一本关于Struts的书籍。但是我还是毫不犹豫地在第二个项目中使用了Struts。到如今，我参与的所有的项目，都是基于Struts的。 
<P>5岁的小p孩儿，会走，会说话，刚刚进幼儿园。而5岁的Struts，现在是Java世界里，开发Web应用程序的默认框架标准。在书店里，你可以找到大量的关于Struts的书，Struts的资料也是浩如烟海。说它“如日中天”可能也不为过。 
<P>然而，Struts也有它不足的地方（比如重用ActionForm和Action比较麻烦），而同时新的技术又在不断涌现，5年（或者说3年）以后，会是什么样子呢？下一代的Web应用框架，会是JSF吗?（JSF的作者就是Craig R. McClanahan）或者，真的如Craig说的，JSF应该和Struts协同工作，而不是替换掉Struts。 
<P>看看TheServerside上面<A href="http://www.theserverside.com/news/thread.tss?thread_id=34249"><U>大家的评论</U></A>吧。 
<P><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="hhttp://struts.apache.org/"><FONT size=2>Struts on Apache</FONT></A><BR><A href="http://www.theserverside.com/news/thread.tss?thread_id=34249"><FONT size=2>Comments on TheServerside</FONT></A><BR><A href="http://www.jroller.com/page/roblambert/20050529#5_year_anniversary_of_the"><FONT size=2>5 Year Anniversary of the Birth of Struts</FONT></A><BR><A href="http://spaces.msn.com/members/almasyk/Blog/cns!1pLMf7SAloNtv6rvxnQ7FJdg!114.entry"><FONT size=2>Sean's stack trace on Struts 5 Years</FONT></A><FONT size=2> </FONT><A href="http://spaces.msn.com/members/almasyk/blog/cns!1pLMf7SAloNtv6rvxnQ7FJdg!114.trak"><FONT size=2>.</FONT></A><FONT size=2> <BR></FONT>
<P><BR><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/java" rel=tag align="top"><FONT size=2>Java</FONT></A><FONT size=2>，</FONT><A href="http://technorati.com/tag/software" rel=tag align="top"><FONT size=2>Software Programming</FONT></A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/ping.html?url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F06%2F01%2F5405.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A> <BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1242.html"><FONT size=2>Eclipse</FONT></A><FONT size=2>， </FONT><A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5405.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-06-01 13:18 <a href="http://www.blogjava.net/kukoo/archive/2005/06/01/5405.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; 灵活性和可重用 [Eric Gamma]</title><link>http://www.blogjava.net/kukoo/archive/2005/05/31/5369.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Tue, 31 May 2005 06:20:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/31/5369.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5369.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/31/5369.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5369.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5369.html</trackback:ping><description><![CDATA[我在5月25号的的blog: <A href="http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html"><U>如何思考Design Pattern?</U></A>中，转载了Eric Gamma对于Design Pattern 的论述（这是<A href="http://www.artima.com/"><U>Artima Developer</U></A>的总编 Bill Venners对Erich Gamma的采访中的<A href="http://www.artima.com/lejava/articles/gammadp.html"><U>第一部分</U></A>）。而第二部分中，Bill 和 Eric 则讨论了重用性的重要性 （importance of reusability）。 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 重用的最高境界是什么？我们创建一个非常高层的，面向具体应用的框架，然后只要做简单的客户化，并且重用这个框架中现有的设计。（“We thought the way to create software was to build high-level, domain-specific frameworks, and then you just customize them and reuse all the design that is codified into them. That was the reuse nirvana.”）但是，连Eric都意识到，这太理想化了，因为 “ I have learned that it's hard to create highly reusable frameworks.” 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在谈到可重用的framework的时候，Eric提到了<A href="http://www.blogjava.net/kukoo/admin/www.eclipse.org"><U>Eclipse</U></A>: <BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;“A&nbsp;good&nbsp;example&nbsp;of&nbsp;how&nbsp;I&nbsp;like&nbsp;to&nbsp;see&nbsp;reuse&nbsp;at&nbsp;work&nbsp;is&nbsp;Eclipse.&nbsp;It's&nbsp;built&nbsp;of&nbsp;components&nbsp;we&nbsp;call&nbsp;plug-ins.&nbsp;A&nbsp;plug-in&nbsp;bundles&nbsp;your&nbsp;code&nbsp;and&nbsp;there&nbsp;is&nbsp;a&nbsp;separate&nbsp;manifest&nbsp;where&nbsp;you&nbsp;define&nbsp;which&nbsp;other&nbsp;plug-ins&nbsp;you&nbsp;extend&nbsp;and&nbsp;which&nbsp;points&nbsp;of&nbsp;extension&nbsp;your&nbsp;plug-in&nbsp;offers.&nbsp;Plug-ins&nbsp;provide&nbsp;reusable&nbsp;code&nbsp;following&nbsp;explicit&nbsp;conventions&nbsp;to&nbsp;separate&nbsp;API&nbsp;from&nbsp;internal&nbsp;code.&nbsp;The&nbsp;Eclipse&nbsp;component&nbsp;model&nbsp;is&nbsp;simple&nbsp;and&nbsp;consistent&nbsp;too.&nbsp;It&nbsp;has&nbsp;this&nbsp;kernel&nbsp;characteristic.&nbsp;Eclipse&nbsp;has&nbsp;a&nbsp;small&nbsp;kernel,&nbsp;and&nbsp;everything&nbsp;is&nbsp;done&nbsp;the&nbsp;same&nbsp;way&nbsp;via&nbsp;extension&nbsp;points.&nbsp;The&nbsp;combination&nbsp;of&nbsp;a&nbsp;component&nbsp;model&nbsp;and&nbsp;the&nbsp;focus&nbsp;on&nbsp;APIs&nbsp;is&nbsp;one&nbsp;of&nbsp;the&nbsp;key&nbsp;ingredients&nbsp;of&nbsp;Eclipse.&nbsp;Controlled&nbsp;extensibility&nbsp;is&nbsp;another&nbsp;important&nbsp;one.&nbsp;（Eclipse是构构建在我们称之为plug-in的组件上面的。一个plug-in含有你的代码，而且详细定义了你从哪些其他的plug-in扩展而来，以及你的plug-in提供了哪些扩展点给别人使用。Plug-in提供了可重用的代码，而且遵循将API和内部的代码分离开。同时，Eclipse的组件模式简单而且一致。Eclipse只有一个很小的核心，所有其他的都市通过扩展点这种同样的方式来做的。Eclipse中的一个重要组成部分就是组件模型和面向API的方式的结合。另一个重要点则是受到控制的扩展性。）”</SPAN></DIV></DIV>
<P><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 那么，什么又是Controlled extensibility呢？为什么要对扩展性进行控制呢？ <BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp; “You&nbsp;can&nbsp;go&nbsp;and&nbsp;expose&nbsp;everything,&nbsp;and&nbsp;people&nbsp;can&nbsp;change&nbsp;anything.&nbsp;The&nbsp;original&nbsp;Smalltalks&nbsp;had&nbsp;some&nbsp;of&nbsp;this&nbsp;flavor.&nbsp;The&nbsp;problems&nbsp;start&nbsp;when&nbsp;the&nbsp;next&nbsp;version&nbsp;comes&nbsp;along.&nbsp;If&nbsp;you&nbsp;have&nbsp;exposed&nbsp;everything,&nbsp;you&nbsp;cannot&nbsp;change&nbsp;anything&nbsp;or&nbsp;you&nbsp;break&nbsp;all&nbsp;your&nbsp;clients.&nbsp;…&nbsp;Also&nbsp;when&nbsp;you&nbsp;study&nbsp;the&nbsp;Eclipse&nbsp;API&nbsp;you&nbsp;will&nbsp;find&nbsp;that&nbsp;we&nbsp;go&nbsp;further&nbsp;than&nbsp;just&nbsp;specifying&nbsp;which&nbsp;classes&nbsp;are&nbsp;published&nbsp;API.&nbsp;The&nbsp;Eclipse&nbsp;API&nbsp;also&nbsp;specifies&nbsp;whether&nbsp;a&nbsp;class&nbsp;is&nbsp;intended&nbsp;to&nbsp;be&nbsp;subclassed.&nbsp;（你可以把一切都公布出来，SmallTalk就是这样做的。但是，当下一个版本出来的时候，可能就会碰到问题。如果你公布了一切，那么你就不能做改动了，活着你可能会破坏你的客户端使用的东西….在Eclipse里面，我们不仅仅定义了哪些类是公开的API，我们处理得更深层次，我们甚至定义了哪些API是可以被扩展的，哪些不可以。”&nbsp;</SPAN></DIV></DIV>
<P><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eric对于重用，定义了三个级别：最低一级，重用类（classes）；最高一级，框架（framework）；而中间一级，就是设计模式（Design Pattern）（“This is where I see patterns. Design patterns are both smaller and more abstract than frameworks. They're really a description about how a couple of classes can relate to each other and interact with each other. The level of reuse increases when you move from classes to patterns and finally frameworks. ” 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eric提到了一个有趣的现象。通常，我们拿到一个需求，会先做设计，做设计的时候，我们会使用设计模式（Design Pattern）。但是，使用XP （eXtreme Programming）方式的人不这样做，他们先写测试（“They write a test”） 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 那么，设计一个framework的时候，要注意什么呢？要避免frameworkitis. （“ Frameworks abstract and provide higher level default functionality. To do so the framework needs to be in control. This loss of control can lead to what is sometimes called frameworkitis. ”） <BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp; Frameworkitis就是说，一个framework想要做的东西太多，或者它并不是按照你设想的做的而你又不能去改动它。（“Frameworkitis&nbsp;is&nbsp;the&nbsp;disease&nbsp;that&nbsp;a&nbsp;framework&nbsp;wants&nbsp;to&nbsp;do&nbsp;too&nbsp;much&nbsp;for&nbsp;you&nbsp;or&nbsp;it&nbsp;does&nbsp;it&nbsp;in&nbsp;a&nbsp;way&nbsp;that&nbsp;you&nbsp;don't&nbsp;want&nbsp;but&nbsp;you&nbsp;can't&nbsp;change&nbsp;it.”）</SPAN></DIV></DIV>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 而且，一个framework要做的比较小，因为，如果framework太大了，那么它可能就会做太多（可能会frameworkitis），而且，不容易学习，学习曲线太长，也不容易维护。 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eria的论述真是非常精彩，而且也解释了Eclipse的一些内部设计。一定要<A href="http://www.artima.com/lejava/articles/reuse.html"><U>阅读全文</U></A> <BR>
<P><BR>[Update] 感谢<A href="http://blog.csdn.net/lxwde"><U>lxwde</U></A>的中文翻译。我的中文翻译可能不完全准确。中文翻译，请参考Related Links中给出的lxwde的中文翻译链接。<BR><BR><BR><BR><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://www.artima.com/"><FONT size=2>Artima developer</FONT></A><BR><A href="http://www.artima.com/lejava/articles/gammadp.html"><FONT size=2>访谈的第一部分</FONT></A><BR><A href="http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html"><FONT size=2>如何思考Design Pattern?</FONT></A><FONT size=2> <BR></FONT><A href="http://blog.csdn.net/lxwde/archive/2005/06/06/388909.aspx"><FONT size=2>CSDN上的中文翻译</FONT></A><BR><FONT size=1><BR><A href="mailto:?subject=kukooWeb:Erich Gamma on Flexibility and Reuse">Email this store to a friend</A> (send a short email with a subject to this story)<BR><A href="http://www.blogjava.net/kukoo/Rss.aspx">Subscribe to kukooBlog</A> (subscribe kukooBlog's RSS feed)<BR><A href="mailto:hello_kukoo@hotmail.com?subject=Re:Erich Gamma on Flexibility and Reuse">Send me feedback on this story</A> </FONT>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top"><FONT size=2>Software</FONT></A><FONT size=2>，</FONT><A href="http://technorati.com/tag/designpattern" rel=tag align="top"><FONT size=2>Design Pattern</FONT></A><FONT size=2>，</FONT><A href="http://technorati.com/tag/eclipse" rel=tag align="top"><FONT size=2>Eclipse</FONT></A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/cosmos/search.html?rank=&amp;url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F05%2F31%2F5369.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A><FONT size=2>, </FONT><A href="http://www.blogjava.net/kukoo/category/1242.html"><FONT size=2>Eclipse</FONT></A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5369.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-31 14:20 <a href="http://www.blogjava.net/kukoo/archive/2005/05/31/5369.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=ProgrammingIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; 严格的敏捷方法定义？</title><link>http://www.blogjava.net/kukoo/archive/2005/05/31/5356.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Tue, 31 May 2005 03:04:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/31/5356.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5356.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/31/5356.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5356.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5356.html</trackback:ping><description><![CDATA[<A href="http://martinfowler.com/"><U>Martin Fowler</U></A>在他最新的<A href="http://martinfowler.com/bliki/RigorousAgile.html"><U>bliki：RigorousAgile </U></A>中提到： 
<P>“The complainer may talk about how this means that you can't tell if a particular team is using an agile method or not. They may also say that this makes it hard to teach people how to do agile methods - what's the curriculum?”（这些抱怨者指出他们很难区分是否在使用敏捷方法，也很难用固定的课程去教授如何使用敏捷方法） 
<P>然而，没有一个严格的定义，正是敏捷方法的核心哲学 （“This lack of rigorousness is part of the defining nature of agile methods, part of its core philosophy.”） 
<P>Martin接着指出： 
<P>“Different kinds of systems have different kinds of pressures and forces, which makes it very difficult to come up with a rigorous statement of what to do that's sufficient to cover them.”（不同的系统有来自不同方面的压力，这种情况使得很难定义出一个严格的过程，去定义如何有效的解决这些问题） 
<P>而另一关键的问题是：人，软件开发的主体，是一个最大的可变的因素 （“This effect is compounded by the fact that software development is such a people-oriented activity, and people are naturally inconsistent and highly variable. ”） 
<P>倡导敏捷方法的人，之所以没有为敏捷方法制定出一个严格的定义，就是为了将软件开发中最大的可变因素，而又是过程的执行者：人，忽略掉。（“ that's its not effective to try and bind software development to a rigorous process, because that's ignoring the essential nature of the primary (human) components that will execute that process”） 
<P><A href="http://martinfowler.com/bliki/RigorousAgile.html"><U>阅读全文</U></A> 
<P><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://martinfowler.com/">Martin Fowler</A><BR><A href="http://alistair.cockburn.us/crystal/articles/cpanfocisd/characterizingpeopleasnonlinear.html">inconsistent and highly variable</A> 
<P><FONT size=1><A href="mailto:?subject=kukooWeb:RigorousAgile">Email this store to a friend</A> (send a short email with a subject to this story)<BR><A href="http://www.blogjava.net/kukoo/Rss.aspx">Subscribe to kukooBlog</A> (subscribe kukooBlog's RSS feed)<BR><A href="mailto:hello_kukoo@hotmail.com?subject=Re:RigorousAgile">Send me feedback on this story</A> </FONT>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/software" rel=tag align="top">Software</A>，<A href="http://technorati.com/tag/agileprogramming" rel=tag align="top">Agile Programming</A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/cosmos/search.html?rank=&amp;url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F05%2F31%2F5356.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5356.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-31 11:04 <a href="http://www.blogjava.net/kukoo/archive/2005/05/31/5356.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=EclipseIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/EclipseIcon.GIF" border=0 align=top&gt; Eclipse 的RCP是“胖客户端”的回归标志吗？</title><link>http://www.blogjava.net/kukoo/archive/2005/05/28/5302.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Sat, 28 May 2005 10:29:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/28/5302.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5302.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/28/5302.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5302.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5302.html</trackback:ping><description><![CDATA[[注：这是从以前CSDN上的个人blog迁移来的。] 
<P>今天看到一篇挺有意思的blog: <A href="http://carlsbadcubes.com/blog/2005/03/11#richclient"><U>Does Eclipse's RCP mark the return of the fat client or didn't they just hear about the South Beach Diet yet?</U></A> 大意是，Eclipse的RCP是否标志着“胖客户端”（或者说“富客户端”）的回归？ 
<P>作者提到了几个有趣的事实。首先，基于浏览器的Web Application让IT部门的员工爱不释手，因为真正的“零客户端管理”实现了，服务器端的任何一点改动在客户端立刻就可以使用了，而不需要每个客户端都再去维护了。但是，除了这个好处之外，还有其他什么吗？用户，包括IT部门的员工逐渐就意识到了，有了易于管理的好处，但是牺牲了可用性，许多非常好用的功能，比如鼠标右键的快捷菜单，按列重新排序，调节列的宽度等等，都在Web Application中失去了。而事实上，仔细想想，为什么大多数的用户更愿意使用Outlook，ThunderBird这样的邮件客户端，而不是mail.yahoo.com这样的浏览器邮件客户端。而同时，浏览器下的Web Application没有一个统一的应用程序的风格，菜单放哪里？上面，底下，左下角？ 
<P>再回来看看所谓的“零管理”。J2SE 1.4中加强了Java WebStart的功能。这种分布式的做法，使得客户端每次启动执行的时候，都会从服务器下载最新的版本。这样，不是解决了“零管理”的问题了吗？其实还有一些需要注意的问题：下载多少？如果每次都要下载好几兆的更新，通常用户的接受不了。想想每次更新Windows的补丁，就知道下载好几兆的更新是一种什么感受了。 
<P>所以，真正的网络客户端，应该是“瘦”的，但是“功能丰富的”，或者说，是“thin”而且“rich”。“thin”是指相对于传统的“fat”客户端（象Office这样的“胖客户端”），在客户端不需要太多的安装，“rich”则是指相对于当前的Web Application，应该是功能丰富的。当前的Web Application是“thin”的，但是不够“rich”。 
<P>那么何去何从呢？<BR>一个选择是Mozilla 的XUL，一个跨平台的UI解决方案；<BR>一个选择是Eclipse的RCP，足够的“rich”了，但是不够“thin”: RCP的运行库就达到了6.7M了，似乎胖了点。 
<P>看完这个blog，只有两个想法：<BR><BR>其一，RCP应该会是一个很大的发展方向。需要下载安装的客户端对于高速的宽带网络来说，不是问题； <BR>其二，Java WebStart的应用，每次客户端启动，只会更新改动过的部分（除非客户清除了客户端的缓存）。这样的话，6.7M的RCP运行库并不是每次都需要更新的。 
<P>有了Java WebStart，Web Application所称道的“零客户端管理”就不再是一个显著的优势了。而RCP却带来了Web Application所不具备的用户易用性，统一的风格和传统桌面程序中所熟悉的功能。 
<P><A href='http://www.blogjava.net/kukoo/admin/“http://carlsbadcubes.com/bio/index.html"'>Wolfgang Paulus</A> 是 <A href="http://www.swixml.org/">SwixML</A> （一个开源的XUL引擎）的创始者和主要作者。也许Wolfgang更乐于看到XUL 和 RCP 都会健康的发展，提供开发真正的“Thin Rich Web Application”的平台。 
<P><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://carlsbadcubes.com/blog/2005/03/11#richclient">Wolfgang Paulus's blog</A><BR><A href="http://www.swixml.org/">SwixML</A> 
<P><FONT size=1><A href="mailto:?subject=kukooWeb:Eclipse 的RCP是“胖客户端”的回归标志吗？">Email this store to a friend</A> (send a short email with a subject to this story)<BR><A href="http://www.blogjava.net/kukoo/Rss.aspx">Subscribe to kukooBlog</A> (subscribe kukooBlog's RSS feed)<BR><A href="mailto:hello_kukoo@hotmail.com?subject=Re:Eclipse 的RCP是“胖客户端”的回归标志吗？">Send me feedback on this story</A> </FONT>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/eclipse" rel=tag align="top">Eclipse</A>，<A href="http://technorati.com/tag/rcp" rel=tag align="top">RCP</A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/cosmos/search.html?rank=&amp;url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F05%2F28%2F5302.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A><BR><IMG alt=Mycat src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif" align=top> <A href="http://www.blogjava.net/kukoo/category/1242.html">Eclipse</A>，<A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5302.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-28 18:29 <a href="http://www.blogjava.net/kukoo/archive/2005/05/28/5302.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=EclipseIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/ProgrammingIcon.gif" border=0 align=top&gt; SmallTalk终于要退出历史舞台了</title><link>http://www.blogjava.net/kukoo/archive/2005/05/27/5248.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Fri, 27 May 2005 02:18:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/27/5248.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5248.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/27/5248.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5248.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5248.html</trackback:ping><description><![CDATA[SmallTalk，公认的最早的OO语言之一，终于快要推出历史舞台了。最近，作为SmallTalk最大的支持者，IBM，宣布将停止对SmallTalk系列产品的支持（截止到2006年6月）。虽然没有用过SmallTalk，但是听到这个名字已经太多太多次了，而且，以前曾经用过的Visual Age for C/Java这个IBM的IDE，其中很多构建就是用SmallTalk开发的。而很多关于SWT和Swing的讨论（关于原生窗口部件和仿生窗口部件的讨论），也常提到SmallTalk。（参考我之前转载的一篇关于<A href="http://blog.csdn.net/kukoo/archive/2005/03/16/320890.aspx"><U>SWT和Swing的blog</U></A>） 
<P>SmallTalk将快要完成它的历史使命了，而任何一种语言，不管是Java还是C#，都不可能永远存活下去的。技术主导不了市场，新的需求会催生新的语言。 
<P><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"> <BR><FONT size=2>Richard Monson-Haefel的</FONT><A href="http://www.typepad.com/t/trackback/2518315"><FONT size=2>Blog</FONT></A><FONT size=2>：</FONT><A href="http://rmh.blogs.com/weblog/2005/05/ibm_abandons_sm.html"><U><FONT size=2>IBM abandons Smalltalk</FONT></U></A> 
<P><A href="mailto:?subject=kukooWeb:SmallTalk终于要退出历史舞台了"><FONT size=1>Email this story to a friend</FONT></A><FONT size=1> (send a short email with a subject to this story) <BR></FONT><A href="http://www.blogjava.net/kukoo/Rss.aspx"><FONT size=1>Subscribe to kukooBlog</FONT></A><FONT size=1> (subscribe kukooBlog's RSS feed) <BR></FONT><A href="mailto:hello_kukoo@hotmail.com?subject=Re:SmallTalk终于要退出历史舞台了"><FONT size=1>Send me feedback on this story</FONT></A> 
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top> <A href="http://technorati.com/tag/smalltalk" rel=tag>SmallTalk</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5248.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-27 10:18 <a href="http://www.blogjava.net/kukoo/archive/2005/05/27/5248.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=PatternIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_PatternsIcon.gif" border=0 align=top&gt; Pattern: Data Obfuscator</title><link>http://www.blogjava.net/kukoo/archive/2005/05/26/5229.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 26 May 2005 07:25:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/26/5229.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5229.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/26/5229.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5229.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5229.html</trackback:ping><description><![CDATA[测试系统的时候，往往会碰到这样的一种情况：系统开发完成了，但是没有合适的数据可以使用。原因是多方面的：比如用户的数据不能公开，机密程度比较高。虽让你可以随机产生一些测试数据，但是简单的测试数据，和真正复杂的用户数据是无法相比的，所产生的问题就是，在测试数据上，简单的操作可以通过，而同样的操作到了用户数据上面，就产生各种情况（如性能问题）。 
<P>你如何解决这个问题呢？你如何得到一组数据，既不会泄露用户的机密数据，也保证了足够的数据量和复杂度？ 
<P>Bobby Woolf 在他的blog中提出了使用<A href="http://www-106.ibm.com/developerworks/blogs/dw_blog_comments.jspa?blog=392&amp;entry=82179"><U>Data Obfuscator</U></A>（混淆数据）：即通过一个特定的程序，特定的一组算法和规则，从用户的数据中摘取足够的数据量，同时，把一些敏感的数据（如姓名，薪水，保险号码等）替换成一些不重要（或者不敏感）的数据（比如，把姓名用A001, A002来替换掉）。 
<P><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://www-106.ibm.com/developerworks/blogs/dw_blog_comments.jspa?blog=392&amp;entry=82179">Data Obfuscator 原文参考</A> 
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif"> <A href="http://technorati.com/tag/designpattern" rel=tag>Design Pattern</A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/cosmos/search.html?rank=&amp;url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F05%2F26%2F5229.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A> <BR><IMG alt=Yourit src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif"> <A href="http://www.blogjava.net/kukoo/category/1245.html">Programming</A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5229.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-26 15:25 <a href="http://www.blogjava.net/kukoo/archive/2005/05/26/5229.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>&lt;IMG alt=PatternIcon src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_PatternsIcon.gif" border=0 align=top/&gt; 如何思考Design Pattern?</title><link>http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Wed, 25 May 2005 10:13:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/5198.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/5198.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/5198.html</trackback:ping><description><![CDATA[<A href="http://www.artima.com/"><U>Artima Developer</U></A>的总编 Bill Venners在对Erich Gamma的一次采访中，<A href="http://www.artima.com/lejava/articles/gammadp.html"><U>仔细讨论了Design Pattern（设计模式）</U>的问题</A>。当我们做设计的时候，我们首先会想到使用设计模式。那么如何使用设计模式？如何用设计模式进行思考？是否当你解决一个问题的时候，必须要使用设计模式？ 
<P>Bill Venners将把这次访谈的内容分多次，发表在Artima Developer上。Erich Gamma的论述确实精彩，他不仅谈到了当初如何进入Design Pattern这个领域的过程，也谈到了在他开发JUnit的过程中，如何设计JUnit，以及如何在JUnit中使用Design Pattern。 <BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">“I&nbsp;think&nbsp;patterns&nbsp;as&nbsp;a&nbsp;whole&nbsp;can&nbsp;help&nbsp;people&nbsp;learn&nbsp;object-oriented&nbsp;thinking:&nbsp;how&nbsp;you&nbsp;can&nbsp;leverage&nbsp;polymorphism,&nbsp;design&nbsp;for&nbsp;composition,&nbsp;delegation,&nbsp;balance&nbsp;responsibilities,&nbsp;and&nbsp;provide&nbsp;pluggable&nbsp;behavior.&nbsp;Patterns&nbsp;go&nbsp;beyond&nbsp;applying&nbsp;objects&nbsp;to&nbsp;some&nbsp;graphical&nbsp;shape&nbsp;example,&nbsp;with&nbsp;a&nbsp;shape&nbsp;class&nbsp;hierarchy&nbsp;and&nbsp;some&nbsp;polymorphic&nbsp;draw&nbsp;method.&nbsp;You&nbsp;really&nbsp;learn&nbsp;about&nbsp;polymorphism&nbsp;when&nbsp;you've&nbsp;understood&nbsp;the&nbsp;patterns.&nbsp;So&nbsp;patterns&nbsp;are&nbsp;good&nbsp;for&nbsp;learning&nbsp;OO&nbsp;and&nbsp;design&nbsp;in&nbsp;general.”</SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #000000">“Patterns&nbsp;are&nbsp;distilled&nbsp;from&nbsp;the&nbsp;experiences&nbsp;of&nbsp;experts.&nbsp;They&nbsp;enable&nbsp;you&nbsp;to&nbsp;repeat&nbsp;a&nbsp;successful&nbsp;design&nbsp;done&nbsp;by&nbsp;someone&nbsp;else.&nbsp;By&nbsp;doing&nbsp;so&nbsp;you&nbsp;can&nbsp;stand&nbsp;on&nbsp;the&nbsp;shoulders&nbsp;of&nbsp;the&nbsp;experts&nbsp;and&nbsp;do&nbsp;not&nbsp;have&nbsp;to&nbsp;re-invent&nbsp;the&nbsp;wheel.&nbsp;”&nbsp;</SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">“Do&nbsp;not&nbsp;start&nbsp;immediately&nbsp;throwing&nbsp;patterns&nbsp;into&nbsp;a&nbsp;design,&nbsp;but&nbsp;use&nbsp;them&nbsp;as&nbsp;you&nbsp;go&nbsp;and&nbsp;understand&nbsp;more&nbsp;of&nbsp;the&nbsp;problem.&nbsp;Because&nbsp;of&nbsp;this&nbsp;I&nbsp;really&nbsp;like&nbsp;to&nbsp;use&nbsp;patterns&nbsp;after&nbsp;the&nbsp;fact,&nbsp;refactoring&nbsp;to&nbsp;patterns.&nbsp;…..&nbsp;Trying&nbsp;to&nbsp;use&nbsp;all&nbsp;the&nbsp;patterns&nbsp;is&nbsp;a&nbsp;bad&nbsp;thing,&nbsp;because&nbsp;you&nbsp;will&nbsp;end&nbsp;up&nbsp;with&nbsp;synthetic&nbsp;designs—speculative&nbsp;designs&nbsp;that&nbsp;have&nbsp;flexibility&nbsp;that&nbsp;no&nbsp;one&nbsp;needs.&nbsp;These&nbsp;days&nbsp;software&nbsp;is&nbsp;too&nbsp;complex.&nbsp;We&nbsp;can't&nbsp;afford&nbsp;to&nbsp;speculate&nbsp;what&nbsp;else&nbsp;it&nbsp;should&nbsp;do.&nbsp;We&nbsp;need&nbsp;to&nbsp;really&nbsp;focus&nbsp;on&nbsp;what&nbsp;it&nbsp;needs.&nbsp;”&nbsp;</SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">“We&nbsp;didn't&nbsp;just&nbsp;string&nbsp;patterns&nbsp;together&nbsp;when&nbsp;we&nbsp;designed&nbsp;JUnit.&nbsp;We&nbsp;did&nbsp;it&nbsp;test-driven,&nbsp;starting&nbsp;with&nbsp;a&nbsp;test&nbsp;that&nbsp;we&nbsp;wanted&nbsp;to&nbsp;succeed&nbsp;and&nbsp;once&nbsp;it&nbsp;passed&nbsp;we&nbsp;looked&nbsp;into&nbsp;how&nbsp;we&nbsp;could&nbsp;improve&nbsp;the&nbsp;code.&nbsp;”</SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">Who&nbsp;is&nbsp;Erich&nbsp;Gamma?（这个问题好像问的有些傻）<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>《Design&nbsp;Patterns:&nbsp;Elements&nbsp;of&nbsp;Reusable&nbsp;Object-Oriented&nbsp;Software》，《Contributing&nbsp;to&nbsp;Eclipse:&nbsp;Principles,&nbsp;Patterns,&nbsp;and&nbsp;Plug-Ins》的作者之一；JUnit的作者之一；Eclipse&nbsp;JDT的负责人。他目前在IBM的瑞士苏黎世OTI实验室工作。&nbsp;</SPAN></DIV></DIV>
<P><BR>[Update]感谢的<A href="http://blog.csdn.net/lxwde"><U>lxwde</U></A>中文翻译。<BR><BR><BR><IMG src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_relatedlinks.gif"><BR><A href="http://www.artima.com/lejava/articles/gammadp.html"><FONT size=2>第一次访谈的详细内容。</FONT></A><FONT size=2> <BR></FONT><A href="http://www.artima.com/"><FONT size=2>Artima Developer</FONT></A><FONT size=2> <BR></FONT><A href="http://blog.csdn.net/lxwde/archive/2005/05/28/382819.aspx"><FONT size=2>CSDN 上的中文翻译<BR></FONT></A><BR><FONT size=1><A href="mailto:?subject=kukooWeb:如何思考Design Pattern?">Email this store to a friend</A> (send a short email with a subject to this story) <BR><A href="http://www.blogjava.net/kukoo/Rss.aspx">Subscribe to kukooBlog</A> (subscribe kukooBlog's RSS feed) <BR><A href="mailto:hello_kukoo@hotmail.com?subject=Re:如何思考Design Pattern?">Send me feedback on this story</A> </FONT>
<P><IMG alt=Yourit src="http://blogs.sun.com/roller/resources/alur/yourit.gif" align=top/> <A href="http://technorati.com/tag/designpattern" rel=tag><FONT size=2>Design Pattern</FONT></A> <A href="http://www.technorati.com/cosmos/search.html?rank=&amp;url=http://www.technorati.com/cosmos/search.html?rank=&amp;url=http%3A%2F%2Fwww.blogjava.net%2Fkukoo%2Farchive%2F2005%2F05%2F25%2F5198.html"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" alt="Technorati cosmos" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif" align=top></A> <BR><IMG alt=Yourit src="http://www.blogjava.net/images/blogjava_net/kukoo/1547/o_mycat.gif"> <A href="http://www.blogjava.net/kukoo/category/1245.html"><FONT size=2>Programming</FONT></A> </P><img src ="http://www.blogjava.net/kukoo/aggbug/5198.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-25 18:13 <a href="http://www.blogjava.net/kukoo/archive/2005/05/25/5198.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>dW上的Geronimo</title><link>http://www.blogjava.net/kukoo/archive/2005/05/19/4858.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Thu, 19 May 2005 03:08:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/19/4858.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/4858.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/19/4858.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/4858.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/4858.html</trackback:ping><description><![CDATA[IBM收购了Gluecode （开发以Geronimo为核心的J2EE应用服务）以后，Geronimo的开发似乎一下子热闹起来了。developerWorks网站上，在一周之内，发表了3篇关于Geronimo的有趣的文章： 
<OL>
<LI><A href="http://www-128.ibm.com/developerworks/java/library/j-geron1/?ca=dgr-jw22GeronimoEngine" rel=tag>Geronimo! Part 1: The J2EE 1.4 engine that could</A> 
<LI><A href="http://www-128.ibm.com/developerworks/opensource/library/os-gerplug/?ca=dgr-jw22Eclipse4Geronimo" rel=tag>Create, deploy, and debug Apache Geronimo applications</A> 
<LI><A href="http://www-128.ibm.com/developerworks/opensource/library/os-boynes/?ca=dgr-jw22ApacheGeromino" rel=tag>Building a better J2EE server, the open source way</A> </LI></OL>
<P>特别是Geronimo! Part1，详细描述了Geronimo的系统结构。而Geronimo的开发，相比之前，似乎加快了不少，第二篇文章中就介绍了IBM开发的用于Geronimo的一个Eclipse构件，但是需要和<A href="http://www.eclipse.org/webtools" rel=geronimo><SPAN style="BORDER-BOTTOM-STYLE: groove">Eclipse WTP</SPAN></A>一同工作。希望Eclipse WTP可以把这个plug-in包含到WTP里面。 </P>
<P><IMG alt="Technorati Tags" src="http://www.mallim.per.sg/wordpress/wp-content/plugins/technobubble.gif"> <A href="http://technorati.com/tag/eclipse" rel=tag><SPAN style="BORDER-BOTTOM-STYLE: groove">Eclipse</SPAN></A>，<A href="http://technorati.com/tag/geronimo" rel=tag><SPAN style="BORDER-BOTTOM-STYLE: groove">Geronimo</SPAN></A></P><img src ="http://www.blogjava.net/kukoo/aggbug/4858.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-19 11:08 <a href="http://www.blogjava.net/kukoo/archive/2005/05/19/4858.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Introduction to Spring Framework</title><link>http://www.blogjava.net/kukoo/archive/2005/05/18/4751.html</link><dc:creator>kukooBlog</dc:creator><author>kukooBlog</author><pubDate>Wed, 18 May 2005 05:43:00 GMT</pubDate><guid>http://www.blogjava.net/kukoo/archive/2005/05/18/4751.html</guid><wfw:comment>http://www.blogjava.net/kukoo/comments/4751.html</wfw:comment><comments>http://www.blogjava.net/kukoo/archive/2005/05/18/4751.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kukoo/comments/commentRss/4751.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kukoo/services/trackbacks/4751.html</trackback:ping><description><![CDATA[<A href="http://www.springframework.com/">Rod Johnson</A> 在 <A href="http://www.theserverside.com/">TheServerside</A> 上面发表一篇新的<A href="http://www.theserverside.com/articles/article.tss?l=SpringFramework"> Spring Framework的介绍文章</A>。写的真是太好了。 <img src ="http://www.blogjava.net/kukoo/aggbug/4751.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kukoo/" target="_blank">kukooBlog</a> 2005-05-18 13:43 <a href="http://www.blogjava.net/kukoo/archive/2005/05/18/4751.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>