﻿<?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-迷途书童-随笔分类-随感</title><link>http://www.blogjava.net/landy/category/10469.html</link><description>敏感、勤学、多思</description><language>zh-cn</language><lastBuildDate>Sat, 21 Jul 2012 08:13:27 GMT</lastBuildDate><pubDate>Sat, 21 Jul 2012 08:13:27 GMT</pubDate><ttl>60</ttl><item><title>软件质量属性设计</title><link>http://www.blogjava.net/landy/archive/2012/07/21/383641.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sat, 21 Jul 2012 04:30:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/07/21/383641.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/383641.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/07/21/383641.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/383641.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/383641.html</trackback:ping><description><![CDATA[<p>本人曾经阅读过《软件架构设计》一书的第一版，读了之后对架构设计的方法、流程有了更深刻的认识，也对我后续的工作起了非常大的指导作用。最近从ITEye上了解到温昱先生出了《软件架构设计》一书的第二版，赶紧下了样章读了一下，感觉第二版相比第一版，在概念、方法、流程、实践几个方面的指导性更强了，实在是程序员升级架构师必备良书！</p> <p>下面基于我实际经历的一个项目，结合对《软件架构设计》一书的理解，谈一下质量属性的设计。</p> <p>首先介绍一下项目背景，某大型电信解决方案提供商向全球电信运营商提供某软件系统，因不同的运营商需求有差别，需要投入大量的人力物力对某个特定的运营商进行客户化定制，成本较高，为了降低定制成本，该提供商将交付组织切分为负责通用版本的组织A和负责针对特定局点定制的交付组织B，且成立了一个项目专门提升该软件系统的可定制性，以实现这种分级交付，降低定制成本。</p> <p>项目启动后，负责该项目的架构师凭借丰富的经验马上启动了架构设计，他从业界同类产品了解到，业界为了提升定制能力采用了元数据驱动的架构风格，于是马上开始了元数据驱动框架的设计，设计好之后召集开发人员和管理人员开了个沟通会，会中，该架构师被两个问题难住了：</p> <p>1）有个定制开发人员问，如果基线版本升级了，能否保证定制版本做的修改能够被直接继承？在这个问题上，大家发生了激烈的争论，架构设计团队认为有些场景可以，有些场景不可以，而定制开发人员的理解跟架构设计团队的理解不一样，最终该问题被搁置下来，后续再论。</p> <p>2）管理人员问，对定制能力目标，我们怎么测试和验证目标是否达成。这个问题比较毒，一下子把架构设计团队问傻了，没人答得上来，于是被骂了一顿。</p> <p>问题在哪里？？看了《软件架构设计》的第9章&#8220;概念性架构设计&#8221;就能找到答案。我认为的问题有：</p> <p>1）没有从系统各Actor的角度，分析定制用例，导致重要定制场景遗漏，被问起的时候自然就捉襟见肘；</p> <p>2）没有将定制能力目标分解到定制场景，导致对设计缺乏度量，不知道设计到底能不能满足定制能力目标要求，自然也回答不了&#8220;通用版本与定制版本的边界&#8221;这类的问题。</p> <p>要怎么做呢？？看了《软件架构设计》的第9章&#8220;概念性架构设计&#8221;就能找到答案。我认为，应该遵从下面的步骤，才能确保定制目标的达成：</p> <p>1）分析定制的Actor，比如定制开发人员，定制运维人员等；</p> <p>2）针对各Actor，分析其定制用例，如开发人员增加一个业务、修改一个业务流程、增加一个业务实体字段等等；</p> <p>3）针对每个用例，结合定制能力目标，分析该Actor的工作流程，通过这一步的分析，通用版本的边界（系统用例）能够大致识别出来。</p> <p>4）再针对关键系统用例，进一步使用分析对象进行鲁棒分析；通过这一步，对元数据驱动框架的能力要求能明确下来；</p> <p>5）然后在进一步对元数据驱动框架进行细化设计；</p> <p>通过这样一个系统的方法和流程，我们才能保证做出符合业务目标的可定制性设计。其它类型的质量属性的设计方法和流程也是类似的。</p> <p>其实那个负责可定制性设计的架构设计团队不管是业务经验还是技术能力，都是比较扎实的，关键是没有掌握一个比较科学的设计方法和流程。因此，广大程序员兄弟们在实践的同时，一定不能忘了提升理论素养，这样才有利于更早的打破天花板，获得更大的成功。</p><img src ="http://www.blogjava.net/landy/aggbug/383641.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-07-21 12:30 <a href="http://www.blogjava.net/landy/archive/2012/07/21/383641.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>构建SOA风格的应用</title><link>http://www.blogjava.net/landy/archive/2012/07/18/383436.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Wed, 18 Jul 2012 13:19:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/07/18/383436.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/383436.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/07/18/383436.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/383436.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/383436.html</trackback:ping><description><![CDATA[<p>当下，SOA这个词已经深入人心，几乎没有人不说自己设计的应用是遵从SOA的。</p> <p>很多人对SOA的理解就是分层、模块化、面向对象。。。这种理解对不对后面再说。先看一些问题：</p> <p>我今天看了一个开发团队的开发工程包结构，部分类的命名及组织产生了如下印象：</p> <ul> <li>每个usecase是一根根烟囱</li> <li>烟囱与烟囱之间连模型都没有共享。其实业务模型是有设计的，主要是实现模型没有保持业务模型的结构特征，全部成了&#8220;值对象&#8221;，开发人员天天把这些值对象叫做领域对象。</li> <li>有三层，是Struts帮忙定义的，三层分别根据usecase分包</li></ul> <p>这也是我们宣称的SOA系统！！！！连最基本的模型设计、模块设计、分层设计都没做好，难怪年年重构、年年完成不可能完成的任务！！！我确信这种重构、这种不可能完成的任务还会年年持续下去！！！</p> <p>究竟什么是符合SOA风格的系统？先看看SOA宗师IBM的一篇文章：</p> <p><a href="http://www.ibm.com/developerworks/cn/architecture/ar-soastyle/">http://www.ibm.com/developerworks/cn/architecture/ar-soastyle/</a></p> <p>我来总结一下。</p> <p>SOA能达到什么目的：</p> <p>1.实现业务与IT的一致性；</p> <p>2. 创建更灵活的反应更敏捷的IT基础设施；</p> <p>3. 简化集成实现；</p> <p>SOA要怎么做？</p> <ol> <li>从应用程序到流程和服务。消除应用程序，将软件系统创建为一组由业务流程进行协调的交互服务。每个服务实现企业上下文中定义的特定业务目标或功能，业务流程表示必须实现的业务解决方案。这个讲的比较抽象，我的解读就是服务表示一个最细粒度的业务目标或功能，由业务流程来编排这些服务，实现更大粒度的业务目标或功能，业务流程也是服务。注意，这里隐式的定义了服务的概念，服务是自治的，可替换的，可被多个流程编排的，不耦合流程上下文的，是直接面向业务目标或功能的，不是一个公共函数库，服务不是封装了数据和方法的类。</li> <li>SOA的服务基于业务资源（对象）定义，不支持操作者的执行上下文，而是支持业务资源（对象）。这里的业务资源是指业务实体。业务实体也是来自业务的。所以，SOA能保证IT与业务的一致性。</li></ol> <p>&nbsp;</p> <p>别再说你的应用程序或烟囱遵循SOA的架构风格！</p><img src ="http://www.blogjava.net/landy/aggbug/383436.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-07-18 21:19 <a href="http://www.blogjava.net/landy/archive/2012/07/18/383436.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软件架构设计（四）&amp;mdash;&amp;mdash;软件架构设计过程</title><link>http://www.blogjava.net/landy/archive/2012/07/08/382543.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 08 Jul 2012 08:46:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/07/08/382543.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/382543.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/07/08/382543.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/382543.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/382543.html</trackback:ping><description><![CDATA[<p><strong>3.10 确定系统需求</strong></p> <p>确定系统需求即确定系统用例。方法以根据业务用例实现场景分析为输入，分析每个系统Actor的系统用例。每个系统用例一定是一个完整的事件流，注意业务用例和系统用例的区别，业务用例是一个完整的业务目标，而系统用例是一个完整的事件流，是业务目标中的一个环节，如客户代表申请开户是一个完整的系统用例，但不是一个完整的业务目标，其包括多个页面操作。</p> <p><strong></strong>&nbsp;</p> <p><strong>3.11 用例实现分析</strong></p> <p>对每个系统用例，识别其可能的实现路径，每个实现路径就是一个用例实现，然后针对每个用例实现，分析人机交互，使用活动图绘制用例实现场景。</p> <p><strong></strong>&nbsp;</p> <p><strong>3.12 分析模型</strong></p> <p>使用分析对象，实现所有的用例实现场景，识别出三种分析对象。在这个过程中，也可以建立界面原型，和客户进一步达成需求的一致理解。分析模型是需求到设计的桥梁，分析类的层次高于设计实现，需求通过分析类转成计算机语言。后续做系统设计的时候，可直接将分析模型转换成设计模型。</p> <p>在考虑分析模型的过程中，有可能识别出一些公共模块，比如开户、销户过程中都会有一些业务规则校验，需要引入规则引擎的支持，那么类似规则引擎这样的公共模块需要添加到逻辑架构中去。</p> <p><strong></strong>&nbsp;</p> <p><strong>3.13 非功能性需求设计</strong></p> <p>以性能为例讲一下对非功能性需求设计的过程。</p> <p>1、确定性能目标：要支持多少用户、多少在线用户、多少并发操作、操作响应时间要求等；</p> <p>2、以一个简单的三层架构为起点，根据性能目标，识别瓶颈。比如，如果数据库撑不住，那么需要考虑最佳的分库设计，如果是逻辑层撑不住，则要考虑负荷分担，状态同步的逻辑层方案设计，如果操作响应时间要求很高，则可根据不同场景，分析其操作的数据的读写特点，采用合适的缓存方案。如要支撑高并发低时延的大数据量查询，Twitter就采用了垂直缓存，raw缓存的设计方案。</p> <p>3、验证性能设计。抽取典型场景，实现一个prototype来验证性能设计是否满足性能目标。</p> <p>在质量属性设计中，如果需要新增模块，则需要修改逻辑架构。</p> <p>有一些约束类需求也是非常重要的，不能遗漏分析。</p> <p>经过这一个阶段，我们能够得到一个比较完整的逻辑架构，运行架构、开发架构、物理架构、数据架构的输入了。剩下的工作就是编档的工作了。</p> <p>&nbsp;</p> <p><strong>3.14 架构编档</strong></p> <p>有了上面的工作作为铺垫，编档就非常容易了，这个就不细讲了。</p><img src ="http://www.blogjava.net/landy/aggbug/382543.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-07-08 16:46 <a href="http://www.blogjava.net/landy/archive/2012/07/08/382543.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软件架构设计（三）&amp;mdash;&amp;mdash;软件架构设计过程</title><link>http://www.blogjava.net/landy/archive/2012/07/08/382527.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 08 Jul 2012 07:17:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/07/08/382527.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/382527.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/07/08/382527.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/382527.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/382527.html</trackback:ping><description><![CDATA[<p><strong>3.4 分析业务用例场景</strong></p> <p>分别针对上节中业务用例视图中的每一个用例，分析该业务用例在实际工作中是如何做的，一般使用业务活动图来表述业务场景。在这个阶段，有几点需要特别注意的地方：</p> <p>1、关注参与业务用例的各个参与者是如何协同的，如一个简化的用户开户的流程就是填写营业员提交开户订单-》主管审批订单-》施工人员履行订单；</p> <p>2、对一个业务用例，如果有不同的实现路径，需要做不同的场景分析。例如，用户订购产品，分网上订购和营业厅订购这两种场景，两个场景大不相同；</p> <p>3、场景的步骤粒度：用户的一个完整操作目的，如用户开户，则用户填写订单是一个步骤，而不用细化到用户取单、拿笔填单等；</p> <p>&nbsp;</p> <p><strong>3.5 产生业务对象模型</strong></p> <p>针对每个业务用例，根据业务用例场景，分析该用例中涉及的业务实体，并绘制业务对象模型图。</p> <p>&nbsp;</p> <p><strong>3.6 产生业务用例实现视图</strong></p> <p>业务用例实现指业务用例的一种实现路径，一个业务用例实现对应着一个业务用例场景。业务用例实现视图是表述业务用例实现的视图。</p> <p><strong></strong>&nbsp;</p> <p><strong>3.7 分析业务用例实现场景</strong></p> <p>业务用例实现场景着重描述如何通过人机交互来完成业务，是业务用例场景的具体化。一般用活动图来表述人机交互流程。这里每个步骤的粒度是人与系统或系统与人的一次交互。</p> <p><strong>3.8 领域建模</strong></p> <p>领域模型是描述特定问题域的对象及其相互关系。领域模型对业务对象做了进一步的精化。领域建模的步骤如下：</p> <p>1、确定问题域：如CRM中的客户模型比较关键，我们决定对其进行领域建模，则需要将设计客户业务实体的用例全部识别出来；</p> <p>2、领域建模：逐一分析涉及到操作客户模型的业务用例场景，识别领域对象以及对象之间的关系；</p> <p>3、验证领域模型：使用序列图作为工具，基于领域模型来编排实现各业务场景，如果能实现，证明领域模型ok。</p> <p>领域对象跟业务对象有区别，我认为，业务对象不是领域对象。业务对象来自于业务用例，是业务中客观存在的，而领域对象是对业务对象做进一步抽象、精化后的结果，是人对业务的主观认识，这就是为什么不同厂商的产品模型会不一样的原因，而且并不是所有的领域对象都是根据业务对象分析而来的。比如，某CRM产品面向全球市场，可定制能力是关键，为提升可定制性，需要构建一个快速开发框架，这个快速开发框架也是软件系统的一部分，也是有领域模型的，但是它的领域模型跟业务对象没半点关系。</p> <p>&nbsp;</p> <p><strong>3.9 产生逻辑架构草稿</strong></p> <p>通过上述步骤，我们已经有了部分领域模型，针对每一个可直接映射到业务对象一级的领域对象，可规划相应的业务模块，如有开户订单，那么可以有订单管理，有客户管理等。业务模块的划分粒度可依据大概的工作量而定，保证最低级别的业务模块的工作量是大致均匀的。这仅仅是一个建议，可以根据项目的实际情况决定。</p> <p>基于上述的成果，我们还只能产出一个逻辑架构的草稿，因为我们还没有分析质量属性，后续对质量属性做设计的时候，还有可能会引入新的模块。比如要让业务流程可快速编排、定制，我们希望引入工作流，那么逻辑架构中也要引入一个工作流模块。</p> <p>&nbsp;</p> <p>待续。。。</p><img src ="http://www.blogjava.net/landy/aggbug/382527.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-07-08 15:17 <a href="http://www.blogjava.net/landy/archive/2012/07/08/382527.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软件架构设计（二）&amp;mdash;&amp;mdash;软件架构设计过程</title><link>http://www.blogjava.net/landy/archive/2012/07/04/382231.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Wed, 04 Jul 2012 14:28:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/07/04/382231.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/382231.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/07/04/382231.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/382231.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/382231.html</trackback:ping><description><![CDATA[<p><strong>三、架构设计的过程</strong></p> <p>本人经历过不少项目，一些项目的架构设计负责人能力很强，接到活之后，马上一头扎进设计，抽象出一堆玄玄乎乎的概念，讲得人晕头转向的，让人觉得高深莫测，但是，在会议上却被涉众提的一些简单的问题问得很仓促，究其根本，还是漏考虑了涉众的需求，被人提问而又缺乏准备，是不是很多人有类似的经验？：）</p> <p>我们还经常遇到的场景是设计人员通常为一些模型、概念争论不休，公说公的英俊，婆说婆的漂亮，其实模型概念这东西就像人的人生观和世界观，是人对世界和人生的主观认识，可能随着年龄阶段的变化而变化，而且有时候没有绝对的对与错，就像有些人喜欢金戈铁马，有些人喜欢与世无争，我们很难说谁一定是对的一定是错的！遇到这种清醒时，我建议停下争论，争论方各自拿出实际的业务场景来检验模型，哪个模型对场景的满足度更好，实现成本更低则更好，如果两个都挑不出刺儿，随便选一个即可。</p> <p>还有一些架构设计人员喜欢创造一些与众不同的概念，让人看上去显得高深莫测。我觉得如果一个架构师能够用最少的语言、文字把问题和方案讲清楚，那才是真正的有水平！你让人晕头转向的时间既是项目的成本，因此，我们创造概念词汇的时候，需要从涉众的角度出发，我这里的意思不是盲从涉众语言词汇，而是说出发点从涉众角度出发，如果涉众原本使用的语言不够准确，我们可以跟他们一起探讨，定义更合适的概念词汇。</p> <p>还有一个就是对软件竞争力的认识。有人通过包装一堆玄玄乎乎的概念来显得很高深莫测，试图通过这种方式让人觉得有竞争力，我认为，竞争力首先是要跟对手比，其次一定是涉众能感知的，能够涉众带来正向价值的，比如省多少成本，端到端业务流程节约多少时间。</p> <p>我认为遵循一个科学的架构设计过程跟上篇提到的软件架构4+1视图法是架构设计的两个法宝，一个指导思维、定义输出，另一个指导如何来做，相辅相成，确保架构设计人员全面而正确的理解需求，做好需求平衡、设计平衡，设计出实用的、能落地的架构。</p> <p>下面我会按顺序讲解架构设计的过程，以及每个步骤具体要做的事情。</p> <p><strong>3.1 确定涉众</strong></p> <p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>一般来讲，涉众包括客户（资方）、承接方（劳方）、用户。我们通常找到代表某一类型的涉众群体的代表人：客户代表、劳方代表、用户代表等。访谈的时候直接找代表进行。</p> <p><strong>3.2 确定系统边界</strong></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于要明确实现某种标准的软件系统，通常确定边界非常容易，直接按标准圈定的scope分析即可，比如像SIPServlet容器，是要求遵从JSR168规范的，那么软件系统的Scope就是JSR168规定的Scope，但是也有例外，比如客户或者劳方明确指定要复用一个现有的实现了部分功能的系统或组件，那么Scope就不同了。对于没有标准的软件系统，就需要分别访谈客户代表、承接方代表确定系统边界。为什么要访谈承接方代表呢？因为承接方代表往往是劳方领导，领导肩负企业战略达成的使命，很有可能对系统提出比客户更多的要求。举个例子，某客户需要一个SIP通信协议栈，以实现三方通话的业务，但是劳方领导认为，后续ICT融合是趋势，我们构建的系统要支持ICT融合应用部署和运行，支持业务标准JSR168规范。</p> <p><strong>3.3 软件需求收集</strong></p> <p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>软件需求可分为二类：</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 功能需求（即业务用例）：描述Actor（用户或系统）可基于软件系统做什么事，要符合什么业务规则；</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 非功能性需求又可分为两类：</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 质量属性：质量属性指软件系统的品质，可分为运行期质量属性与开发期质量属性。</p> <blockquote> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 运行期质量属性包括</p></blockquote> <blockquote> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; （1）性能：性能是指软件系统及时提供相应服务的能力。具体而言，性能包括速度、吞吐量和持续高速性这三方面的要求。<br>　　（2）安全性：指软件系统同时兼顾向合法用户提供服务，又阻止非授权使用功能的能力。<br>　　（3）易用性：指软件系统易于使用的程度。<br>　　（4）可用性：可用性与易用性不相同。可用性指系统长时间无故障运行的能力。<br>　　（5）可伸缩性：指当用户增加时，软件系统维持高服务质量的能力。<br>　　（6）互操作性：指本软件系统与其他系统交换数据和相互调用服务的难易程度。<br>　　（7）可靠性：软件系统在一定时间内无故障运行的能力。<br>　　（8）健壮性：也称容错性。是指软件系统在异常情况仍能够正常运行的能力。</p></blockquote> <blockquote> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 开发期质量属性包括：</p></blockquote> <blockquote> <p>&nbsp;&nbsp; （1）易理解性：是指系统设计能被开发人员理解的难易程度。<br>　　（2）可扩展性：为适应新需求或者需求变化，为软件增加功能的能力。有些时候，称之为灵活性。<br>　　（3）可重用性：重用软件系统或其中一部分的能力的难易程度。<br>　　（4）可测试性：对软件测试以证明其满足需求规约的难易程度。在实际的项目中，主要指进行单元测试等难易程度。<br>　　（5）可维护性：修改Bug，增加功能，提高质量属性。<br>　　（6）可移植性：将软件系统从一个运行环境转移到另一个不同的运行环境的难易程度。</p></blockquote> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 约束：规定开发软件系统时必须遵循的限制条件，如要基于什么操作系统，要基于什么开发语言等等。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于功能需求，可找系统的直接使用用户代表，对其进行访谈，收集其要基于系统做的事情，可按照标准的用例模板，在访谈的过程中引导用户代表。之后，绘制业务用例视图，并针对每个业务用例，使用标准的用例模板将功能需求编档，通常叫用例规约。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于非功能性需求，可找软件系统的涉众，依据下面的模板，引导涉众，收集其对相应质量属性的要求：</p> <p><a href="http://www.blogjava.net/images/blogjava_net/landy/WindowsLiveWriter/152c53fb67fc_1336A/image_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogjava.net/images/blogjava_net/landy/WindowsLiveWriter/152c53fb67fc_1336A/image_thumb.png" width="299" height="406"></a> <a href="http://www.blogjava.net/images/blogjava_net/landy/WindowsLiveWriter/152c53fb67fc_1336A/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogjava.net/images/blogjava_net/landy/WindowsLiveWriter/152c53fb67fc_1336A/image_thumb_1.png" width="304" height="411"></a> <a href="http://www.blogjava.net/images/blogjava_net/landy/WindowsLiveWriter/152c53fb67fc_1336A/image_6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.blogjava.net/images/blogjava_net/landy/WindowsLiveWriter/152c53fb67fc_1336A/image_thumb_2.png" width="293" height="415"></a> </p> <blockquote> <p><strong>总结：本阶段需要输出业务用例视图，业务用例规约，非功能性需求。</strong></p> <p><strong>待续。。。</strong></p></blockquote><img src ="http://www.blogjava.net/landy/aggbug/382231.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-07-04 22:28 <a href="http://www.blogjava.net/landy/archive/2012/07/04/382231.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>参与需求调研后的思考</title><link>http://www.blogjava.net/landy/archive/2012/06/26/381548.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Tue, 26 Jun 2012 13:52:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/06/26/381548.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/381548.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/06/26/381548.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/381548.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/381548.html</trackback:ping><description><![CDATA[<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">刚在某客户做了3个月的需求调研，亲自体验了需求调研的过程，有一些感想，总结下来。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">客户方配备了BA和SA，BA是业务专家，SA是技术专家，负责输出一个描述业务需求文档XXXS，将流程和需求都记述在该文档中，和大多数客户一样，客户的优势在于对他们的业务比较了解，但是对于如何去抽象业务，比较系统的把他们的业务需求归纳并描述下来，并不擅长，至少很多人不擅长，这就导致客户方的XXXS文档中通常是一些需求片段和样例。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">我方对一个topic，分配了SA和BA，其中SA负责技术方案，而BA负责理解业务并澄清业务，topic的输出件有XXD和XXS，XXD主要记述业务流程和topic级的solution，XXS主要记述系统的功能。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">XXD中的业务流程，准确的来讲，应该改名叫系统流程，是讲述业务功能操作是如果由解决方案各个内部子系统及外部系统协同完成的。这其中的actor是系统，因此，是从系统的角度来描述的。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">XXXS中，模板像系统用例文档，但是里面的一个个单元是叫功能，功能与用例的差别就是，一个是从系统的角度出发，一个是从Actor（即用户）的角度出发，对每个功能，有功能描述，功能的前置条件、后置条件、功能的用户角色、业务规则，输入规格，输出规格，如果涉及到界面，就有界面原型。具体的内容，通常pre-condition是千篇一律的，如用户必须已登录什么的，后置条件通常是结果，而角色通常是一个很泛的一个总称（比如在厨房干活的分切菜的，炒菜的，统称厨子）。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">对于客户方描述的不清楚或者只描述了几个片段或例子的需求，我们采用prototype的方式，先按照自己的理解做prototype，然后给客户去演示，由客户来决定是否符合他们要求。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">是不是看上去很完美？</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">再看看几个问题：</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">问题一：对客户方的某个需求，我方一直不理解客户方为什么会提这么怪异的需求，觉得不可思议，而客户方一直坚持要这个功能！</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">问题二：客户方并不具备多么深厚的业务抽象功力，我们自己通过蒙着眼睛摸象的方式作出原型给客户方评审，客户方say  ok就ok，不ok就不ok，客户方不会犯错误吗？客户方会照顾你其它客户的需求吗？我们拒绝客户方的理由通常是实现不了，或者工作量太大。我们绝大多数人没法使用客户的业务语言告诉客户，你的目的是什么，你要求怎么来做，这样做有什么样的坏处，我建议这么做，这么做能获得什么样的好处。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">问题三：我们把一些业务角色使用的功能和运维人员使用的功能放置于一个界面中，从功能上来讲，我们可以自豪的告诉客户，我们实现了你要的功能。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">。。。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">我相信我了解到的问题绝不是全部，还有很多我不知道的问题。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">对这种状况，我逐一分析了一下原因：</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">问题一：因为我们理解的业务概念跟客户理解的客户概念不一样，虽然我们叫的是同一个名词，但实际上并不是同一个东西，从而导致我们觉得客户提的要求匪夷所思；</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">问题二：我可以说，其实我们的做法是去摸清楚客户要什么，但没有去理解他为什么要；</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">问题三：很明显，我们实现了功能，但忽略了功能的使用者是谁；</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">这一切的根源是什么？我认为，这根源是我们一直从系统的角度去思考问题，思考我们的系统功能，思考我们的系统流程，对一个经验丰富的专家来讲，也许会考虑的比较全面，但绝大多数人往往是重视了功能的描述，而且描述是基于我方的语言，忽略了功能的用户，而我们没有一个万能的客户和万能的专家帮我们指出交付件的所有的问题。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">即便是我们成功交付了一个系统，我们还是没有消化客户为什么要这么做的原因，对业务系统来讲，这是最核心的价值之一。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">我们要怎么改？我的建议是：</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">1、<strong>加入</strong>对&#8220;用户需求背景&#8221;的调研，即真正的&#8220;业务调研&#8221;，在这个阶段的主角是BA，BA是业务专家，对IT技术不熟，这是他的优势，这个阶段的输出件要包括客户的业务架构，包括组织结构，人员角色，业务流程（是各业务人员如何协同来完成工作，跟系统流程有本质区别），业务模型（用户做的事情中涉及到的一些概念，这里指纯业务概念，客户能感知的，非系统概念）。经过这个阶段，我们应该能明白客户为什么会提这个那个需求，能够有效避免因为客户的片面和狭隘导致我们跟着片面和狭隘，并且我们知道了客户说的概念A是指什么，概念B是指什么，跟我们平常所说的有什么不同。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">2、<strong>扭转</strong>&#8220;功能分析&#8221;的角度，由从系统的角度分析转变成由用户的角度分析。把功能变成用户基于系统所做的操作分析（系统用例），首先搞清楚是谁，然后是要基于系统做什么事情，有什么业务规则，前置条件和后置条件是什么，再次是系统通过什么样的界面或接口来支持。输出的内容看似都差不多，但因为是从用户的角度出发分析的，提供的功能自然会更贴用户的心。</div> <div style="padding-bottom: 5px; text-indent: 15px; margin-top: 14pt; margin-right: 0px; margin-bottom: 14pt; margin-left: 0px; ">3、我们要明白一个基本原则，业务架构是不依赖于IT系统存在的，IT系统是规范业务运作和提升业务效率的工具，IT系统中的软件概念是业务概念在软件系统中的投影，千万不能从技术的角度出发，视图去重定义业务概念。</div></div><img src ="http://www.blogjava.net/landy/aggbug/381548.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-06-26 21:52 <a href="http://www.blogjava.net/landy/archive/2012/06/26/381548.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>业务建模一般步骤和方法</title><link>http://www.blogjava.net/landy/archive/2012/03/24/372626.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sat, 24 Mar 2012 13:46:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/24/372626.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/372626.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/24/372626.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/372626.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/372626.html</trackback:ping><description><![CDATA[转载自：<a href="http://hi.baidu.com/parryblog/blog/item/2d1ae59a72b043bcc9eaf4a0.html">http://hi.baidu.com/parryblog/blog/item/2d1ae59a72b043bcc9eaf4a0.html</a>&nbsp;<br />本篇开始之前先扯点闲话，商业应用系统开发经历了三个阶段：<br />　　第一个阶段以计算为中心，分析设计围绕程序的运行效率，算法优劣，存贮优化来进行。90年代的大学课程讲的都是这些。<br /><br />　　第二阶段以数据为中心，分析设计围绕数据流进行，以数据流程来模拟业务流程。这也就是所谓的面向过程的分析模式。<br /><br />　　第三阶段以人为中心，分析设计围绕人的业务需求，使用要求，感受要求进行。这也就是现在的面象对象分析模式。<br /><br />　　使用OO方法建立商业模型必须先定义涉众。商业系统无论多复杂，无论什么行业，其本质无非是人，事，物，规则。人是一切的中心，人做事，做事产生物，规则限制人事物。人驱动系统，事体现过程，物记录结果，规则则是控制。无论OO也好，UML也好，复杂的表面下其实只是一个简单的规则，系统分析员弄明白有什么人，什么人做什么事，什么事产生什么物，中间有什么规则，再把人，事，物之间的关系定义出来，商业建模也就基本完成了。这时候可以说，系统分析员已经完全了解了用户需求，可以进入系统建模阶段了。<br /><br />　　书归正传，上篇笔者归纳了一些典型的涉众类型及他们的普遍期望。接下来，就是要将他们这些期望定义出来。这个过程，就是业务用例获取的过程。笔者可以跟大家分享的经验是通过以下步骤进行，这些步骤并非唯一正确，对于经验不多的系统分析员来说，这些步骤很有指导意义。<br /><br />　　笔者做了一个建模实例，有需要有读者请到笔者的BLOG资源中心下载，实例以上一篇所述网上图书馆需求为蓝本建立了业务用例模型，之后的概念模型、系统模型则抽取了其中的借阅过程作为例子。不记得了可以后头找找。<br /><br />　　建模第一步，从涉众中找出用户。并定义这些用户之间的关系。在ROSE中，应该使用business actor 类型。参考上一篇的需求描述，下载实例<br /><br />第二步，找出每个用户要做的事，即业务用例，在ROSE中应使用Business use case类型。请参考《用例的类型与粒度》一文以帮助确定用例的粒度。笔者强烈建议为每一个business actor绘制一个业务用例图，这能很好的体现以人为中心的分析模式，并且不容易漏掉business actor需要做的事。至于以参与者为中心的视图容易漏掉某个业务用例的参与者的担心，可以在第四步中得到消除。下载实例<br /><br />　　第三步，利用业务场景图帮助分析业务流程，在ROSE中，这个阶段最好使用活动图Activity diagram。在这个阶段，业务场景图非常重要，在绘制过程中，系统分析员必须采用第一步中定义的用户名字作为泳道名，使用第二步中定义的业务用例名作为活动名来绘制。必须这么做的原因是，如果你无法把利用已经定义出来的 business actor 和 business use case完备的描绘业务流程，那么一定是前面的定义出问题了，你需要回头审视是否 business actor 和 business use case定义不完善或错误。如果不是所有的business actor 和 business use case 都被用到，要么应该检查业务流程调研时漏了什么，要么应该检查是否定义了一些无用的business actor 和 business use case 。同时，绘制业务场景图也非常有助于选择合适的用例粒度并保持所有的用例都是同一粒度。下载实例<br /><br />　　第四步，绘制用例场景图。与业务场景图不同的是，用例场景图只针对一个用例绘制该用例的执行过程。笔者仍然强烈推荐使用activity diagram。在用例场景图的绘制中，必须使用第一步中定义的业务用户作为泳道。必须这么做的原因是，它能帮助你发现在定义业务用例图时的错误，比如是否漏掉了某个业务用例的潜在使用者。不是每个业务用例都需要绘制场景图，只有两三个步骤的业务用例是不必一定绘制业务用例图的，但仍然需要在业务用例规约文档中写明。下载实例<br /><br />第五步，从第三步或第四步中绘制的活动图中找到每一步活动将使用到的或产生的结果。这是找到物的过程。找到后，应当建立这些物之间的关系。在ROSE中，这称为业务实体模型。应该使用business entity 类型。下载实例<br /><br />　　第六步，在上述过程中，随时补充词汇表Glossary。将此过程中的所有业务词汇，专业词汇等一切在建模过程中使用到的需要解释的名词。这份文档将成为模型建立人与读者就模型达成一致理解的重要保证。<br /><br />　　第七步，根据上一篇中提到的业主，老板等涉众的期望审视建立好的模型，确定业务范围，决定哪些业务用例在系统建设范围内。那些不打算纳入建设范围内的业务用例有两种情况，一种是该业务用例是被调用一方，那么应该把它改为 boundary 类型，意味着将来它是一个外部接口。另一种是该业务用例主动调用系统内业务用例，那么应该将它改为business actor类型。与普通business actor不同的是，由业务用例转换而成的business actor不是人，而通常是一个外部系统进程，因此应该在被调用的系统内业务用例与它之间增加一个boundary元素，意味着我们的系统将为这样一个外部进程提供一个接口。严格来说，那些需要纳入建设范围的business use case 应当对应的生成一个 business use case realization， 以后的设计工作将归纳到这些实现用例中。但笔者觉得这一步并非很关键的，实际中本人也经常省略这一步，而将协作图，象活动图，类交互图等直接在business usecase下说明。不过本实例中笔者还是按照正规方法来建模的。下载实例<br /><br />　　需要说明的是，上述的步骤并非一次性完成的，在每一个步骤中都可能导致对以前步骤的调整。即使建模已经完成，当遇到变化或发现新问题时，上述步骤应当从头到尾再执行一次。这也是RUP倡导的迭代开发模式。<br /><br />经过以上的步骤，我们已经建立了一个完整的业务模型。但这决不是建模工作的全部，以上过程只说明了建立一个完整业务模型的过程，不能说这样就建立了一个很好的业务模型。因为上述的过程中并没有提及业务分析过程。分析过程全凭系统分析员的经验，对OO的理解和对行业业务的把握能力，对原始业务模型进行归纳，整理，抽象，重构，以建立一个更高效，合理，扩展性更强的模型。这个过程无法以步骤说明。或许以后笔者会专门针对模型分析写点东西。另外除了模型，还至少需要写业务架构文档、用例规约和补充用例规约三种文档。因为模型虽然可以较好的体现业务架构，但很不好表达业务规则和非业务需求，这些需要在文档中说明。例如用例的前置条件和后置条件就是一种业务规则。读者可以在RUP文档中找到这些文档的模板。<img src ="http://www.blogjava.net/landy/aggbug/372626.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-24 21:46 <a href="http://www.blogjava.net/landy/archive/2012/03/24/372626.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Top Ten Use Case Mistakes</title><link>http://www.blogjava.net/landy/archive/2012/03/24/372591.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 23 Mar 2012 20:19:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/24/372591.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/372591.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/24/372591.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/372591.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/372591.html</trackback:ping><description><![CDATA[<a href="http://drdobbs.com/184414701">http://drdobbs.com/184414701</a>&nbsp;<br /><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Read part 1:&nbsp;<a href="http://drdobbs.com/articles/2000/0012//documents/sdm0012c/" style="color: #003bb0; ">Driving Design with Use Cases</a>&nbsp;<br />Read part 2:&nbsp;<a href="http://drdobbs.com/articles/2001/0101//documents/sdm0101c/" style="color: #003bb0; ">Driving Design: The Problem Domain</a></p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Welcome to the third in a series of five articles that provides a prepublication look at the annotated example from the forthcoming book,&nbsp;<em>Applied Use Case Driven Object Modeling</em>(Addison-Wesley, 2001; tentatively scheduled for April). We're following the process detailed in our first book,&nbsp;<em>Use Case Driven Object Modeling with UML</em>&nbsp;(Addison-Wesley, 1999), as we dissect the design of an Internet bookstore. In this article, we show common mistakes, and then explain how to correct them.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Within the ICONIX process, one of the early steps involves building a use case model. This model is used to capture the user requirements of a new system (whether it's being developed from scratch or based on an existing system) by detailing all the scenarios that users will perform. Use cases drive the dynamic model and, by extension, the entire development effort.</p><table width="310" border="0" cellpadding="5" align="right" bgcolor="FEFEC0" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr><td><strong>Figure 1. The "Big Picture" for Use Case Driven Object Modeling</strong><br /><center><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0102c/0102cf1.gif" width="300" height="226" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br /></center>The diagram portrays the essence of a streamlined approach to software development that includes a minimal set of UML diagrams and some valuable techniques that take you from use cases to code quickly and efficiently.</td></tr></tbody></table><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Figure 1 shows where use case modeling resides within the "big picture" of the ICONIX process.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><strong>The Key Elements</strong><br />The task of building use cases for your new system is based on immediately identifying as many as you can, and then establishing a continuous loop of writing and refining the text that describes them. Along the way, you will discover new use cases, and also factor out commonality in usage.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">You should keep one overriding principle in mind during your effort to identify use cases: They should have strong correlations with material found in the system's user manual. The connection between each use case and a distinct section of your user guide should be obvious. It reinforces the fundamental notion that you are designing a system that will conform to the viewpoints of the users. It also provides a convenient summary of what "use case driven" means: Write the user manual, then write the code. If you're reengineering a legacy system, you can simply work backward from the user manual.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Once you have some text in place for a use case, it's time to refine it by making sure the sentences are clear and discrete, the basic format of your text is noun-verb-noun, and the actors and potential domain objects are easy to identify. You should also update your domain model&#8212;the subject of our previous article, "<a href="http://drdobbs.com/articles/2001/0101//documents/sdm0101c/" style="color: #003bb0; ">Driving Design: The Problem Domain</a>" (Jan. 2001)&#8212;as you discover new objects and expand your understanding of the objects you'd previously found. And, it's important to determine all possible alternate courses of action for each use case wherever possible, an activity which should take up the majority of the time.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">You can use several mechanisms to factor out common usage, such as error handling, from sets of use cases. This is usually effective, because breaking usage down to atomic levels will ease the analysis effort and save you lots of time when drawing sequence diagrams. Whether you use UML's generalization and&nbsp;<em>includes</em>&nbsp;and&nbsp;<em>extends</em>&nbsp;relationships, or OML's&nbsp;<em>invokes</em>&nbsp;and<em>precedes</em>&nbsp;relationships, which we recommend in our book, your goal should be a set of small, precise, reusable use cases.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">You should feel comfortable proceeding to the next phases of the development process when you've achieved the following goals:</p><ul style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">You've built use cases that together account for all of the desired functionality of the system.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">You've produced clear and concise written descriptions of the basic course of action, along with appropriate alternative courses of action, for each use case.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">You've factored out scenarios common to more than one use case, using whichever constructs you're most comfortable with.</li></ul><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><strong>The Top 10 Use Case Modeling Errors</strong><br />Contrary to the principles we just discussed are a number of common errors that we have seen students make when they're doing use case modeling on their projects for the first time. Our "top 10" list follows.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">10.&nbsp;<em>Don't write functional requirements instead of usage scenario text.</em>&nbsp;Requirements are generally stated in terms of what the system shall do, while usage scenarios describe actions that the users take and the responses that the system generates. Eventually, our use case text will be used as a run-time behavioral specification for the scenario we'll describe, and this text will sit on the left margin of a sequence diagram. We want to be able to easily see&nbsp;<em>how</em>the system (shown with objects and messages) implements the&nbsp;<em>desired behavior</em>, as described in the use case text. So, we need to clearly distinguish between usage descriptions (behavior) and system requirements.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">9.&nbsp;<em>Don't describe attributes and methods rather than usage.</em>&nbsp;Your use case text shouldn't include too many presentation details, but it should also be relatively free of details about the fields on your screens. Field names often match the names of attributes on your domain classes, which we discussed in January's article. Methods shouldn't be named or described in use case text because they represent how the system will do things, as opposed to what the system will do.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">8.&nbsp;<em>Don't write the use cases too tersely.</em>&nbsp;When it comes to writing text for use cases, expansive is preferable. You need to address all of the details of user actions and system responses as you move into robustness analysis and interaction modeling, so you might as well put some of those details in your use cases. Remember also that your use cases will serve as the foundation for your user manual. It's better to err on the side of too much detail when it comes to user documentation.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">7.&nbsp;<em>Don't divorce yourself completely from the user interface.</em>&nbsp;One of the fundamental notions of "use case driven" is that the development team conforms the design of the system to the viewpoints of the users. You can't do this without being specific as to what actions the users will perform on your screens. As we mentioned for item number nine, you don't need to talk about fields in your use case text, and you don't want to discuss the cosmetic appearance of your screens; however, you can let your prototypes, in whatever form they take, do that work for you. You do need to discuss those features of the user interface that allow the user to&nbsp;<em>tell the system to do something</em>.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">6.&nbsp;<em>Don't avoid explicit names for your boundary objects.</em>&nbsp;Boundary objects are the objects with which actors will interact. These frequently include windows, screens, dialogs and menus. In keeping with our theme of including ample detail and being explicit about user navigation, we submit that it's necessary to name your boundary objects explicitly in your use case text. It's also important to do this because you will explore the behavior of these objects during robustness analysis (the subject of the next article in this series), and it can only reduce ambiguity and confusion to name them early.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">5.&nbsp;<em>Don't write in the passive voice, using a perspective other than the user's.</em>&nbsp;A use case is most effectively written from the user's perspective as a set of present-tense verb phrases in active voice. The tendency of engineers to use passive voice is well-established, but use cases should state the actions that the user performs, and the system's responses to those actions. This kind of text is only effective when it's expressed in the active voice.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">4.&nbsp;<em>Don't describe only user interactions; ignore system responses.</em>&nbsp;The narrative of a use case should be event- response oriented, as in, "The system does this when the user does that." The use case should capture a good deal of what happens "under the covers" in response to what the actor is doing, whether the system creates new objects, validates user input, generates error messages or whatever. Remember that your use case text describes both sides of the dialog between the user and the system.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">3.&nbsp;<em>Don't omit text for alternative courses of action.</em>&nbsp;Basic courses of action are generally easier to identify and write text for. That doesn't mean, however, that you should put off dealing with alternative courses until, say, detailed design. Far from it. In fact, it's been our experience that when important alternative courses of action are not uncovered until coding and debugging, the programmer responsible for writing or fixing the code tends to treat them in ways that are most convenient for him. Needless to say, this isn't healthy for a project.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">2. Don't focus on something other than what is "inside" a use case, such as how you get there or what happens afterward. Several prominent authors, such as Alistair Cockburn and Larry Constantine, advocate the use of long, complicated use case templates. Spaces for preconditions and post-conditions are generally present on these templates. We like to think of this as the 1040 "long form" approach to use case modeling, in comparison to the 1040EZ-like template that we advocate (two headings: Basic Course and Alternate Course). You shouldn't insist on using long and complex use case templates just because they appeared in a book or article.&nbsp;<img src="http://twimgs.com/ddj/sdmagazine/images/sdm0102c/0102cf4.gif" width="29" height="28" align="top" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">1. Don't spend a month deciding whether to use includes or extends. In our years of teaching use case driven development, we've yet to find a situation where we've needed more than one mechanism for factoring out commonality. Whether you use UML's include construct, or OML's invoke and precede mechanisms, or something else that you're comfortable with, doesn't matter; simply pick one way of doing things and stick with it. Having two similar constructs is worse than having only one. It's just too easy to get confused&#8212;and bogged down&#8212;when you try to use both. Don't spin your wheels.&nbsp;<img src="http://twimgs.com/ddj/sdmagazine/images/sdm0102c/0102cf4.gif" width="29" height="28" align="top" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><a name="figure2_return" style="color: rgb(0, 59, 176); text-decoration: underline; "></a><a href="http://drdobbs.com/184414701#figure2" style="color: #003bb0; ">Figure 2</a>&nbsp;shows use case text that contains violations of five of the top 10 rules.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Did you spot the violations?</p><ul style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Use case one is too terse. There is no reference to what kind of information the customer enters, nor to the page he or she is looking at. The text doesn't explain what is involved in validating the data that the customer entered. And the use case doesn't describe how the customer needs to respond to an error condition.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Use case two doesn't have explicit names for the relevant boundary objects.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Use case three reveals how useless it can be to obsess about using a complicated use case template. The name of the use case expresses the goal clearly enough; the content of the basic course will make the stated precondition and postcondition redundant.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Use case four lacks alternate courses, even though it should be fairly clear from the context that some validation needs to occur, and that there are several possible error conditions (for instance, the system can't find the e-mail address, or the password that the customer entered doesn't match the one that is stored).</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Use case five doesn't specify how the system responds when the customer presses the update button.</li></ul><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><a name="figure3_return" style="color: rgb(0, 59, 176); text-decoration: underline; "></a><a href="http://drdobbs.com/184414701#figure3" style="color: #003bb0; ">Figure 3</a>&nbsp;shows the use case text with the mistakes corrected.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Our next article will demonstrate how to do robustness analysis in order to tighten up use cases and make it easier to head into detailed design. See you next month.</p><a name="figure2" style="color: rgb(0, 59, 176); text-decoration: underline; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: rgb(249, 250, 252); font-size: medium; "></a><table width="410" border="0" cellpadding="5" bgcolor="FEFEC0" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr><td><strong>Figure 2. The 1040 "Long Form" Approach to Use Cases</strong><br /><center><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0102c/0102cf2.gif" width="400" height="695" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br /></center>Use case text that contains violations of five of the top 10 rules.</td></tr></tbody></table><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">[<a href="http://drdobbs.com/184414701#figure2_return" style="color: #003bb0; ">back to text</a>]</p><a name="figure3" style="color: rgb(0, 59, 176); text-decoration: underline; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: rgb(249, 250, 252); font-size: medium; "></a><table width="410" border="0" cellpadding="5" bgcolor="FEFEC0" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr><td><strong>Figure 3. The 1040EZ Approach to Use Cases</strong><br /><center><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0102c/0102cf3.gif" width="400" height="853" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br /></center>The use case text with the mistakes corrected.</td></tr></tbody></table><img src ="http://www.blogjava.net/landy/aggbug/372591.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-24 04:19 <a href="http://www.blogjava.net/landy/archive/2012/03/24/372591.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Driving Design: The Problem Domain</title><link>http://www.blogjava.net/landy/archive/2012/03/24/372590.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 23 Mar 2012 20:17:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/24/372590.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/372590.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/24/372590.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/372590.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/372590.html</trackback:ping><description><![CDATA[<a href="http://drdobbs.com/architecture-and-design/184414689">http://drdobbs.com/architecture-and-design/184414689</a>&nbsp;<br /><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Read Part 1:&nbsp;<a href="http://drdobbs.com/articles/2000/0012//documents/sdm0012c/" style="color: #003bb0; ">Driving Design with Use Cases</a>&nbsp;<br /></p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Welcome to the second in a series of five articles that provide a pre-publication look at the annotated example from our forthcoming book&nbsp;<em>Applied Use Case Driven Object Modeling</em>(Addison-Wesley, 2001; tentatively scheduled for April). We're following the process detailed in our first book,&nbsp;<em>Use Case Driven Object Modeling with UML</em>&nbsp;(Addison-Wesley, 1999), as we dissect the design of an Internet bookstore.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">The focus of this article is domain modeling. The term "problem domain" refers to the area that encompasses real-world things and concepts related to the problem that the system is being designed to solve. Domain modeling is the task of discovering "objects" (classes, actually) that represent those things and concepts.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">You may wonder why we're starting a series on use case driven object modeling by writing about the seemingly unrelated subject of domain modeling. The reason is that we write our use cases in the context of the object model (which we'll discuss in next month's article), instead of from an abstract, pure user viewpoint. This process allows us to connect the static and dynamic portions of the model, which is essential if we're going to drive our application design forward from the use cases. The domain model serves as a glossary that the writers of use cases can use in the early stages of that effort.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Within the ICONIX process, domain modeling involves working outward from the data requirements to build a static model of the problem domain relevant to the proposed system. This inside-out approach contrasts with the outside-in approach we take toward user requirements, which we'll describe in the third article in this series. (The fourth article, about robustness analysis, will describe how the domain modeling and use case development paths merge.)</p><table width="410" border="0" bgcolor="FEFEC0" align="right" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr><td><strong>Figure 1. The "Big Picture" for Use Case Driven Object Modeling</strong><br /><center><img src="http://i.cmpnet.com/ddj/sdmagazine/images/sdm0101c/0101cf1.gif" width="400" height="301" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></center>The diagram portrays the essence of a streamlined approach to software development that includes a minimal set of UML diagrams and some valuable techniques that take you from use cases to code quickly and efficiently.</td></tr></tbody></table><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Figure 1 illustrates where domain modeling resides within the "big picture" for the ICONIX process.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><strong>Key Elements of Domain Modeling</strong><br />The first thing you must do when building a static model of your system is find appropriate classes that accurately represent the real abstractions that the problem domain presents. If you execute this activity well, you will not only have a solid foundation on which to build the system, but also excellent prospects for reuse by systems that will be designed and built over time.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">The best sources of classes are likely to be the high-level problem statement, lower-level requirements and expert knowledge of the problem space. To get started, lay out as many relevant statements from these areas (and even others, such as marketing literature) as you can find, and then circle, or highlight, all the nouns and noun phrases. As you work, refine the lists; gradually, nouns and noun phrases will become objects and attributes, while verbs and verb phrases will become operations and associations. Possessives ("its," "ours" and "theirs") tend to indicate that nouns should be attributes, rather than objects.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Next, sift through your list of candidate classes and eliminate unnecessary items. Look for classes that are redundant, irrelevant, incorrect or vague. Unessential classes may also represent concepts outside the scope of the model, or represent actions even though they're phrased as nouns: For example, Order Processor represents the nounification of the verb pharse, "process order."</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">You should also make some initial decisions about generalization ("kind of" or "is a" relationships among classes) while building your class diagram(s). If you need to, and you're comfortable doing so at this stage, generalize to more than one level of a subclass. Remember to look for kind-of statements that are true in the real world. Domain modeling is also the appropriate area for decisions about aggregations ("part of" or "has" relationships among classes).</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Finally, much like an entity-relationship diagram (ERD), your domain model, updated to show associations&#8212;the static relationships between pairs of classes&#8212;should be a true statement about the problem space, independent of time (that is, static). This model serves as the foundation of your static class model.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><strong>The Top 10 Domain Modeling Errors</strong><br />The flip side of the principles that we just discussed are a number of common errors that our students make when they're doing domain modeling for their projects. Our "top 10" list follows:</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">10.&nbsp;<em>Don't immediately assign multiplicities to associations.</em>&nbsp;Make sure that every association has an explicit multiplicity. Some associations on a class diagram represent one-to-one relationships, while others represent one-to-many relationships. These are both called multiplicities. However, you can avoid dealing with multiplicity altogether during domain modeling&#8212;it chews up time and can be a major cause of analysis paralysis, which we'll signal with this symbol.&nbsp;<img src="http://i.cmpnet.com/ddj/sdmagazine/images/sdm0101c/0101cf4.gif" align="top" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">9.&nbsp;<em>Don't do such an exhaustive noun and verb analysis that you pass out along the way.</em>&nbsp;Kurt Derr's&nbsp;<em>Applying OMT&nbsp;</em>(SIGS Books, 1995) is a good source of information about "grammatical inspection." If you follow Derr's advice to the letter, however, you'll likely reach such an extreme level of detail, at such a low level of abstraction, with regard to your objects, that you can't breathe. Use this technique to get your object discovery started, but take care not to get carried away.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">8.&nbsp;<em>Don't assign operations to classes without exploring use cases and sequence diagrams.</em>Take a minimalist approach to defining operations during domain modeling. In fact, don't assign any operations to classes during domain modeling, because there isn't enough information available with which to make good design decisions about operations at that stage. Wait until you begin interaction modeling, before you assign operations to classes.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">7.&nbsp;<em>Don't optimize your code for reusability before making sure you've satisfied the user's requirements.</em>&nbsp;The more general your objects and classes, the higher the probability that you'll be able to reuse those objects and classes for other projects. A complete class is one that is theoretically reusable in any number of contexts. However, in order to achieve reusability and completeness, you must consider both attributes and operations, and we just told you why you shouldn't be assigning operations to classes during domain modeling. So don't worry too much about making classes reusable when you're doing high-level class diagrams.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">6.&nbsp;<em>Don't debate whether to use aggregation or composition for each of your part-of associations.</em>&nbsp;Grady Booch's original descriptions of "has by reference" relationships morphed into aggregation within UML. Similarly, "has by value" became a "strong" form of aggregation called "composition" within which a "piece" class is "owned by" one larger class. Trying to differentiate between these two during a domain modeling effort is a definite way to do some serious tail-chasing. We much prefer to focus on simple aggregation during domain modeling. Aggregation versus composition is a detailed design issue.&nbsp;<img src="http://i.cmpnet.com/ddj/sdmagazine/images/sdm0101c/0101cf4.gif" align="top" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">5.&nbsp;<em>Don't presume a specific implementation strategy without modeling the problem space.</em>&nbsp;As part of the ongoing refinement of your domain model, you should remove anything that clearly states an action rather than a dependency or that is specifically related to implementation. Don't introduce things on your high-level class diagrams that represent commitments to specific technologies, whether it's a relational database or a particular kind of server. Leave implementation issues to implementation.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">4.&nbsp;<em>Don't use hard-to-understand names for your classes, like&nbsp;</em>cPortMgrIntf<em>, instead of intuitively obvious ones, like&nbsp;</em>PortfolioManager<em>.</em>&nbsp;Doing domain modeling up front helps everyone on the project team agree on what classes should be called. The more obvious the class names, the easier that task will be. Save acronyms and other kinds of abbreviations (if you insist on having them) for implementation.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">3.&nbsp;<em>Don't jump directly to implementation constructs such as friend relationships and parameterized classes.</em>&nbsp;UML offers lots of opportunities to add what we call "Booch stuff" to class diagrams. This includes constructs that come more or less directly from C++, such as abstract and parameterized classes and friend relationships. These are more relevant to the solution space than to the problem space, though, and the focus of domain modeling should definitely be the problem space.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">2.&nbsp;<em>Don't create a one-for-one mapping between domain classes and relational database tables.</em>&nbsp;If you're reengineering a legacy system that uses a relational database, the tables within that database are likely to be an excellent source of domain classes. However, be careful not to just bring them over to your static model wholesale. Relational tables can have lots of attributes that might not belong together in the context of an object model. You should use aggregation to factor groups of attributes into "helper" classes, which contain attributes and operations that are relevant to more significant classes.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">1.&nbsp;<em>Don't perform "premature patternization," which involves building cool solutions, from patterns, that have little or no connection to user problems.</em>&nbsp;Patterns often become visible during robustness analysis. As we'll explore in the fourth article of this series, there are two strategies, "control in the screen" and "use case controller," that lend themselves to discovering patterns connected to use cases. Looking ahead to interaction modeling, design patterns can be highly useful in the context of sequence diagrams and design-level class diagrams. However, domain modeling is not the time to start thinking in terms of patterns.</p><table width="410" border="0" bgcolor="FEFEC0" align="right" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr><td><strong>Figure 2. A Flawed Class Diagram</strong><br /><center><img src="http://i.cmpnet.com/ddj/sdmagazine/images/sdm0101c/0101cf2.gif" width="400" height="245" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></center>This class diagram violates the third, fifth, sixth, eighth and ninth rule from our top 10 list of domain modeling mistakes.</td></tr></tbody></table><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Figure 2 shows a class diagram that violates five of the top 10 rules.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Did you spot the violations?</p><ul style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The&nbsp;cBinaryTree&nbsp;class is a parameterized class (also known as a template class within UML). This violates rule number three. There is no good reason to define an implementation construct such as a binary tree at this stage of modeling.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The name of the&nbsp;cSessionBeanShpngCrt&nbsp;class indicates that the modeler has decided to represent the concept of a shopping cart using a session Enterprise Java Bean (EJB). This violates rule number five. Robustness analysis, which we'll discuss in the fourth article in this series, is the appropriate stage to explore how to map classes to Java Beans and so on.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">This class also has a composition relationship with the&nbsp;Order&nbsp;class. This violates rule number six. The modeler has committed to the idea that an order disappears when the shopping cart object to which it belongs is destroyed. This may or not make sense in the long run, but it's certainly too soon to be thinking along those lines.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The&nbsp;cLoginMgr&nbsp;class has an operation named&nbsp;verifyPassword. This violates rule number eight. It's too early to make decisions about which operations go on which classes, and besides, chances are good that the operation belongs on the&nbsp;Login Info&nbsp;class anyway.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The names of the two classes we just discussed should be&nbsp;Shopping Cart&nbsp;and&nbsp;Login Manager. The current names both violate rule number four.</li></ul><table width="410" border="0" bgcolor="FEFEC0" align="right" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr><td><strong>Figure 3. A Corrected Class Diagram</strong><br /><center><img src="http://i.cmpnet.com/ddj/sdmagazine/images/sdm0101c/0101cf3.gif" width="400" height="209" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></center>The rule violations found in Figure 2 are corrected here.</td></tr></tbody></table><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">See the diagram in Figure 3 to see how the mistakes are corrected.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; ">Our next article will discuss how to write small and concise use cases that capture functional requirements in terms of user actions and system responses in a way that's easy for readers to understand at a glance. See you then.</p><img src ="http://www.blogjava.net/landy/aggbug/372590.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-24 04:17 <a href="http://www.blogjava.net/landy/archive/2012/03/24/372590.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Driving Design with Use Cases</title><link>http://www.blogjava.net/landy/archive/2012/03/24/372589.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 23 Mar 2012 20:14:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/24/372589.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/372589.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/24/372589.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/372589.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/372589.html</trackback:ping><description><![CDATA[<h1><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">We need to see more use case and Unified Modeling Language examples" is a demand we hear fairly often these days. Although we present a fairly extensive example in our first book,&nbsp;<em>Use Case Driven Object Modeling with UML</em>&nbsp;(Addison-Wesley, 1999), we recently convinced Addison-Wesley to let us produce a companion workbook, in which we will dissect the design of an Internet bookstore, step-by-step, in great detail. This will involve showing many common mistakes, and then showing the model with its mistakes corrected.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">This article is the first in a series of five that will provide a prepublication look at the annotated example from the workbook (to be called&nbsp;<em>Applied Use Case Driven Object Modeling</em>, conveniently enough) as it evolves. We'll be following the process detailed in our book (also known as the ICONIX process), which sits somewhere between the very large Rational Unified Process (RUP) and the very small Extreme Programming (XP) approach.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">The ICONIX process is use case driven, like RUP, but lacks a lot of the overhead that RUP brings to the table. It's also relatively small and tight, like XP, but it doesn't discard analysis and design like XP does. This process also makes streamlined use of UML while keeping a sharp focus on the traceability of requirements. And, the process stays true to Jacobson's original vision of what "use case driven" means, in that it results in concrete, specific, readily understandable use cases that a project team can actually use to drive the development effort.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Each of the articles that follow this one will address an essential aspect of the process by focusing on one of the four critical diagrams used in the Iconix process. These four articles will have the same basic look and feel, with these shared elements:</p><ul style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">A "top 10" list that describes modeling errors to avoid.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">A diagram that shows two or three violations of these top 10 rules, as committed by students in classes that we've taught.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Another diagram that shows corrections of the erroneous material.</li></ul><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; "><strong>Best of Breed</strong><br />Figure 1 shows the "big picture" for the process. The diagram portrays the essence of a streamlined approach to software development that includes a minimal set of UML diagrams and some valuable techniques that take you from use cases to code quickly and efficiently. The approach is flexible and open; you can always select from the other aspects of UML to supplement the basic materials.</p><table border="0" width="500" style="font-size: 0.8em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #f9fafc; "><tbody><tr bgcolor="FEFEC0"><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 1. The "Big Picture" for Use Case Driven Object Modeling</strong></p><p style="clear: both; font-size: 0.8em; "><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0012c/0012cf1.jpg" width="500" height="376" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; ">The diagram portrays the essence of a streamlined approach to software development that includes a minimal set of UML diagrams and some valuable techniques that take you from use cases to code quickly and efficiently.</p></td></tr></tbody></table><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">The second article will discuss domain modeling. This is the task of discovering classes that represent the things and concepts related to the problem that a system is being designed to solve. We'll describe how the domain model serves as a glossary of terms that people can use in writing use cases.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Domain modeling involves working outward from the data requirements to build a&nbsp;<em>static</em>&nbsp;model of the problem domain relevant to the proposed system. We'll point out how the approach emphasizes domain modeling more than RUP, and certainly more than XP.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">The third article will discuss how to write use cases that detail the scenarios that the users will be performing. We'll describe how to write complete and unambiguous use cases that describe individual aspects of system usage without presuming any specific design or implementation.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Use case modeling involves working inward from the user requirements to start building a<em>dynamic</em>&nbsp;model of the solution space for the proposed system. We'll talk about how use cases, by extension, drive the entire development effort.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; "><strong>The Forgotten Diagram</strong><br />The fourth article in the series will discuss robustness analysis, a practice that originated with Ivar Jacobson but was dropped from the Rational implementation of UML. This involves analyzing the narrative text of use cases, identifying a first-guess set of objects that will participate in those use cases, and classifying these objects based on the roles they play.</p><ul style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Boundary objects are what actors use in communicating with the system.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Entity objects are usually objects from the domain model.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Controllers serve as the "glue" between boundary objects and entity objects.</li></ul><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">We'll show how robustness analysis, which serves as preliminary design within the process, provides the missing link between analysis and detailed design.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">The fifth and last article will discuss interaction modeling, the phase in which people build the threads that weave their objects together and enable them to start seeing how the new system will perform useful behavior. We'll demonstrate how to build sequence diagrams, which enable designers to perform three key tasks:</p><ol style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Allocate behavior among boundary objects, entity objects, and controllers that will become full objects in the model.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Show the detailed interactions that occur over time among the objects associated with each use case.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Finalize the distribution of operations among classes.</li></ol><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">We'll explain how the detailed, design-level class diagrams that result from interaction modeling represent a suitable foundation for moving into the coding phase of a project.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">We'd like to point out three significant features of this approach.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">First, it's iterative and incremental. Multiple iterations occur between developing the domain model and identifying and analyzing the use cases. Other iterations exist, as well, as the team proceeds through the life cycle. The static model gets refined incrementally during the successive iterations through the dynamic model (composed of use cases, robustness analysis and sequence diagrams). Please note, though, that the approach doesn't require formal milestones and lots of bookkeeping; rather, the refinement efforts result in natural milestones as the project team gains knowledge and experience.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Second, the approach offers a high degree of traceability. At every step along the way, you refer back to the requirements in some way. There is never a point at which the process allows you to stray too far from the user's needs. Traceability also refers to the fact that you can track objects from step to step as analysis melds into design.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Third, the approach offers streamlined usage of UML. The steps that we'll describe in the upcoming articles represent a "minimalist" approach-they comprise the minimal set of steps that we've found to be necessary and sufficient on the road to a successful OO development project. By focusing on a subset of the large and often unwieldy UML, a project team can also head off "analysis paralysis" at the pass.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; "><strong>E-Commerce Example</strong><br />We'll demonstrate these aspects of the ICONIX process in the context of an on-line bookstore. The focus will be on the customer's view of the system.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Article two will describe how to build a domain model that has loosely coupled classes, each of which does one thing well.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Article three will discuss how to write small, concise use cases that capture functional requirements in terms of user actions and system responses in a way that's easy for readers to understand at a glance.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Article four will demonstrate how to do robustness analysis in order to tighten up use cases and make it easier to head into detailed design.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">Article five will explore sequence diagrams, which we'll use to allocate the behavior specified by use cases to the objects mentioned in those use cases.</p><p style="clear: both; font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; line-height: normal; background-color: #f9fafc; ">See you next month.<br /><a href="http://drdobbs.com/184414677">http://drdobbs.com/184414677</a>&nbsp;<br /><br /><br /><br /></p></h1><img src ="http://www.blogjava.net/landy/aggbug/372589.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-24 04:14 <a href="http://www.blogjava.net/landy/archive/2012/03/24/372589.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Successful Robustness Analysis</title><link>http://www.blogjava.net/landy/archive/2012/03/24/372588.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 23 Mar 2012 20:12:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/24/372588.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/372588.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/24/372588.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/372588.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/372588.html</trackback:ping><description><![CDATA[<div id="article-header" style="margin-right: 0px; font-family: Arial, Helvetica, Verdana, sans-serif; line-height: normal; background-color: #f9fafc; font-size: medium; ">This simple and useful technique links the what of analysis to the how of design by ensuring your use case text is correct. It addresses necessary courses of action and allows you to continue to discover objects.</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: normal; background-color: #f9fafc; font-size: medium; "><p style="clear: both; font-size: 0.8em; "></p><p style="clear: both; font-size: 0.8em; "><em>by&nbsp;<a href="http://drdobbs.com/sdonline/authors.html#kscott" style="color: #003bb0; ">Kendall Scott</a>&nbsp;and&nbsp;<a href="http://drdobbs.com/sdonline/authors.html#drosenberg" style="color: #003bb0; ">Doug Rosenberg</a></em></p><p style="clear: both; font-size: 0.8em; "></p><p style="clear: both; font-size: 0.8em; ">Read part 1:&nbsp;<a href="http://drdobbs.com/articles/2000/0012//documents/sdm0012c/" style="color: #003bb0; ">Driving Design with Use Cases</a>&nbsp;<br />Read part 2:&nbsp;<a href="http://drdobbs.com/articles/2001/0101//documents/sdm0101c/" style="color: #003bb0; ">Driving Design: The Problem Domain</a><br />Read part 3:&nbsp;<a href="http://drdobbs.com/articles/2001/0102//documents/sdm0102c/" style="color: #003bb0; ">Top Ten Use Case Mistakes</a></p><p style="clear: both; font-size: 0.8em; ">Welcome to the fourth in a series of five articles that provides a pre-publication look at the annotated example from the forthcoming&nbsp;<em>Applied Use Case Driven Object Modeling</em>. (Addison-Wesley, 2001; tentatively scheduled for June). We're following the process detailed in our first book,&nbsp;<em>Use Case Driven Object Modeling with UML</em>&nbsp;(Addison-Wesley, 1999), as we dissect the design of an Internet bookstore. This article is the third one in which we show common mistakes, and then explain how to correct them.</p><p style="clear: both; font-size: 0.8em; ">This article focuses on robustness analysis, which involves analyzing the narrative text of use cases and identifying a first-guess set of objects that will participate in each use case, then classifying these objects into three types:</p><ol style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 10px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Boundary objects, which actors use in communicating with the system.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Entity objects, which are usually objects from the domain model (the subject of "<a href="http://drdobbs.com/articles/2001/0101//documents/sdm0101c/" style="color: #003bb0; ">Driving Design: The Problem Domain</a>," Jan. 2001).</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Control objects (which we usually call controllers because they often aren't real objects), which serve as the "glue" between boundary objects and entity objects.Figure 1 shows the visual icons for these three types of objects.</li></ol><table width="410" border="0" cellpadding="5" align="right" bgcolor="FEFEC0" style="font-size: 0.8em; "><tbody><tr><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 1. Visual Icons of Three Stereotypes</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf1.gif" width="400" height="98" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />Actors use boundary objects to communicate with the system. Entity objects are usually derived from the domain models, and control objects (also known as controllers) serve as the glue between boundary and entity objects.</p></td></tr><tr><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 2. Purpose of Robustness Analysis</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf2.gif" width="400" height="196" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />This simple but highly useful technique serves as a crucial link between analysis-the what-and design-the how.</p></td></tr><tr><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 3. The "Big Picture" for Use Case Driven Object Modeling</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf3.gif" width="400" height="257" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />The diagram portrays the essence of a streamlined approach to software development that includes a minimal set of UML diagrams and some valuable techniques that take you from use cases to code quickly and efficiently.</p></td></tr><tr><td><p align="center" style="clear: both; font-size: 0.8em; "><strong>Figure 4. The Essential Roles of Robustness Analysis</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf4.gif" width="400" height="234" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />You will refine both your use case text and your static model as a result of robustness analysis.</p></td></tr></tbody></table><p style="clear: both; font-size: 0.8em; ">Within the ICONIX process, this simple but highly useful technique serves as a crucial link between analysis&#8212;the what&#8212;and design&#8212;the how, as shown in Figure 2. Figure 3 shows where robustness analysis resides within the "big picture" for the ICONIX process.</p><p style="clear: both; font-size: 0.8em; "><strong>The Key Elements&nbsp;</strong><br />Robustness analysis plays several essential roles within the ICONIX process. Note that you will refine both your use case text and your static model as a result of robustness analysis, as shown in Figure 4.</p><p style="clear: both; font-size: 0.8em; ">Robustness analysis provides a sanity check by helping you make sure that your use case text is correct and that you haven't specified system behavior that is unreasonable&#8212;or impossible&#8212;given the set of objects you have. This refinement of the use case text changes the nature of that text from a pure user manual perspective to a usage description in the context of the object model.</p><p style="clear: both; font-size: 0.8em; ">It also provides a completeness and correctness check by helping you determine if the use cases address all necessary alternate courses of action, which we discussed in the third article in this series, "<a href="http://drdobbs.com/articles/2001/0102//documents/sdm0102c/" style="color: #003bb0; ">Top Ten Use Case Mistakes</a>" (Feb. 2001). In our experience, the time spent drawing robustness diagrams toward this end, and also toward the end of producing text that adheres to some well-defined guidelines, is invariably made up three- or four-fold in time saved in drawing sequence diagrams.</p><p style="clear: both; font-size: 0.8em; ">Robustness analysis enables the ongoing discovery of objects; a crucial step because you almost certainly missed some objects during domain modeling. You can also address object naming discrepancies and conflicts before they cause serious problems. And, robustness analysis helps you ensure that you've identified most of the major domain classes before starting sequence diagrams.</p><p style="clear: both; font-size: 0.8em; ">Finally, robustness analysis fills the role of preliminary design, by closing the gap between analysis and detailed design.</p><p style="clear: both; font-size: 0.8em; ">Let's take a closer look at the three stereotypes that we apply to objects during robustness analysis.</p><p style="clear: both; font-size: 0.8em; ">Boundary objects are the objects with which the actors (for instance, the users) will be interacting in the new system. These frequently include windows, screens, dialogs and menus. If you have a GUI prototype in place, you can see what many of your primary boundary objects will be, and if you follow the guidelines we gave you last month, you can also easily pick boundary objects out of your use case text.</p><p style="clear: both; font-size: 0.8em; ">Entity objects often map to the database tables and files that contain the information that needs to "outlive" use case execution. Some of your entity objects are "transient" objects, such as search results, that "die" when the use case ends, and many of your entity objects will come from your domain model.</p><p style="clear: both; font-size: 0.8em; ">Control objects (controllers) embody much of the application logic and serve as the connecting tissue between the users and the stored data. This is where you capture frequently changing business rules and policies, and&nbsp;<em>localize changes</em>&nbsp;to these objects without disrupting your user interface or your database schema down the line. Once in a while (perhaps 20 percent of the time), controllers are "real objects" in a design, but controllers usually serve as placeholders to assure that you don't forget any functionality and system behavior required by your use cases.</p><p style="clear: both; font-size: 0.8em; ">You perform robustness analysis for a use case by walking through the use case text, one sentence at a time, and drawing the actors, the appropriate boundary, entity objects and controllers, and the connections among the various elements of the diagram. You should be able to fit the basic course and all of the alternate courses on one diagram. Four basic rules apply:</p><ol style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 10px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Actors can only talk to boundary objects.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Boundary objects can only talk to controllers and actors.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Entity objects can only talk to controllers.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors</li></ol><table width="315" border="0" cellpadding="5" align="right" bgcolor="FEFEC0" style="font-size: 0.8em; "><tbody><tr><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 5. Robustness Analysis Rules</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf5.gif" width="300" height="226" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />Both boundary objects and entity objects are nouns, and controllers are verbs. Nouns can't talk to other nouns, but verbs can talk to either nouns or verbs.</p></td></tr></tbody></table><p style="clear: both; font-size: 0.8em; ">Keep in mind that both boundary objects and entity objects are nouns, and that controllers are verbs. Nouns can't talk to other nouns, but verbs can talk to either nouns or verbs. Figure 5 summarizes the robustness diagram rules.</p><p style="clear: both; font-size: 0.8em; ">Anyone who reviews a robustness diagram should be able to read a course of action in the use case text, trace his finger along the associations on the diagram, and see a clear match between text and picture. You will probably have to rewrite your use case text as you do this, to remove ambiguity and to explicitly reference boundary objects and entity objects. Most people don't write perfect use case text in the first draft.</p><p style="clear: both; font-size: 0.8em; ">In addition to using the results of robustness analysis to tighten up the use case text, you should also continuously refine your static model. The new objects you discover drawing the diagrams should become part of your class diagrams when you discover them, and this is also the right time to add some key attributes to your more significant classes.</p><p style="clear: both; font-size: 0.8em; "><strong>Top 10 Robustness Analysis Errors</strong><br />Many of the students we've taught make a number of errors when they're doing robustness analysis for the first time. Our "top 10" list of solutions to common errors follows.</p><p style="clear: both; font-size: 0.8em; ">10.&nbsp;<em>Don't violate the robustness diagram rules.</em>&nbsp;These rules are in place primarily to get your text into noun-verb-noun format and to help ensure that you don't start allocating behavior to objects before you have enough information to make good design decisions. (We'll talk more about behavior allocation in our upcoming article on sequence diagrams.) The rules about boundary objects are in place to ensure that you explicitly specify the boundaries of the system, outside of which reside the actors involved in your use cases.</p><p style="clear: both; font-size: 0.8em; ">9.&nbsp;<em>Use robustness analysis to help you use a consistent format for your use case text.</em>&nbsp;The boundary object-controller-entity object pattern tends to appear on lots of robustness diagrams. This pattern closely correlates with the subject-verb-object pattern of basic English sentences. You should use robustness analysis to make the text of your use cases stylistically consistent among themselves to the largest extent you can, which greatly improves their readability and maintainability.</p><p style="clear: both; font-size: 0.8em; ">8.&nbsp;<em>Include alternate courses on robustness diagrams.</em>&nbsp;You need to perform robustness analysis on all of your use case text, not just the basic courses. Much of the interesting behavior of a system occurs in the context of alternate courses, so it's important to analyze that behavior as part of your modeling efforts. Robustness analysis can also help you discover new alternate courses, especially when you draw controllers with labels such as Verify and Validate.</p><p style="clear: both; font-size: 0.8em; ">7.&nbsp;<em>Use robustness analysis to ensure consistency between class names on class diagrams and in use case text.</em>&nbsp;Specifying use case text in the context of the object model is the magic formula you need to build useful sequence diagrams. By naming your boundary objects and entity objects in your use cases, you take a healthy step toward getting your sequence diagrams off to a good start, by simply drawing those objects across the top of the sequence diagram for each use case.</p><p style="clear: both; font-size: 0.8em; ">6.&nbsp;<em>Don't allocate behavior to classes on your robustness diagrams.</em>&nbsp;As we mentioned earlier, controllers serve as placeholders for functionality and system behavior. You should not start assigning methods to classes on a robustness diagram, because you're not likely to have enough information. Make decisions about behavior allocation using sequence diagrams.</p><p style="clear: both; font-size: 0.8em; ">5.&nbsp;<em>Don't include too few or too many controllers.</em>&nbsp;We like to see between two and five controllers on a robustness diagram. If you only have one controller per use case, you're likely to have a lot of very small use cases, each of which don't really describe enough behavior. On the other hand, if you have more than 10 controllers on one diagram, you should consider splitting your use case up into more manageable chunks.</p><p style="clear: both; font-size: 0.8em; ">4.&nbsp;<em>Don't take too much time trying to perfect robustness diagrams.</em>&nbsp;The robustness diagram serves as a "booster-stage engine" that gets the process of driving use cases forward into an object-oriented design off the ground. Robustness analysis helps us discover objects, allocate attributes, and check the use case text for completeness and correctness. But once we've accomplished the overall mission, we don't need to maintain the work product. It's a means to an end, not an end in itself.<img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf8.gif" width="29" height="28" align="top" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; ">3.&nbsp;<em>Don't try to do detailed design on robustness diagrams.</em>&nbsp;The concept of throwaway diagrams is useful in connection with preliminary design; it's not a useful concept when it comes to detailed design. Sequence diagrams are the appropriate place for detailed design. Robustness analysis should be a quick pass across all of the scenarios you're going to build, in order to provide maximum value to your project. If your preliminary design takes as long as detailed design, you'll lose the benefits of this quick sanity check.<img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf8.gif" width="29" height="28" align="top" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /></p><p style="clear: both; font-size: 0.8em; ">2.&nbsp;<em>Perform a visual trace between the use case text and the robustness diagram.</em>&nbsp;We strongly recommend that you have a peer review for all of your use case text and robustness diagrams, with each reviewer performing the finger trace technique that we described earlier. You should not consider your use case done until it passes the simple visual trace test. When you've reached the point where each of your use cases pass the test, the next step-drawing sequence diagrams-will be easier for you to perform than if you were starting from your use case text alone.</p><p style="clear: both; font-size: 0.8em; ">1.&nbsp;<em>Update your static model.</em>&nbsp;You must update your domain model before you can consider yourself done with robustness analysis and ready to move on to interaction modeling using sequence diagrams. After all, you can't allocate behavior to classes that don't appear in your static model.</p><p style="clear: both; font-size: 0.8em; ">Figure 6 shows a robustness diagram that contains violations of four of the top 10 rules.</p><table width="410" border="0" cellpadding="5" bgcolor="FEFEC0" style="font-size: 0.8em; "><tbody><tr><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 6. Incorrect Robustness Diagram</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf6.gif" width="400" height="240" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />This diagram violates rules three, six, eight and 10.</p></td></tr></tbody></table><p style="clear: both; font-size: 0.8em; ">Did you spot the violations?</p><ul style="font-size: 0.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 1px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The Home Page boundary object is talking to the Login Page boundary object and the Account Table entity object, violations of rule 10.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The Account Table object has a method assigned to it. This violates rule six.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">There aren't any alternate courses (what happens if the passwords don't match, for instance?) associated with the Validate Login Info control object, a violation of rule eight.</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 15px; list-style-position: inside; ">The Intercept Request object is a construct that belongs to detailed design. This violates rule three.</li></ul><p style="clear: both; font-size: 0.8em; ">Figure 7 shows the robustness diagram with the mistakes corrected.</p><table width="410" border="0" cellpadding="5" bgcolor="FEFEC0" style="font-size: 0.8em; "><tbody><tr><td><p style="clear: both; font-size: 0.8em; "><strong>Figure 7. Corrected Robustness Diagram</strong><br /><img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf7.gif" width="400" height="257" border="1" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" /><br />This diagram doesn't do detailed design: There is no behavior allocated to objects and it includes alternate courses.</p></td></tr></tbody></table><p style="clear: both; font-size: 0.8em; ">Our next article will demonstrate how to draw sequence diagrams, which reside at the core of detailed design within the ICONIX process. See you next month.</p><p style="clear: both; font-size: 0.8em; ">Note:&nbsp;<img src="http://twimgs.com/ddj/sdmagazine/images/sdm0103c/0103cf8.gif" width="29" height="28" style="max-width: 450px; overflow-x: auto; overflow-y: auto; "  alt="" />&nbsp;denotes analysis paralysis.</p></div><img src ="http://www.blogjava.net/landy/aggbug/372588.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-24 04:12 <a href="http://www.blogjava.net/landy/archive/2012/03/24/372588.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Robustness Diagram - 从需求分析到架构设计</title><link>http://www.blogjava.net/landy/archive/2012/03/24/372587.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 23 Mar 2012 20:10:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/24/372587.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/372587.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/24/372587.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/372587.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/372587.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/landy/archive/2012/03/24/372587.html'>阅读全文</a><img src ="http://www.blogjava.net/landy/aggbug/372587.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-24 04:10 <a href="http://www.blogjava.net/landy/archive/2012/03/24/372587.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>金蝶BOS元模型分析</title><link>http://www.blogjava.net/landy/archive/2012/03/11/371682.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 11 Mar 2012 11:30:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/11/371682.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/371682.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/11/371682.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/371682.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/371682.html</trackback:ping><description><![CDATA[<p>对一些需求变化多样的产品而言，做好可变性设计是非常重要的。国外做得好的有Siebel，国内有金蝶的BOS，实际上金蝶的BOS很多理念跟Siebel是相似的，呵呵。。。他们都是采用MDD的方式来解决可变性问题的。</p> <p>这里的难点在于如何抽象出一套稳定的元模型，能描述各种各样的变化，以达到通过配置即可搞定需求变更的目的。</p> <p>这里着重讲一下金蝶BOS的元模型，所谓元模型，是模型的模型。</p> <p>在数据层，有Table，Table对应到数据库表，直接三种Table之间的关系，什么交叉表、扩展表之类的，基本与平常大家设计表的范式对应，不多说；</p> <p>在业务逻辑层，有实体，实体表示系统的领域实体对象，一个实体对应到一个Table，实体的属性对应到Table的field或其扩展表的Field，实体与实体之间有关系，关系分为One2One，One2Many，Many2One，Many2Many。还可以对实体的属性定义计算公式，约束。<font color="#ff0000">但缺乏实体级别的约束。我认为金蝶可以增加这一个小特性：）。实体可继承另一个实体，以获得另一个实体的定义。</font></p> <p>可以为实体定义方法，方法映射到一个规则。也就是说调用这个方法的时候实际执行的是这个规则；</p> <p>可以为实体定义查询方案、过滤方案、排序方案，主要是以OO的方式做实体查询，对外暴露OO化的用户接口，对内生成SQL用；</p> <p>可以为实体定义事件，Function和Facade可监听事件，事件由Function触发。</p> <p>金蝶对Function的解释是“业务功能是对运行系统的Entity对象、UI对象及其方法的一定封装，供其它模块或二次开发使用”，比如上文提到的事件，即是由Function触发的，但不知为什么还要指定事件的方法，Function是事件的生产者，事件的方法表示事件的消费者（监听者），这样做不是导致生产者与消费者耦合了吗？？那还要事件干什么，不知道有没有朋友能解答这个问题？？Function还可以绑定到一个UI的Action，意味着当该UI对象的Action触发时，会执行这个Function。对UI Action的绑定是可选的。</p> <p>Facade表示领域Service对象，相比实体，其仅仅有方法，没有属性。</p> <p>UI对象表示一个界面对象，比如订单创建对象，可以对其指定Layout，UI对象支持绑定实体、Query对象。UI对象也有事件、Action和状态，事件和Action应该可以绑定到Function和Facade，State表示界面对象的状态，比如界面通常有编辑状态、查看状态等等。UI对象还有个父对象，还没怎么弄清楚UI对象与UI对象之间的关系，没有看到描述，需要进一步研究；感觉BOS对UI层的抽象略显简单，通常UI层是最复杂的，有字段联动，子页面联动等等，没见到BOS怎么来搞定这种联动场景。</p> <p>&nbsp;</p> <p>查询表示对对象的查询，需要绑定一个对象树，可定义查询方案、过滤方案、排序方案，生成SQL用；</p> <p>还有其它的一些非主要元模型。</p> <p>通过UI Object、Entity/Function/Facade、和Table，可支持描述界面、领域对象/服务、数据库表以及它们之间的绑定关系，如果对象模型有变更、或者业务逻辑有变更，会导致这三层的对象的变化，而变化可基于这三层的元模型描述，实现配置即可用。</p><img src ="http://www.blogjava.net/landy/aggbug/371682.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-11 19:30 <a href="http://www.blogjava.net/landy/archive/2012/03/11/371682.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对Spring的理解</title><link>http://www.blogjava.net/landy/archive/2012/03/11/371680.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 11 Mar 2012 10:19:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/11/371680.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/371680.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/11/371680.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/371680.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/371680.html</trackback:ping><description><![CDATA[<p>昨天，有人问我对Spring的理解，总结一下：</p> <p>Spring现在已经覆盖系统各个层次，在web层，有Spring Web、Spring Webflow，在业务逻辑层，有Spring Core，在数据持久层，Spring整合了Ibatis（SQL Mapping）、Hibernate（ORM）、NOSQL，在集成层，Spring有Spring Integration，还有针对特定场景的解决方案，如Spring batch、Spring Message、Spring Security、Spring Social等等。</p> <p>Spring Core是一个IOC容器，负责对象的生命周期管理，正因为其负责了对象的生命周期管理，Spring可以通过Proxy和AOP等技术在对象创建和调用的时候玩一把魔术，如：动态为对象的调用植入一些代码，使得开发人员可以把业务逻辑无关的调用系统服务的逻辑切面化，实现声明式配置。另外，Spring还负责了对象的组装，使得面向接口的编程更为简单，省去很多Factory逻辑。</p> <p>其它方案都可以说是基于Spring Core的，面向特定应用场景的解决方案，不多说。</p><img src ="http://www.blogjava.net/landy/aggbug/371680.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-11 18:19 <a href="http://www.blogjava.net/landy/archive/2012/03/11/371680.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一个基于SpringSocial的sina微博插件</title><link>http://www.blogjava.net/landy/archive/2012/03/04/371205.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 04 Mar 2012 03:57:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/03/04/371205.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/371205.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/03/04/371205.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/371205.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/371205.html</trackback:ping><description><![CDATA[<p>找到一个基于SpringSocial的Sina微博插件，共享一下：</p> <p><a href="http://code.google.com/p/spring-social-plugins/">http://code.google.com/p/spring-social-plugins/</a></p><img src ="http://www.blogjava.net/landy/aggbug/371205.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-03-04 11:57 <a href="http://www.blogjava.net/landy/archive/2012/03/04/371205.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>面向领域的业务平台设计（二）</title><link>http://www.blogjava.net/landy/archive/2012/02/26/370794.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 26 Feb 2012 09:12:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/02/26/370794.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/370794.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/02/26/370794.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/370794.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/370794.html</trackback:ping><description><![CDATA[<p></p> <p>如何解决上文提到的鉴定标准中的问题呢？我认为答案就是MDD。</p> <p>用一个实际的例子来表述一下思路：</p> <p>在CRM系统有个订单处理模块，其提供了订单管理、订单流程执行、工单管理等功能，营业员通过界面提交一个订单请求，如果订单请求通过业务规则的校验，则会创建一个订单对象，订单对象的创建会触发订单流程的创建，订单流程流转的过程中，会在各个节点创建工单，也会调用其它子系统开通服务，比如调用物流发货。订单流程完成后，订单对象的状态也完成。实际的系统比这个要复杂，这里仅仅为了阐述思路，做适当的简化。</p> <p>从上面的例子，我们可以识别出几个模型:订单、工单、订单流程，订单、工单、订单流程都是stateful的、其state的变更会导致其它对象的状态变更或者服务的执行。</p> <p>在展现层，展现各个模型是有章法的，比如创建订单的界面总是一样的，处理工单的界面也总是一样的，展现订单的界面也总是一样的。因此，我们可针对指定的对象的某种需要展现的状态，提供合适的展示构件（WEB TAG）来展示它。</p> <p>在持久层，因为对象总是持久化到一张表当中的，因此，可用一些ORM的框架来持久化对象，而不是开发人员针对每个场景去写SQL，复杂的关联查询可以使用类HQL。</p> <p>各对象之间的关联操作通过事件驱动。</p> <p>举一个订单创建的例子：</p> <p>1、开发做的工作：</p> <p>&nbsp;&nbsp;&nbsp; 1）使用元数据定义订单的数据结构，包含持久化元数据、基本属性元数据、字典元数据；</p> <p>&nbsp;&nbsp;&nbsp; 2）定义订单状态机，以及状态变迁的规则；</p> <p>&nbsp;&nbsp;&nbsp; 3）建模订单处理流程；</p> <p>&nbsp;&nbsp;&nbsp; 4）定义订单请求处理规则流，并发布为一个受理订单请求的服务；</p> <p>&nbsp;&nbsp;&nbsp; 5）开发订单创建界面，使用订单WEB构件来展示订单对象；</p> <p>&nbsp;&nbsp;&nbsp; 6）定义事件，以及事件的监听服务；</p> <p>2、系统执行流程：</p> <p>&nbsp;&nbsp;&nbsp; 1）营业员打开订单创建界面，系统获取订单对象的元数据，生成订单创建页面；</p> <p>&nbsp;&nbsp;&nbsp; 2）营业员点击订单创建界面的提交按钮，调用受理订单请求的服务；规则流执行，如果规则校验错误，则返回错误，如果成功，则创建订单，返回成功；</p> <p>&nbsp;&nbsp;&nbsp; 3）因创建订单，导致订单的状态变为创建状态，触发订单创建事件；</p> <p>&nbsp;&nbsp;&nbsp; 4）订单创建的监听服务流程服务接收到事件，触发订单处理流程的创建；</p> <p>&nbsp;&nbsp;&nbsp; 5）流程执行的过程中编排第三方系统服务；流程执行结束后，触发订单流程结束事件，流程结束事件的监听服务订单管理接收到事件，触发状态机变迁，订单状态变为完成。</p> <p>上述开发做的工作全部可通过配置完成。后续如果增删字段，修改元数据即可，要增删改业务规则，调整业务规则即可，要调整实体状态，修改实体状态机即可。</p> <p>业务平台要致力于对状态机、业务流程、SEP、元数据、领域化的WEB构件的实现，并将其有机整合。</p> <p>&nbsp;</p> <p>写的比较乱，过几天再整理一下。。。</p><img src ="http://www.blogjava.net/landy/aggbug/370794.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-02-26 17:12 <a href="http://www.blogjava.net/landy/archive/2012/02/26/370794.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>面向领域的业务平台设计（一）</title><link>http://www.blogjava.net/landy/archive/2012/02/26/370791.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 26 Feb 2012 07:04:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/02/26/370791.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/370791.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/02/26/370791.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/370791.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/370791.html</trackback:ping><description><![CDATA[<p>毕业后，做了很多年的中间件，有工作流，有数据持久层框架，还有个类似tomcat的server等，一直在思考，一个最适合业务的平台应该是什么样子的。因一直没有业务经验，因此，尽管有一些想法，但是也不知道这些想法靠不靠谱，最近一年参与了一个CRM项目的设计，积攒了一些业务经验，心中的想法逐渐清晰了起来，也有了一些底气，写下来跟大家交流探讨。</p> <p>就如同变化多端的八卦卦象是由乾、兑、离等8个基本卦象组成，万事万物是由数种原子构成，形态各异的高楼大厦是由砖头和砂浆砌成，应用也有构成其的“元”，即构件。</p> <p>业务应用是分层的，典型的分层是展现层、流程层、服务层、数据持久层，每一层次的关注点都不同，构件也不相同，比如一个业务逻辑层的构件输出的数据，会通过展现层的构件来展现在界面上。且各层之间的贯通黏合（如MVC中的Controller层就是黏合逻辑），通常要耗费比较多的开发精力，一个好的业务平台，除了在各层次分别提供可复用的构件，需要能够减少各层黏合的工作量。</p> <p>面向特定领域的业务平台的易用度与其适用面是鱼和熊掌的关系，针对特定领域，要越易用，则平台能力就要越面向特定领域，则越不通用，导致适用面越窄。因此，一个好的平台，要注意分层，比如分成通用的构件和领域化的构件。业务用户可按需使用。同时，还需要在各层次开放定制能力，供业务用户在各层提供领域构件。</p> <p>现在的产品交付都是解决方案级的交付，解决方案由多个系统或子系统构成，一个部门，一个项目组通常只是提供解决方案中的一个部件，负责端到端的业务功能中的一个环境，因此，需要支持构件的组装，以形成更大粒度的构件，支撑软件复用与集成。</p> <p>开发一个子系统粒度的构件通常是一件很复杂的事情，如CRM，需求琐碎、变化频繁、不同客户要求不尽相同，如果缺乏一个好的支撑平台，人力成本会很高，TTM也会很长，因此，一个好的业务平台，也需要能够支撑快速的构件开发、定制。</p> <p>解决构件的组装和集成，已经有比较成熟的技术了，如ESB、SCA等，IBM、Oracle等大厂商都有提供集成化的开发环境和执行环境。但如何支撑构件的开发这块，各大厂商也有支撑，比如在展现层，Oracle有ADF，在流程层，IBM和Oracle都提供了BPM，在service层，IBM和Oracle提供了规则引擎，VMWare的Spring，在持久层，Oracle提供了Toplink，还有就JBOSS大名鼎鼎的Hibernate。所有前面提到的这些都是业务无关的技术部件，且各层之间的靠业务开发人员自己来黏合，还是不够领域化。因此，一个业务平台，仅仅去重复制造IBM、Oracle造过的轮子，是完全没有竞争力的（这里不算成本）。面向特定领域，评判一个业务平台是否优秀的标准是：</p> <p>1、是否提供了丰富的领域构件？</p> <p>2、是否能够节省业务开发人员黏合各层的工作量？</p> <p>3、提供了什么样的机制来应对需求变化？比如有的客户要求多加个字段、加个校验，有的客户要求少个字段、少个校验等等。</p> <p>待续。。。</p><img src ="http://www.blogjava.net/landy/aggbug/370791.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-02-26 15:04 <a href="http://www.blogjava.net/landy/archive/2012/02/26/370791.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对做IDE的一些思考</title><link>http://www.blogjava.net/landy/archive/2012/02/26/370783.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sat, 25 Feb 2012 16:51:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2012/02/26/370783.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/370783.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2012/02/26/370783.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/370783.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/370783.html</trackback:ping><description><![CDATA[<p>近来参与了一个电信CRM项目的设计，相比其他电信应用来讲，CRM最接近用户，因此，需求琐碎，变化频繁。需要有一个适应CRM业务的领域化IDE来支撑业务开发。</p> <p>做事情需要有方法，方法可以参考业界一些好的实践。本文主要是想总结一些好的设计IDE的实践供朋友们借鉴。</p> <p>我们借IBM的BPM Suite来分析IDE的设计方法。</p> <p>IBM BPM Suite主要用于业务流程的管理。IBM把业务流程的生命周期划分为流程建模、流程开发、流程部署、流程监控4个环节，针对这4个环境，定义了相应的角色执行相应环节的工作。然后再针对指定的角色，提供了专门的workspace来支撑其工作，实现了对其不关心的数据和配置的封装和隐藏。</p> <p>这种方法论其实是通用的，对CRM应用来讲，其开发生命周期也可分为几个阶段，每个阶段的参与Actor需要使用的信息、不需要了解的信息都不同。同时，一个现代SOA应用在技术上通常会分层，典型的分层是UI、流程、Services、Entities。需要根据Actor，仔细分析在每个分层上的开发用例，从而构建出最适合各种Actor的IDE。<br /><br />本人最近在研究BPEL和BPMN，希望能和对此有研究的朋友探讨一些技术问题，联系QQ：38425726，盼指教。<br /><br /><br /><br /></p><img src ="http://www.blogjava.net/landy/aggbug/370783.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2012-02-26 00:51 <a href="http://www.blogjava.net/landy/archive/2012/02/26/370783.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转载]《软件架构设计》读书笔记</title><link>http://www.blogjava.net/landy/archive/2009/10/11/297808.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 11 Oct 2009 12:21:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2009/10/11/297808.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/297808.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2009/10/11/297808.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/297808.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/297808.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/landy/archive/2009/10/11/297808.html'>阅读全文</a><img src ="http://www.blogjava.net/landy/aggbug/297808.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2009-10-11 20:21 <a href="http://www.blogjava.net/landy/archive/2009/10/11/297808.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>性能调优经验介绍</title><link>http://www.blogjava.net/landy/archive/2009/09/24/296351.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Thu, 24 Sep 2009 13:35:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2009/09/24/296351.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/296351.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2009/09/24/296351.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/296351.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/296351.html</trackback:ping><description><![CDATA[一个典型的J2EE系统由DB、应用、应用（WEB）服务器、JVM组成。<br />
调优可分别针对这几个部分调优，下面介绍一下各个部分调优的一些经验。<br />
1. DB调优：DB调优主要关注下面几个方面：1）选择合适索引；2）避免复杂查询；3）尽量将复杂运算挪到应用中，以降低DB复杂，因为让应用可伸缩的代价远比让DB可伸缩的代价低；4）避免关联查询；调优的过程中，可借助Oracle的sql将比较耗时的SQL查询出来，再针对性的优化。<br />
2. 应用调优：应用调优主要分成两个方面：1）用Jprofiler或optimizeit等工具找出执行比较耗时的代码，并针对性的优化；2）应用运行时，通过打JVM的堆栈来分析应用的线程是否因资源竞争导致block，然后导致CPU无法充分利用，从而应用性能上不去，找出性能瓶颈后可针对性的做优化。<br />
3. 应用服务器调优：主要调节数据库连接池大小，连接数大小（tomcat就有连接数大小）等<br />
4. JVM调优：主要针对应用的特点，调整JVM参数，使应用运行更稳定。<br />
判断性能调优是否到位的方法是看数据库服务器和应用服务器的CPU占用率，首先要确认不是内存的问题，确认服务器没有产生页面交换；然后就看应用侧和DB侧的CPU是否能够达到90%以上了，一般来讲，要求应用侧的CPU使用率达到90%以上。<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote>
<img src ="http://www.blogjava.net/landy/aggbug/296351.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2009-09-24 21:35 <a href="http://www.blogjava.net/landy/archive/2009/09/24/296351.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>工作流合单的实现</title><link>http://www.blogjava.net/landy/archive/2009/07/06/285730.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Mon, 06 Jul 2009 15:22:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2009/07/06/285730.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/285730.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2009/07/06/285730.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/285730.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/285730.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/landy/archive/2009/07/06/285730.html'>阅读全文</a><img src ="http://www.blogjava.net/landy/aggbug/285730.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2009-07-06 23:22 <a href="http://www.blogjava.net/landy/archive/2009/07/06/285730.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JavaFX脚本编程语言参考--第一章 概览</title><link>http://www.blogjava.net/landy/archive/2008/12/04/244239.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Wed, 03 Dec 2008 16:06:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2008/12/04/244239.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/244239.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2008/12/04/244239.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/244239.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/244239.html</trackback:ping><description><![CDATA[<span style="border-collapse: separate; color: #000000; font-family: 'Lucida Grande'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">This chapter provides an overview of the&nbsp;JavaFX&#8482; Script programming language. At a high level, this chapter describes the programming language's main features, saving detailed coverage of specific constructs for subsequent chapters. This book is intended for designers and developers of rich Internet client applications and elements, that run in web pages, as&nbsp;Java&#8482; Web Start software, or as traditional desktop applications. Its content assumes the reader is familiar with either the JavaScript or&nbsp;Java&#8482; programming language, or both. While this document does not define a formal language specification, it can be considered a complete reference for all currently supported language features.</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">本章提供了JavaFx脚本编程语言的一个概览。本章概述了这门编程语言的主要特性，后续章节将会详细介绍这些特性的细节。本书适用于副Internet客户端应用的设计者和开发者。这些应用可以作为Java Web Start软件运行在网页中或者作为传统的桌面应用。本书假定读者熟悉了javascript或java编程语言或者两者都熟悉。但是本书并不是正式的语言规范，可仅仅做为当前JavaFx支持的语言特性的一个完整的参考。<br />
</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;"><br />
</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">The JavaFX Script programming language has the following distinctions:</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">JavaFX脚本编程语言有如下的语言特色：<br />
</p>
<div>
<ul type="disc">
    <li style="padding-top: 8pt;">Uses a declarative syntax for specifying Graphical User Interface (GUI) components, enabling a developer's code to closely match the actual layout of the GUI.</li>
    <li style="padding-top: 8pt;">可使用声明式的语法编写图形界面组件，使得开发者的代码非常接近于GUI的实际布局。<br />
    </li>
    <li style="padding-top: 8pt;">Uses declarative data binding and incremental evaluation, enabling easy creation and configuration of individual components. Application data and GUI components are automatically synchronized.</li>
    <li style="padding-top: 8pt;">使用声明式的数据绑定和incremental evaluation(不知道如何翻译), 使得创建和配置组件变得简单。应用数据和GUI组件将自动同步。<br />
    </li>
    <li style="padding-top: 8pt;">Is statically typed, having most of the same code structuring, reuse, and encapsulation features that enable creating and maintaining very large programs in the Java programming language.</li>
    <li style="padding-top: 8pt;">它是一门静态类型的、绝大部分代码结构、复用和封装特性跟Java编程语言一样，可用来创建和维护大型应用。<br />
    </li>
    <li style="padding-top: 8pt;">Works with all major IDEs, including the NetBeans IDE, the reference implementation IDE for software development with the Java programming language.</li>
    <li style="padding-top: 8pt;">支持主流IDE，包括NetBeans IDE，NetBeans IDE是使用Java编程语言进行软件开发的IDE参考实现。<br />
    </li>
    <li style="padding-top: 8pt;">Is capable of supporting GUIs of any size or complexity.</li>
    <li style="padding-top: 8pt;">能够支持容易大小和复杂度的GUI。<br />
    </li>
    <li style="padding-top: 8pt;">Makes it easier to use Swing.</li>
    <li style="padding-top: 8pt;">它使Swing编程变得更容易<br />
    </li>
