<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xml" href="http://www.dzone.com/links/misc/rss.xsl"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>dzone.com: standards</title>
    <link>http://www.dzone.com/links/tag/standards.html</link>
    <description>dzone.com: fresh links for developers</description>
    <language>en-us</language>
    <copyright>Copyright (c) 2008 DZone, Inc.</copyright>
    <pubDate>Mon, 09 Nov 2009 22:00:25 GMT</pubDate>
    <dc:creator>The dzone.com community</dc:creator>
    <dc:date>2009-11-09T22:00:25Z</dc:date>
    <dc:language>en-us</dc:language>
    <dc:rights>Copyright (c) 2008 DZone, Inc.</dc:rights>
    <dz:selfLink>http://www.dzone.com/links/feed/frontpage/standards/rss.xml</dz:selfLink>
    <image>
      <title>dzone.com: fresh links for developers</title>
      <url>http://www.dzone.com/images/std/dzone.com_258x55.gif</url>
      <link>http://www.dzone.com/links/</link>
    </image>
    <item>
      <title>Testing and constructors</title>
      <link>http://www.dzone.com/links/rss/testing_and_constructors.html</link>
      <description>One of the pillars of design for testability, which is listed also in the Google guide for code reviewers, is to have constructors that do not contain logic or method calls. I will explain the reasons behind this choice with an example, but let me say that to reduce dependencies it is natural for a class to avoid making assumptions on the external environment, performing things like creating new objects. Separating the business responsibility of a class from the one of wiring itself to other objects is necessary.</description>
      <category>how-to</category>
      <category>methodology</category>
      <category>php</category>
      <category>standards</category>
      <pubDate>Sat, 07 Nov 2009 05:15:14 GMT</pubDate>
      <guid isPermaLink="false">http://www.dzone.com/links/280457.html</guid>
      <dc:creator>piccoloprincipe</dc:creator>
      <dc:date>2009-11-07T05:15:14Z</dc:date>
      <content:encoded><![CDATA[<a href='http://www.dzone.com/links/rss/testing_and_constructors.html'><img src='http://cdn.dzone.com/images/thumbs/120x90/280457.jpg' style='width:120;height:90;float:left;vertical-align:top;border:1px solid #ccc;' /></a><p style='margin-left: 130px;'>One of the pillars of design for testability, which is listed also in the Google guide for code reviewers, is to have constructors that do not contain logic or method calls. I will explain the reasons behind this choice with an example, but let me say that to reduce dependencies it is natural for a class to avoid making assumptions on the external environment, performing things like creating new objects. Separating the business responsibility of a class from the one of wiring itself to other objects is necessary.<br/><br/><a href='http://www.dzone.com/links/rss/testing_and_constructors.html'><img src='http://www.dzone.com/links/voteCountImage?linkId=280457' border='0'/></a></p>]]></content:encoded>
      <dz:linkId>280457</dz:linkId>
      <dz:submitDate>2009-11-04T12:19:47Z</dz:submitDate>
      <dz:promoteDate>2009-11-07T05:15:14Z</dz:promoteDate>
      <dz:voteUpCount>11</dz:voteUpCount>
      <dz:voteDownCount>0</dz:voteDownCount>
      <dz:clickCount>308</dz:clickCount>
      <dz:commentCount>0</dz:commentCount>
      <dz:thumbnail>http://www.dzone.com/links/images/thumbs/120x90/280457.jpg</dz:thumbnail>
      <dz:submitter>
        <dz:username>piccoloprincipe</dz:username>
        <dz:userimage>http://www.dzone.com/links/images/avatars/355617.gif</dz:userimage>
      </dz:submitter>
    </item>
  </channel>
</rss>

