<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UKoom &#187; Architecture</title>
	<atom:link href="http://www.ukoom.com/tag/architecture/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ukoom.com</link>
	<description>Documentum, SharePoint, Alfresco, ECM...</description>
	<lastBuildDate>Thu, 13 May 2010 00:21:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DRY Your Code</title>
		<link>http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm</link>
		<comments>http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm#comments</comments>
		<pubDate>Sun, 01 Nov 2009 00:00:00 +0000</pubDate>
		<dc:creator>Rexleed</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=155</guid>
		<description><![CDATA[


 Don&#8217;t Repeat [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ukoom.com/wp-content/uploads/2008/11/dry-your-code.jpg"><img class="alignnone size-medium wp-image-157" title="dry-your-code" src="http://www.ukoom.com/wp-content/uploads/2008/11/dry-your-code-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.ukoom.com/wp-content/uploads/2008/11/dry-your-code.jpg"><br />
</a></p>
<p class="MsoNormal"><strong> </strong><strong><span style="font-family: &quot;Courier New&quot;;">Don&#8217;t Repeat Yourself</span></strong><span style="font-family: &quot;Courier New&quot;;"> (DRY, also known as Single Point of Truth) is a process philosophy aimed at reducing duplication, particularly in computing. The philosophy emphasizes that information should not be duplicated, because duplication increases the difficulty of change, may decrease clarity, and leads to opportunities for inconsistency. DRY is a core principle of Andy Hunt and Dave Thomas&#8217;s book The Pragmatic Programmer. They apply it quite broadly to include &#8220;database schemas, test plans, the build system, even documentation.&#8221; When the DRY principle is applied successfully, a modification of any single element of a system does not change other logically-unrelated elements. Additionally, elements that are logically related all change predictably and uniformly, and are thus kept in sync.</span></p>
<p class="MsoNormal">
<p class="MsoNormal"><span style="font-family: &quot;Courier New&quot;;">The DRY code philosophy is stated as &#8220;Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.&#8221; This philosophy is also prevalent in model-driven architectures, in which software artifacts are derived from a central object model expressed in a form such as UML. DRY code is created by data transformation, which allows the software developer to avoid copy and paste operations. DRY code usually makes large software systems easier to maintain, as long as the data transformation are easy to create and maintain. Tools such as XDoclet and XSLT are examples of DRY coding techniques. Examples of systems that require duplicate information are Enterprise Java Beans, which requires duplication not just in Java code but also in configuration files. Examples of systems that attempt to reduce duplicate information include the Ruby on Rails application development environment.</span></p>
<p class="MsoNormal"><span style="font-family: &quot;Courier New&quot;;">Data transformation skills are not taught in most junior-level software engineering courses. Current computer science curricula tend to be heavily weighted toward procedural skills such as Java, C++, or C#. The use of DRY code becomes increasingly important as developers create applications that use multi-tier architectures. The model-view-controller architectural pattern also challenges software developers to use data transformations. Developments in some language features, such as Java annotations, may allow additional metadata to be stored within object class definitions and accessed at run time, allowing features such as automatic view generation directly from models.</span></p>
<p class="MsoNormal">Reference: http://en.wikipedia.org/wiki/Don&#8217;t_repeat_yourself</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm" title="DAO层单元测试">DAO层单元测试</a></li><li><a href="http://www.ukoom.com/elegant-software.htm" title="Elegant Software">Elegant Software</a></li><li><a href="http://www.ukoom.com/single-sign-on.htm" title="Single Sign On">Single Sign On</a></li><li><a href="http://www.ukoom.com/code-quality-checklist.htm" title="Code Quality Checklist">Code Quality Checklist</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DAO层单元测试</title>
		<link>http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm</link>
		<comments>http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm#comments</comments>
		<pubDate>Fri, 27 Feb 2009 08:41:35 +0000</pubDate>
		<dc:creator>ukoom</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=554</guid>
		<description><![CDATA[对于一些框架软件，例如springframework来说，要测试的是API实现的逻辑，这种情况下大量mock隔离其他对象的影响是必要的。但是对于我们应用程序，特别是数据处理型应用，你不测试数据库访问，根本就等于没有做测试。换句话说测试DAO就是在测试你的Hibernate映射关系有没有配对，你的HQL查询有没有写对，这一Mock，要测试的真正目标根本就没有达到。
 
这种DAO测试诚然就是集成单元测试，其实就是对于Web Action测试，我也曾经一度认为应该mock service来测试，但是现在我已经不这样做了，而是真正初始化webwork的容器注入真正的service对象来测试了。因为Action是没有业务逻辑的，测试Action的目标是看xwork.xml有没有配对，拦截器运用是否正确的，这一mock，直接把action对象当做POJO来测试，你只能测试action传了什么参数，其他什么都没有去测，但是action传入什么参数，那是OGNL自动完成的，用不着你多此一举了。
 
从这个角度来说，只有对util类的测试才是真正的单元测试，其他都是集成测试，但我不觉得这样做有什么不对。特别是我看过ruby [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"><span style="font-size: small;">对于一些框架软件，例如<span lang="EN-US">springframework</span>来说，要测试的是<span lang="EN-US">API</span>实现的逻辑，这种情况下大量<span lang="EN-US">mock</span>隔离其他对象的影响是必要的。但是对于我们应用程序，特别是数据处理型应用，你不测试数据库访问，根本就等于没有做测试。换句话说测试<span lang="EN-US">DAO</span>就是在测试你的<span lang="EN-US">Hibernate</span>映射关系有没有配对，你的<span lang="EN-US">HQL</span>查询有没有写对，这一<span lang="EN-US">Mock</span>，要测试的真正目标根本就没有达到。<span lang="EN-US"></span></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"><span style="font-size: small;">这种<span lang="EN-US">DAO</span>测试诚然就是集成单元测试，其实就是对于<span lang="EN-US">Web Action</span>测试，我也曾经一度认为应该<span lang="EN-US">mock service</span>来测试，但是现在我已经不这样做了，而是真正初始化<span lang="EN-US">webwork</span>的容器注入真正的<span lang="EN-US">service</span>对象来测试了。因为<span lang="EN-US">Action</span>是没有业务逻辑的，测试<span lang="EN-US">Action</span>的目标是看<span lang="EN-US">xwork.xml</span>有没有配对，拦截器运用是否正确的，这一<span lang="EN-US">mock</span>，直接把<span lang="EN-US">action</span>对象当做<span lang="EN-US">POJO</span>来测试，你只能测试<span lang="EN-US">action</span>传了什么参数，其他什么都没有去测，但是<span lang="EN-US">action</span>传入什么参数，那是<span lang="EN-US">OGNL</span>自动完成的，用不着你多此一举了。<span lang="EN-US"></span></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"><span style="font-size: small;">从这个角度来说，只有对<span lang="EN-US">util</span>类的测试才是真正的单元测试，其他都是集成测试，但我不觉得这样做有什么不对。特别是我看过<span lang="EN-US">ruby on rails</span>的测试框架以后更加坚定了这种做法。<span lang="EN-US">rails</span>的<span lang="EN-US">unit test</span>，<span lang="EN-US">functional test</span>，<span lang="EN-US">integration test</span>都是集成测试。<span lang="EN-US"></span></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"><span style="font-size: small;">测试的策略和你用什么编程语言无关。单元测试也不是为了划清界限才产生的，单元测试为了保证软件的质量，这一点不要想歪了。不管是<span lang="EN-US">Java</span>还是<span lang="EN-US"> Ruby</span>，敏捷软件开发有一个理念，所有的人拥有所有的代码，不管代码是不是你经手的，你都有责任去维护它的质量。单元测试不是为了推卸责任。<span lang="EN-US"></span></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US">rails</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;">和<span lang="EN-US">Java</span>在单元测试这一点上没有什么区别，本版前面有一个关于<span lang="EN-US">mock</span>适用场合的讨论，这里不展开谈，只说结论：<span lang="EN-US">mock</span>仅仅适用于测试环境无法重现的部分，例如信用卡支付网关，<span lang="EN-US">web</span>容器请求和响应对象等等，<span lang="EN-US">mock</span>不应该被滥用。<span lang="EN-US"></span></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"><span style="font-size: small;">单元测试的范畴并不单单指隔离所有依赖对象进行单个对象的测试，否则任何对象的测试都必须引入<span lang="EN-US">mock</span>，否则单元测试就无法完成的。怎么做单元测试要看你的测试目标，如果偏离了测试的目标，<strong style="mso-bidi-font-weight: normal;">一昧追求纯粹意义上的隔离性，测试根本就是做无用功</strong>。</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt;"><span style="font-size: small;">This article is from another website which I forget. so sorry here.</span></span></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm" title="DRY Your Code">DRY Your Code</a></li><li><a href="http://www.ukoom.com/elegant-software.htm" title="Elegant Software">Elegant Software</a></li><li><a href="http://www.ukoom.com/single-sign-on.htm" title="Single Sign On">Single Sign On</a></li><li><a href="http://www.ukoom.com/code-quality-checklist.htm" title="Code Quality Checklist">Code Quality Checklist</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Elegant Software</title>
		<link>http://www.ukoom.com/elegant-software.htm</link>
		<comments>http://www.ukoom.com/elegant-software.htm#comments</comments>
		<pubDate>Fri, 27 Feb 2009 08:31:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=548</guid>
		<description><![CDATA[When I write [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">When I write code, elegance is something I aspire to, and in some senses goes hand-in-hand with <em><em><span style="font-family: Times New Roman;">beautiful code</span></em></em>, but that doesn&#8217;t really make it any clearer. Certainly, I think there is a strong element of &#8220;elegance is in the eye of the beholder&#8221;, but I think there are also some characteristics of the software that are contributory factors — how a particular person may rate the code on any aspect may vary, as may the importance they place on any given aspect, but these aspects will almost certainly impact how elegant the code appears.</span></span></p>
<h2><strong><span style="font-size: large; font-family: Times New Roman;"><span style="font-size: 18pt;">Factors affecting the elegance of software</span></span></strong></h2>
<p><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Here&#8217;s a short list of some of the factors that I think are important. Obviously, this is not an exhaustive list, and all comments are <em><em><span style="font-family: Times New Roman;">my opinion</span></em></em>, and not definitive.</span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Does it work? </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">I&#8217;d be hard-pushed to call software &#8220;elegant&#8221; if it didn&#8217;t work </span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Is it easy to understand? </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Lots of the following factors can really be summarised by this one: if I can&#8217;t understand the code, it&#8217;s not elegant. </span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Is it efficient? </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">A bubble sort is just not elegant, because there&#8217;s lots of much more efficient algorithms. If a cunning algorithmic trick can drastically reduce the runtime, using that trick contributes to making the code elegant, especially if it is still easy to understand. </span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Short functions </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Long functions make the code hard to follow. If I can&#8217;t see the whole function on one screen in my editor, it&#8217;s too long. Ideally, a function should be really short, less than 5 lines. </span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Good naming </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Short functions are all very well, but if functions are called </span></span><code><span style="font-size: x-small; font-family: Courier New;"><span style="font-size: 10pt;">foo</span></span></code>, <code><span style="font-size: x-small; font-family: Courier New;"><span style="font-size: 10pt;">abc</span></span></code>, or <code><span style="font-size: x-small; font-family: Courier New;"><span style="font-size: 10pt;">wrt_lng_dt</span></span></code>, it can <em><em><span style="font-family: Times New Roman;">still</span></em></em> be hard to understand the code. Of course, this applies to classes just as much as functions.</p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Clear division of responsibility </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">It is important that it is clear which function or class is responsible for any given aspect of the design. Not only that, but a class or function should not have <em><em><span style="font-family: Times New Roman;">too many responsibilities</span></em></em> — by the <a title="blocked::http://www.objectmentor.com/resources/articles/srp.pdf" href="http://www.objectmentor.com/resources/articles/srp.pdf">Single Responsibility Principle</a> a class or function should have just one responsibility. </span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">High cohesion </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><em><em><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Cohesion</span></span></em></em> is a measure of how closely related the data items and functions in a class or module are to each other. This is tightly tied in to division of responsibility — if a function is responsible for calculating primes and managing network connections, then it has low cohesion, and a poor division of responsibility.</p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Low coupling </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Classes and modules should not have have unnecessary dependencies between them. If a change to the internals of one class or function requires a change to apparently unrelated code elsewhere, there is too much coupling. This is also related to the division of responsibility, and excessive coupling can be a sign that too many classes, modules or functions share a single responsibility. </span></span></p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Appropriate use of OO and other techniques </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">It is not always appropriate to encapsulate something in a class — sometimes a simple function will suffice, and sometimes other techniques are more appropriate. This is also related to the division of responsibilities, but it goes beyond that — is this code structure the most appropriate for handling this particular responsibility? Language idioms come into play here: is it more appropriate to use STL-style </span></span><code><span style="font-size: x-small; font-family: Courier New;"><span style="font-size: 10pt;">std::sort</span></span></code> on an iterator interface, or does it make more sense to provide a <code><span style="font-size: x-small; font-family: Courier New;"><span style="font-size: 10pt;">sort</span></span></code> member function? Can the algorithm be expressed in a functional way, or is an imperative style more appropriate?</p>
<p class="MsoNormal"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Minimal code </span></span></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Code should be short and to-the-point. Overly-long code can be the consequence of doing things at too low a level, and doing byte-shuffling rather than using a high-level sort algorithm. It can also be the consequence of too many levels of indirection — if a function does nothing except call one other function, it&#8217;s getting in the way. Sometimes this can be at odds with good naming — a well-named function with a clear responsibility just happens to be able to delegate to a generic function, for example — but there&#8217;s obviously a trade-off. Minimal code is also related to duplication — if two blocks of code do the same thing, one of them should be eliminated. </span></span></p>
<p><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">One thing that is <em><em><span style="font-family: Times New Roman;">not</span></em></em> present in the above list is comments in the code. In my view, the presence of comments in the code implies that the code is not sufficiently clear. Yes, well-written comments can make it easier to understand a given block of code, but they should in general be unnecessary: truly elegant code can be understood without comments. Of course, you might need to understand what it is that the code is trying to accomplish before it makes complete sense, particularly if the code is using advanced algorithms, and comments can help with that (e.g. by providing a reference to the algorithm), but my general view is that comments are a sign of less-than-perfect code.</span></span></p>
<p><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;">Reference:</span></span></p>
<p><span style="font-size: small; font-family: Times New Roman;"><span style="font-size: 12pt;"><a href="http://www.justsoftwaresolutions.co.uk/design/elegance-in-software.html">http://www.justsoftwaresolutions.co.uk/design/elegance-in-software.html</a></span></span></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm" title="DRY Your Code">DRY Your Code</a></li><li><a href="http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm" title="DAO层单元测试">DAO层单元测试</a></li><li><a href="http://www.ukoom.com/single-sign-on.htm" title="Single Sign On">Single Sign On</a></li><li><a href="http://www.ukoom.com/code-quality-checklist.htm" title="Code Quality Checklist">Code Quality Checklist</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/elegant-software.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Single Sign On</title>
		<link>http://www.ukoom.com/single-sign-on.htm</link>
		<comments>http://www.ukoom.com/single-sign-on.htm#comments</comments>
		<pubDate>Fri, 06 Feb 2009 09:24:59 +0000</pubDate>
		<dc:creator>Rexleed</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=499</guid>
		<description><![CDATA[Single sign on [...]]]></description>
			<content:encoded><![CDATA[<p>Single sign on is a session/user authentication process that allows a user to provide his or her credentials once in order to access multiple applications. The single sign on authenticates the user to access all the applications he or she has been authorized to access. It eliminates future authenticaton requests when the user switches applications during that particular session.</p>
<p>Web Single sign on works strictly with applications accessed with a web browser. The request to access a web resource is intercepted either by a component in the web server, or by the application itself. Unauthenticated users are diverted to an authenticaton service and returned only after a successful authentication.</p>
<p><strong>Shared Authentication Schemes which are not Single Sign-On</strong></p>
<p>Single sign on requires that users literally sign in once to establish their credentials. Systems which require the user to log in multiple times to the same identity are inherently not single sign on. For example, an environment where users are prompted to log in to their desktop, then log in to their email using the same credentials, is not single sign on. Shared authentication schemes like <a title="OpenID" href="http://en.wikipedia.org/wiki/OpenID"><span style="text-decoration: none; color: #000000;">OpenID</span></a>, which require additional sign-on for each web site, are also not single sign on.</p>
<p class="MsoNormal">Reference:</p>
<p><span style="font-family: &quot;Times New Roman&quot;;">http://en.wikipedia.org/wiki/Single_sign-on<br />
http://www.cnblogs.com/guodapeng/archive/2008/11/19/1336583.html<br />
http://www.ibm.com/developerworks/web/library/wa-singlesign/<br />
http://www.josso.org/confluence/display/JOSSO1/JOSSO+-+Java+Open+Single+Sign-On+Project+Home<br />
http://www.360doc.com/content/061004/13/73_222129.html<br />
http://aspalliance.com/1545_Understanding_Single_SignOn_in_ASPNET_20<br />
http://ginge.javaeye.com/blog/225778<br />
</span></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm" title="DRY Your Code">DRY Your Code</a></li><li><a href="http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm" title="DAO层单元测试">DAO层单元测试</a></li><li><a href="http://www.ukoom.com/elegant-software.htm" title="Elegant Software">Elegant Software</a></li><li><a href="http://www.ukoom.com/code-quality-checklist.htm" title="Code Quality Checklist">Code Quality Checklist</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/single-sign-on.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Quality Checklist</title>
		<link>http://www.ukoom.com/code-quality-checklist.htm</link>
		<comments>http://www.ukoom.com/code-quality-checklist.htm#comments</comments>
		<pubDate>Thu, 01 Jan 2009 00:00:00 +0000</pubDate>
		<dc:creator>Rexleed</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://www.ukoom.com/?p=172</guid>
		<description><![CDATA[
1. Every fixed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ukoom.com/wp-content/uploads/2008/11/code-quallity-checklist.jpg"><img class="alignnone size-medium wp-image-173" title="Positive choice (yes)" src="http://www.ukoom.com/wp-content/uploads/2008/11/code-quallity-checklist-300x198.jpg" alt="" width="300" height="198" /></a></p>
<p>1. Every fixed defect on a deployed product has tests added to prevent regression.<br />
The worst thing you can do in this business is to have the same problem twice. Prevent it &#8211; our clients and users will usually understand if a bug happens the first time.Not ever, if it happesns agian.</p>
<p>2. Every design choice should yield the most simplistic design possible for the need of users at the current time. No guesses for future functionality were disigned into the application.</p>
<p>3. This paradigm is just as much for Project Manager as it is for Developers &#8211; but both types of people on a project have a responsibility to ensure that this is followed. Although Chapter 4 of Getting Real explains it better than I ever could &#8211; to sum it up. If you make guesses, rather than designing to facts, invariably, some of those guesses will be wrong. Some might be right , but any designing and development aht are for wrong guesses make things more complex, harder to fix, and harder to improve.<br />
Instead, code to what you know is true, launch early, watch users, and iterate quickly. That&#8217;s on of the major benefits of hosted software (web apps) over distributed software (desktop apps) &#8211; so use it to its full advantage.</p>
<p>4. All logic duplicated between two or more modules/classes has been turned into a gemified module.</p>
<p>5. All functionality used in two or more models has been turned into a library/module.</p>
<p>6. Code has been aggressively DRYed during development. Make helpers. Make modules. Just keep doing it.</p>
<p>7. All model and variable names are bothe immediately obvious ( to a new developer) and as short as possible without using abbreviations. Naming is hard. Particularly for developers who are immersed in an application &#8211; what&#8217;s obvious to you when you&#8217;ve loaded the entire context of the application into your brain, will not be obvious to you later or to a new set of eyes. Don’t ruin this immense strength! If you can’t think of an ingenious, clear, and short name immediately, finish coding your method, and then try to unload the entire context you have while deep in coding. Put a TODO in and rename your variable or method name at the end of the day.</p>
<p>The hope is that every item on the checklist is so obvious to the more experienced Java developer, that it’s not worth mentioning – but that to new developers, the items on the list are non-obvious, and require some explanation. So here goes:</p>
<p>I certify that all of the above is true for my project.<br />
[Printed Name] Signature</p>
<p>This is extended from http://www.matthewpaulmoore.com/articles/1276-ruby-on-rails-code-quality-checklist</p>
<p>I think these items are not only for Ruby on Rails but also work for other development, like Java, ASP.NET</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.ukoom.com/dont-repeat-yourself-dry-your-code.htm" title="DRY Your Code">DRY Your Code</a></li><li><a href="http://www.ukoom.com/dao-%e5%b1%82%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95.htm" title="DAO层单元测试">DAO层单元测试</a></li><li><a href="http://www.ukoom.com/elegant-software.htm" title="Elegant Software">Elegant Software</a></li><li><a href="http://www.ukoom.com/single-sign-on.htm" title="Single Sign On">Single Sign On</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.ukoom.com/code-quality-checklist.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