</ul>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">The following sections present a quick tour of the JavaFX Script programming language. These sections provide a general introduction to its core syntax and capabilities, comparing and contrasting to the Java programming language where appropriate. Each topic is then covered in greater detail in subsequent chapters.</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">接下来的小节是JavaFX脚本编程语言的一个快速指南，介绍了JavaFx的关键语法和能力，并且比较了它跟java编程语言之间的差异，每个主题将在后续的章节中详细的介绍。<br />
</p>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Scripts</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">In the JavaFX Script programming language, a "script" is one or more declarations or expressions. Evaluating the script evaluates the declarations or expressions, in order:</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">在JavaFx中，&#8220;script&#8221;是一个以上的声明活表达式。执行脚本就是顺序执行脚本中的声明或表达式：<br />
</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">var ten : Integer = 10;<br />
java.lang.System.out.println("Twice {ten} is {2 * ten}.");   </pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">This prints out:</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">上面的语句会打印出：<br />
</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">Twice 10 is 20.</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Unlike an application written in the Java programming language, a script need not contain any class definitions or functions.</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">不想用java写的应用，脚本不需要包含class定义或者函数。<br />
</p>
</div>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Classes</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Class definitions share many similarities with the Java programming language, but some differences are notable. State, for example, is information stored in&nbsp;<em>attributes</em>, not fields. Behavior is exposed through&nbsp;<em>functions</em>, not methods. The following example defines a simple&nbsp;<code>Rectangle</code>&nbsp;class that demonstrates the basic syntax of each.</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">class Rectangle {<br />
<br />
attribute width: Integer;<br />
attribute height: Integer;<br />
<br />
function grow(): Void {<br />
grow(1);<br />
}<br />
<br />
function grow(amount: Integer): Void {<br />
width += amount;<br />
height += amount;<br />
}<br />
<br />
}<br />
</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">The JavaFX Script programming language supports&nbsp;<em>multiple inheritance</em>, making it possible to inherit from more than one class.</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Classes are covered in detail in&nbsp;<a href="classintro.html" target="_top" style="color: black;"><em>Chapter 2</em></a></p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Attributes and Functions are covered in detail in&nbsp;<a href="functions.html" target="_top" style="color: black;"><em>Chapter 3</em></a></p>
</div>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Objects</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;"><em>Object literals</em>&nbsp;provide a simple syntax for class instantiation. The following code creates a single instance of the&nbsp;<code>Rectangle</code>&nbsp;class defined previously, initializing its&nbsp;<code>width</code>&nbsp;and&nbsp;<code>height</code>attributes to&nbsp;<code>100</code>. (Note that&nbsp;<code>new</code>&nbsp;is not needed.)</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">Rectangle {<br />
<br />
width: 100<br />
height: 100<br />
<br />
}</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">To store a reference to this object, use the&nbsp;<code>var</code>&nbsp;keyword:</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">var myRect = Rectangle {<br />
<br />
width: 100<br />
height: 100<br />
}</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Objects are covered in detail in&nbsp;<a href="classintro.html" target="_top" style="color: black;"><em>Chapter 2</em>&nbsp;</a>.</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Variables and basic data types are covered in detail in&nbsp;<a href="types.html" target="_top" style="color: black;"><em>Chapter 4</em></a></p>
</div>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Expressions and Operators</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Like other programming languages, the JavaFX Script programming language supports expressions and operators.</p>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;"><a href="expressions.html" target="_top" style="color: black;"><em>Chapter 5</em>&nbsp;</a>discusses the expressions and operators available in the JavaFX Script programming language.</p>
</div>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Sequences</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">A&nbsp;<em>sequence</em>&nbsp;holds an ordered list of objects. This is roughly analogous to Java programming language arrays. Both hold multiple values and are accessed by index starting at 0.</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">var week = ["Monday","Tuesday","Wednesday","Thursday",<br />
"Friday","Saturday","Sunday"];<br />
var mon = week[0];<br />
var wed = week[2];<br />
var fri = week[4];<br />
</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Sequence&nbsp;<em>slices</em>&nbsp;are also supported:</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">var week = ["Monday","Tuesday","Wednesday","Thursday",<br />
"Friday","Saturday","Sunday"];<br />
var weekdays = week[0..4]; // first slice<br />
var weekend = week[5..6]; // second slice<br />
</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;"><a href="sequences.html" target="_top" style="color: black;"><em>Chapter 6</em>&nbsp;</a>covers the basics of declaring sequences, while&nbsp;<a href="comprehensions.html" target="_top" style="color: black;"><em>Chapter 7</em>&nbsp;</a>focuses on&nbsp;<em>using</em>&nbsp;sequences.</p>
</div>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Data Binding</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;"><em>Data binding</em>&nbsp;provides a simple syntax for synchronizing the state of multiple objects. When two objects are&nbsp;<em>bound</em>&nbsp;to each other, the second object's value automatically changes whenever the first object is updated. A common use of data binding is to keep GUI components synchronized with their underlying data.</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">import javafx.application.Frame;<br />
import javafx.application.Stage;<br />
import javafx.scene.text.Text;<br />
<br />
var myString = "Hello World!";<br />
<br />
Frame {<br />
width: 50<br />
height: 50<br />
visible: true<br />
stage: Stage {<br />
content: Text {<br />
content: bind myString<br />
}<br />
}<br />
}<br />
<br />
// If some other part of code changes myString<br />
// then the GUI's text will automatically change<br />
// as well.<br />
</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Data Binding is covered in detail in&nbsp;<a href="binding.html" target="_top" style="color: black;"><em>Chapter 8</em>&nbsp;</a>.</p>
</div>
<div>
<div>
<div>
<div>
<h4 style="padding-top: 8pt; font-family: sans-serif; font-weight: bold; font-style: italic; font-size: 100%; color: #305070;">Triggers</h4>
</div>
</div>
</div>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;"><em>Triggers</em>&nbsp;are blocks of code that run when certain conditions are true. For example, you may want to be alerted if an attribute's value has been set to something that is inappropriate. The following example shows the basic trigger syntax:</p>
<pre style="border-color: white; padding-top: 6pt; padding-bottom: 6pt; padding-left: 6pt; background-color: #ddddee; margin-left: 24pt; margin-right: 44pt;">import java.lang.System;<br />
<br />
ReplaceDemo {<br />
<br />
mySensitiveData: "Will anyone notice?"<br />
<br />
}<br />
<br />
class ReplaceDemo {<br />
attribute mySensitiveData: String<br />
on replace {<br />
System.out.println("I noticed a change!");                      <br />
};<br />
<br />
// application-specific safeguarding code would go here <br />
}<br />
</pre>
<p style="padding-top: 8pt; font-family: Tahoma,Arial,sans-serif; background-color: white; color: black; font-size: 12px;">Triggers are covered in detail in&nbsp;<a href="triggers.html" target="_top" style="color: black;"><em>Chapter 9</em>&nbsp;</a>.</p>
</div>
</span>
<img src ="http://www.blogjava.net/landy/aggbug/244239.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2008-12-04 00:06 <a href="http://www.blogjava.net/landy/archive/2008/12/04/244239.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>BPM的分类</title><link>http://www.blogjava.net/landy/archive/2008/11/21/241915.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 21 Nov 2008 15:46:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2008/11/21/241915.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/241915.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2008/11/21/241915.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/241915.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/241915.html</trackback:ping><description><![CDATA[一般来讲，BPM产品分为两类：EAI（Enterprise Application Integration）和WFA（Workflow automation）。EAI类的BPM主要处理application centric的业务流程（多数为自动流程），WFA则聚焦于自动化以人为中心的业务流程。<br />
下图是EAI与WFA的一个对比，供大家认识EAI和WFA的一些区别。<br />
<table style="width: 500px; height: 155px;" border="0" cellpadding="2" cellspacing="2">
    <tbody>
        <tr>
            <td><br />
            </td>
            <td>EAI<br />
            </td>
            <td>WFA<br />
            </td>
        </tr>
        <tr>
            <td>速度<br />
            </td>
            <td>机器速度（非常快）<br />
            </td>
            <td>人的速度（对流程执行速度要求不高）<br />
            </td>
        </tr>
        <tr>
            <td>参与者数量<br />
            </td>
            <td>少<br />
            </td>
            <td>多<br />
            </td>
        </tr>
        <tr>
            <td>异常处理<br />
            </td>
            <td>少<br />
            </td>
            <td>多(退单，reassign，委托等，非常复杂)<br />
            </td>
        </tr>
        <tr valign="middle" align="left">
            <td>业务规则</td>
            <td>一般是数据驱动<br />
            </td>
            <td>关系驱动，一般来讲，组织机构越复杂，规则逻辑也越复杂<br />
            </td>
        </tr>
        <tr valign="middle" align="left">
            <td>UI<br />
            </td>
            <td>少<br />
            </td>
            <td>多且复杂<br />
            </td>
        </tr>
        <tr valign="middle" align="left">
            <td>数据转换/映射<br />
            </td>
            <td>多<br />
            </td>
            <td>&nbsp;少</td>
        </tr>
    </tbody>
</table>
<br />
希望能够抛砖引玉，让大家正确认识一下BPM的分类。<br />
<img src ="http://www.blogjava.net/landy/aggbug/241915.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2008-11-21 23:46 <a href="http://www.blogjava.net/landy/archive/2008/11/21/241915.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>也谈JBI的未来</title><link>http://www.blogjava.net/landy/archive/2008/11/18/241194.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Tue, 18 Nov 2008 10:59:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2008/11/18/241194.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/241194.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2008/11/18/241194.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/241194.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/241194.html</trackback:ping><description><![CDATA[JBI号称java领域的ESB，也有了一个相应的JSR规范，那么JBI能一统ESB江湖吗？本人十分不看好它，纵观大厂商的ESB实现，鲜有原生支持JBI的，一般都是支持集成JBI。谁愿意在系统中跑两个ESB呢，除非金钱和精力双双过盛。JBI自身的定位是支持基于JAVA的应用们能够以SOA的方式构建起来。它的定位应该是与SCA+ESB的定位差不多，提供服务总线，服务聚合等功能，坏就坏在它局限于JAVA平台，当前异构系统集成的场景还是很普遍的，一个java服务依赖一个c++服务，而c++服务又依赖于另一个java服务，JBI就搞不定了。而ESB+SCA就能很好的解决这个问题，因此从技术上讲，JBI虽然是个规范，但在SOA不依赖于特定实现的大背景下，有着天生的缺陷，注定是个失败的规范。从业务策略上讲，SOA本来就是IBM等大厂商炒起来的，SCA是IBM，BEA，ORACLE等大厂商联合制定的，各大厂商早就有自己成熟的ESB，自然也不会鸟JBI这个残疾儿。
<img src ="http://www.blogjava.net/landy/aggbug/241194.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2008-11-18 18:59 <a href="http://www.blogjava.net/landy/archive/2008/11/18/241194.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>由google的V8 javascript引擎想到的</title><link>http://www.blogjava.net/landy/archive/2008/11/17/241056.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Mon, 17 Nov 2008 15:33:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2008/11/17/241056.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/241056.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2008/11/17/241056.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/241056.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/241056.html</trackback:ping><description><![CDATA[现在javascript虚拟机开始出现了，这对flex等新东东来讲不是个好消息，flex的优势在于具有丰富的UI控件，用户可以容易的编写界面，但是当javascript虚拟机出来后，这点优势很快将荡然无存，跟java类似，java预置了很多界面相关的组件，javascript虚拟机也可以做同样的事情，将一些常用的UI控件用javascript封装好提供出来，提供类似于java虚拟机一样的诊断工具供检测性能问题、内存泄露问题等等，这样javascript就可以做到展现逻辑全部在客户端，服务端与客户端之间传递的只是数据（事实上现在已经有大量框架支持了），展现能力做到跟flex持平，但javascript有先发优势，而且成为了浏览器的标准，能够直接操纵html文档，这些都是flex的弱项... 但是当前javascript规范不统一，多版本存在带来了javascript编程的复杂性，用户需要关心javascript在特定浏览器下的特定使用方式，不过当前各大巨头正试图规范javascript，但愿早日finalize啊！！呵呵。finalize之后，javasciript必将有一番改头换面的变化，让我们拭目以待把。
<div>看着flex，越看越像另一种html，只是展现更丰富一些，互动能力更强一些，不看好它的前景。</div>
<img src ="http://www.blogjava.net/landy/aggbug/241056.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2008-11-17 23:33 <a href="http://www.blogjava.net/landy/archive/2008/11/17/241056.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>快速构建面向服务的应用-1</title><link>http://www.blogjava.net/landy/archive/2008/11/07/239348.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Fri, 07 Nov 2008 15:50:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2008/11/07/239348.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/239348.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2008/11/07/239348.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/239348.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/239348.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 快速构建面向服务的应用&nbsp;&nbsp;<a href='http://www.blogjava.net/landy/archive/2008/11/07/239348.html'>阅读全文</a><img src ="http://www.blogjava.net/landy/aggbug/239348.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2008-11-07 23:50 <a href="http://www.blogjava.net/landy/archive/2008/11/07/239348.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>心事</title><link>http://www.blogjava.net/landy/archive/2008/03/16/186561.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sat, 15 Mar 2008 17:29:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2008/03/16/186561.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/186561.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2008/03/16/186561.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/186561.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/186561.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;
很久没有对自己的生活做过总结了，生活过得有点迷迷糊糊，把握不住方向了。再这样下去，担心会有大的变化，是时候总结一下了。<br />
过去的一年中，生活发生了点改变，应该算是充实了不少。总的来说是快乐多于痛苦，生活有了点其它的颜色。相比以前，应该是一种进步把。<br />
这就是好的。<br />
&nbsp;&nbsp;&nbsp;&nbsp;
人啊，总是免不了犯贱，犯贱就会出事。这就会直接影响在生活上。近来工作压力大，下面的人不服管。领导说了一句话，当时很受触动。这句话是：<br />
&nbsp;&nbsp;&nbsp; &#8220;做事情关注目标就行了，一些旁枝末节不必在意。批评别人也要讲艺术，需要让别人感受到是在真正的帮他，不然就会适得其反。&#8221;<br />
细细咀嚼，这些工作经验在生活中也是适用的。<br />
&nbsp;&nbsp;&nbsp;&nbsp;
改变自己，就从身边每一件小事做起。<br />
&nbsp;&nbsp;&nbsp;&nbsp;
一个人，能力不够，就只能是现在这个样子。若有不满，先从提升自身能力开始。<br />
<br />
<img src ="http://www.blogjava.net/landy/aggbug/186561.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2008-03-16 01:29 <a href="http://www.blogjava.net/landy/archive/2008/03/16/186561.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如果的事</title><link>http://www.blogjava.net/landy/archive/2007/04/22/112643.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 22 Apr 2007 09:40:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2007/04/22/112643.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/112643.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2007/04/22/112643.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/112643.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/112643.html</trackback:ping><description><![CDATA[我想过一件事<br>不是坏的事<br>一直对自己坚持<br>爱情的意思<br>像风没有理由<br>轻轻吹着走<br>谁爱谁没有<br>所谓的对与错<br>不管时间<br>说着我们在一起有多坎坷<br>我不敢去证实<br>爱你两个字<br>不是对自己矜持<br>也不是讽刺<br>别人都在说我其实很无知<br>这样的感情被认定很放肆<br>我很不服<br>我还在想着那件事<br>如果你已经不能控制<br>每天想我一次<br>如果你因为我而诚实<br>如果你看我的电影<br>听我爱的cd<br>如果你能带我一起旅行<br>如果你决定跟随感觉<br>为爱勇敢一次<br>如果你说我们有彼此<br>如果你会开始相信<br>这般恋爱心情<br>如果你能给我<font style="color: #e10900;">如果的事</font><br>我只要你一件<font style="color: #e10900;">如果的事</font><br>我会奋不顾身地去爱你
<br><img src ="http://www.blogjava.net/landy/aggbug/112643.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2007-04-22 17:40 <a href="http://www.blogjava.net/landy/archive/2007/04/22/112643.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>治咽炎药方</title><link>http://www.blogjava.net/landy/archive/2007/04/08/109204.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Sun, 08 Apr 2007 02:33:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2007/04/08/109204.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/109204.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2007/04/08/109204.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/109204.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/109204.html</trackback:ping><description><![CDATA[用绿茶10克加蜂蜜30克搅匀后用开水冲泡，待温时代茶频频饮服。每天一剂，连服10天就可以见效。每年都连服10天，咽炎不会再复发。
<img src ="http://www.blogjava.net/landy/aggbug/109204.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2007-04-08 10:33 <a href="http://www.blogjava.net/landy/archive/2007/04/08/109204.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>曼谷游记</title><link>http://www.blogjava.net/landy/archive/2007/01/31/96869.html</link><dc:creator>迷途书童</dc:creator><author>迷途书童</author><pubDate>Wed, 31 Jan 2007 02:53:00 GMT</pubDate><guid>http://www.blogjava.net/landy/archive/2007/01/31/96869.html</guid><wfw:comment>http://www.blogjava.net/landy/comments/96869.html</wfw:comment><comments>http://www.blogjava.net/landy/archive/2007/01/31/96869.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/landy/comments/commentRss/96869.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/landy/services/trackbacks/96869.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/landy/archive/2007/01/31/96869.html'>阅读全文</a><img src ="http://www.blogjava.net/landy/aggbug/96869.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/landy/" target="_blank">迷途书童</a> 2007-01-31 10:53 <a href="http://www.blogjava.net/landy/archive/2007/01/31/96869.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>