<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Stephan Schwab - tdd tag</title>
  <link>http://www.stephan-schwab.com/tags/tdd/</link>
  <description>Software Technology Consultant</description>
  <language>en</language>
  <copyright>Stephan Schwab</copyright>
  <lastBuildDate>Sat, 24 May 2008 11:24:54 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Quality control in software development</title>
    <link>http://www.stephan-schwab.com/2008/02/23/1203819204888.html</link>
    
      
        <description>
          &lt;p&gt;When it comes to software testing a number of terms are used. You hear the simple term testing, then some talk about QA and others call for QE. &lt;/p&gt;

&lt;p&gt;In common language test refers to the act of trying something out, checking on knowledge or behavior and other forms of comparing expected results/behavior to what can be observed. In the case of software testing you expect certain results/behavior from a software system. So you enter some values, perform a number of activities in the user interface and then compare what the systems shows or provides you with what you expected. If it matches, the software passes the test. If it doesn&#039;t match, it is deemed faulty and you write a report about the problem. Those reports are usually called defect or bug reports.&lt;/p&gt;

&lt;p&gt;I looked up the terms QA and QE on Wikipedia and for QA I found:&lt;/p&gt;

&lt;blockquote&gt;&lt;a href=&#034;http://en.wikipedia.org/wiki/Quality_assurance&#034;&gt;Quality assurance - Wikipedia.org&lt;/a&gt;:&lt;br&gt;
Quality assurance, or QA for short, is the activity of providing evidence needed to establish quality in work, and that activities that require good quality are being performed effectively. All those planned or systematic actions necessary to provide enough confidence that a product or service will satisfy the given requirements for quality.
&lt;/blockquote&gt;

&lt;p&gt;For Quality Engineering (QE) it has been a bit hard to find a good definition. Wikipedia thinks it&#039;s just a synonym for Quality Assurance (QA) and if you use Google, you will find links to people calling themselves Quality Engineer as well as companies offering courses in Quality Engineering.&lt;/p&gt;

&lt;p&gt;So I&#039;d like to look closer at the terms and try to define them myself for the purpose of this blog post.&lt;/p&gt;

&lt;p&gt;Quality Assurance (QA) and Quality Engineering (QE) have two different notions. These terms refer to quality and in the case of QA people want to assure quality and in the case of QE quality is being engineered. That prompts to ask how can we assure or engineer quality in software. But before we can answer that question we need to understand what quality in itself is. Here are a few quotes from an article about quality on Wikipedia:&lt;/p&gt;

&lt;blockquote&gt;&lt;a href=&#034;http://en.wikipedia.org/wiki/Quality&#034;&gt;Quality - Wikipedia.org&lt;/a&gt;:&lt;br&gt;
&lt;p&gt;Quality in everyday life and business, engineering and manufacturing has a pragmatic interpretation as the non-inferiority, superiority or usefulness of something. This is the most common interpretation of the term.&lt;/p&gt;
&lt;p&gt;[...]&lt;/p&gt;
&lt;p&gt;One key distinction to make is there are two common applications of the term Quality as form of activity or function within a business. One is Quality Assurance which is the &#034;prevention of defects&#034;, such as the deployment of a Quality Management System and preventative activities like FMEA. The other is Quality Control which is the &#034;detection of defects&#034;, most commonly associated with testing which takes place within a Quality Management System typically referred to as Verification and Validation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So there we have it. Quality means that something is fit for a specific purpose and is not bad or faulty. And we can have people ensuring that a product doesn&#039;t get shipped with defects (Quality Assurance) while others control the level of quality by detecting and counting defects in shipped products.&lt;/p&gt;

&lt;p&gt;Those definitions apply very well to manufactured goods. In a factory you can take every nth product from the assembly line and check it for defects. Then you create some statistics about the defects you find and in the end you may use those numbers to prompt some action, if the quality drops below a certain level you have defined as unacceptable. Then some people in the quality assurance department get asked to come up with solutions to prevent these manufacturing defects. They may talk to product engineers and change something in the product to make production easier in some way. My knowledge about manufactoring processes is kind of non-existent but apparently it works well in that industry. Where does that leave us for software?&lt;/p&gt;

&lt;p&gt;A lot of software development practices are inspired by other industries. There is a lot of people who perceive the act of creating software as some kind of engineering and call programmers software engineers. Probably to distinguish what they do from what a programmer perceivably does. An engineers takes on more complex tasks, creates something new or enhances a machine or building while a programmer writes a sequence of instructions to tell a machine what to do in which order. That implies as well that a programmer usually does not come up with something on her own but instead gets told what the machine should do.&lt;/p&gt;

&lt;p&gt;Now, if you have software engineers who create software, then you may want quality engineers to work on the quality of the software before it gets used by people outside of your engineering organization. One team of quality engineers may control the quality of the product before it gets shipped. Another team of quality engineers may assure that less defects make it into the product being shipped. Just as in manufacturing - isn&#039;t it?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ways of controlling and assuring software quality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Black box testing&lt;/em&gt; and &lt;em&gt;white box testing&lt;/em&gt; describe two distinctive approaches of controling software quality. A black box doesn&#039;t reveal much details to the observer. You can tell its size, maybe it&#039;s weight and then there is the fact that the box is black. That&#039;s about it. Software without access to the source code is quite similar to such a black mysterious box. A white box is viewed as one that reveals its inner workings to the observer.&lt;/p&gt;

&lt;p&gt;When we do &lt;em&gt;black box testing&lt;/em&gt; we explore the functionality of the software, verify its behavior and the results by comparing it to a description of what should happen. Basically the quality engineer executes the software and does what a regular user would do. Whatever goes wrong he reports as a defect. When black box testing a software the only way of performing tests is by means of the user interface provided by the software. If the software uses a database, the quality engineer can compare before and after values in the DB. But most of the times the only way of knowing whether the software does what was expected is by looking at the user interface again. Does the report show the correct values? Got the selected element highlighted? Does it print and the output looks as expected?&lt;/p&gt;

&lt;p&gt;That requires a lot of manual work and is per se error prone. A smart quality engineer wants to automate tests to create a number of baseline tests. When he gets a new version of the software he&#039;s testing, he simply runs his test suite and can concentrate on what&#039;s new instead of manually testing the same stuff over and over again. There is a number of tools - commercial and open-source - available for programmatically drive the UI of Windows, Java and web applications. Quite famous is the open-source tool &lt;a href=&#034;http://selenium.openqa.org/&#034;&gt;Selenium&lt;/a&gt; for web applications. On &lt;a href=&#034;http://www.openqa.org/&#034;&gt;OpenQA&lt;/a&gt;, a place for open-source QA tools, you can find as well tools to automate Java Swing or Windows GUI testing. For more tools, including commercial ones, look &lt;a href=&#034;http://www.java2s.com/Product/Java/Testing/UI-Test.htm&#034;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My personal opinion about black box testing is that it appears to be a good way to control the quality of a finished software product and provides information to decide whether it is safe to ship it. But it is extremely important to keep in mind that this kind of testing is based on the user interface and you still might miss hundreds of defects just because you don&#039;t execute the software in the way that makes them show up. Astonishingly a lot of organizations view this kind of testing as the most important form of testing. Probably because most people perceive software as the user interface. So what they can see and touch that must be the thing they call software.&lt;/p&gt;

&lt;p&gt;In the beginning of this post I was talking about quality assurance and quality control. So far we have identified a tool to control the quality of the user interface. I think it&#039;s safe to say it that way. What about controlling or even assuring the quality of the software&#039;s functions? To achieve that we need to look on the inside.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;White box testing&lt;/em&gt; requires us to work with the source code, which allows us to perform tests on internal mechanisms instead of just the user interface. The keywords that come to mind now are TDD (Test-Driven Development), unit tests and tools like those from the &lt;a href=&#034;http://www.junit.org/&#034;&gt;JUnit family&lt;/a&gt;. This is going to be a complex topic, as it is not only about controlling quality by measuring things. To assure quality you have to start with the process from the very beginning, which is when you analyze the problem you want to solve with software. It touches the way you develop (your development process) and essentially is not any more a matter of the QA/QE team. I think it makes sense to cover white box testing in a second post.&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&#034;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#034;
         xmlns:dc=&#034;http://purl.org/dc/elements/1.1/&#034;
         xmlns:trackback=&#034;http://madskills.com/public/xml/rss/module/trackback/&#034;&gt;
&lt;rdf:Description
    rdf:about=&#034;http://www.stephan-schwab.com/2008/02/23/1203819204888.html&#034;
    dc:identifier=&#034;http://www.stephan-schwab.com/2008/02/23/1203819204888.html&#034;
    dc:title=&#034;Quality control in software development&#034;
    trackback:ping=&#034;http://www.stephan-schwab.com/addTrackBack.action?entry=1203819204888&amp;token=-5805946420711460265&#034; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
        </description>
      
      
    
    
    
    <category>TDD</category>
    
    <category>SDLC</category>
    
    <category>Agile</category>
    
    <comments>http://www.stephan-schwab.com/2008/02/23/1203819204888.html#comments</comments>
    <guid isPermaLink="true">http://www.stephan-schwab.com/2008/02/23/1203819204888.html</guid>
    <pubDate>Sun, 24 Feb 2008 02:13:24 GMT</pubDate>
  </item>
  
  <item>
    <title>Coverage != testing</title>
    <link>http://www.stephan-schwab.com/2007/11/16/1195228861064.html</link>
    
      
        <description>
          &lt;p&gt;This morning I stumpled upon this:&lt;/p&gt;

&lt;blockquote&gt;&lt;a href=&#034;http://tech.puredanger.com&#034;&gt;Alex Miller&lt;/a&gt; in &lt;a href=&#034;http://tech.puredanger.com/2007/11/14/coverage-testing/#comments&#034;&gt;Coverage != testing&lt;/a&gt;:&lt;br&gt;
Testing verifies your code, coverage verifies your testing, but you can&amp;rsquo;t say that coverage tests your code.
&lt;/blockquote&gt;

&lt;p&gt;That&#039;s just so true. It&#039;s a good idea to start a new class with a unit test where you can model it and show how to use it. After all the test is where you first use the new code. And a unit test makes great documentation as well. It&#039;s likely that you will gain 100% coverage from the unit test. But you have not really tested yet. The missing piece is the integration with other parts of your system.&lt;/p&gt;

&lt;p&gt;In my opinion it&#039;s a good idea to have a team member wearing the QA hat. That&#039;s the person who should be vigilantly checking whether there are enough integration tests that really take on edge cases and correctly simulate user behavior or other forms of input.&lt;/p&gt;
&lt;!--
&lt;rdf:RDF xmlns:rdf=&#034;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#034;
         xmlns:dc=&#034;http://purl.org/dc/elements/1.1/&#034;
         xmlns:trackback=&#034;http://madskills.com/public/xml/rss/module/trackback/&#034;&gt;
&lt;rdf:Description
    rdf:about=&#034;http://www.stephan-schwab.com/2007/11/16/1195228861064.html&#034;
    dc:identifier=&#034;http://www.stephan-schwab.com/2007/11/16/1195228861064.html&#034;
    dc:title=&#034;Coverage != testing&#034;
    trackback:ping=&#034;http://www.stephan-schwab.com/addTrackBack.action?entry=1195228861064&amp;token=4678602625036185243&#034; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
        </description>
      
      
    
    
    
    <category>TDD</category>
    
    <comments>http://www.stephan-schwab.com/2007/11/16/1195228861064.html#comments</comments>
    <guid isPermaLink="true">http://www.stephan-schwab.com/2007/11/16/1195228861064.html</guid>
    <pubDate>Fri, 16 Nov 2007 16:01:01 GMT</pubDate>
  </item>
  
  <item>
    <title>Why I love test-driven development</title>
    <link>http://www.stephan-schwab.com/2007/04/16/1176704607959.html</link>
    
      
        <description>
          &lt;p&gt;Here is a very good example why I am a big fan of TDD (test-driven development). Instead of writing a specification or a requirements document I wrote the following test case and let Eclipse create a few new classes for me. Then I wrote enough code to get the basic functionality right and added a mock UserService with a few expectation set.&lt;/p&gt;

&lt;pre class=&#034;codeSample&#034;&gt;public class EnrollmentTest extends TestCase {
  public void testSignupTrialWithoutPayingOrganization() throws UserNotFoundException {
    PaymentDetails paymentDetails = new CreditCardDetails() ;

    Person firstPerson = new Person() ;
    firstPerson.setRfc822Address(&#034;sns@caimito.net&#034;) ;

    Person secondPerson = new Person() ;
    secondPerson.setRfc822Address(&#034;fidel@caimito.net&#034;) ;

    UserService userService = EasyMock.createMock(UserService.class) ;
    EasyMock.expect(userService.findUser(firstPerson.getRfc822Address())).andThrow(new UserNotFoundException()) ;
    userService.saveUser(new User(firstPerson.getRfc822Address())) ;
    EasyMock.expect(userService.findUser(secondPerson.getRfc822Address())).andThrow(new UserNotFoundException()) ;
    userService.saveUser(new User(secondPerson.getRfc822Address())) ;
    EasyMock.replay(userService) ;
		
    SignupManager signupManager = new PerUserSignupManager() ;
    signupManager.setUserService(userService) ;

    try {
      Customer customer = signupManager.signup(firstPerson, paymentDetails) ;
      User firstUser = customer.createUserAccount(firstPerson) ;
      assertNotNull(firstUser) ;
      assertEquals(firstPerson.getRfc822Address(), firstUser.getUsername()) ;
			
      User secondUser = customer.createUserAccount(secondPerson) ;
      assertNotNull(secondUser) ;
      assertEquals(secondPerson.getRfc822Address(), secondPerson.getUsername()) ;
    } catch (SignupFailedException e) {
      fail(e.getMessage()) ;
    } catch (UserAlreadyExistsException e) {
      fail(e.getMessage()) ;
    }
  }
}&lt;/pre&gt;

&lt;p&gt;This test case is very high-level. There is more to be implemented. The work of implementing the details can be distributed amongst the members of a team. That way everybody gets involved a bit, which is good to foster shared ownership of the code base, and it allows to delegate some easier tasks to Junior Developers. &lt;/p&gt;

&lt;p&gt;Such a high-level test case can be used as well by a Senior Developer with more design experience to more precisely prepare a task for a learner. The high-level design is there and the Junior Developer can fill in the missing pieces and design a bit of the lower level parts. He will be able to learn good design and contribute working code to the project.&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&#034;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#034;
         xmlns:dc=&#034;http://purl.org/dc/elements/1.1/&#034;
         xmlns:trackback=&#034;http://madskills.com/public/xml/rss/module/trackback/&#034;&gt;
&lt;rdf:Description
    rdf:about=&#034;http://www.stephan-schwab.com/2007/04/16/1176704607959.html&#034;
    dc:identifier=&#034;http://www.stephan-schwab.com/2007/04/16/1176704607959.html&#034;
    dc:title=&#034;Why I love test-driven development&#034;
    trackback:ping=&#034;http://www.stephan-schwab.com/addTrackBack.action?entry=1176704607959&amp;token=-922936457030521567&#034; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
        </description>
      
      
    
    
    
    <category>TDD</category>
    
    <category>Experience</category>
    
    <category>Caimito</category>
    
    <category>Agile</category>
    
    <comments>http://www.stephan-schwab.com/2007/04/16/1176704607959.html#comments</comments>
    <guid isPermaLink="true">http://www.stephan-schwab.com/2007/04/16/1176704607959.html</guid>
    <pubDate>Mon, 16 Apr 2007 06:23:27 GMT</pubDate>
  </item>
  
  <item>
    <title>[TSE] Meeting Requirements through Acceptance and Stress Testing</title>
    <link>http://www.stephan-schwab.com/2006/12/10/1165759065686.html</link>
    
      
        <description>
          &lt;p&gt;My fellow German developer Eberhard Wolff is speaking this morning about acceptance and stress testing to meet requirements.&lt;/p&gt;

&lt;p&gt;As an introduction he&#039;s wrapping up what Spring provides in the org.springframework.test package.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Acceptance Tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now we are getting into Acceptance Tests. You use them to find errors in the implementation of business requirements or use cases. One can see them as formalized requirements. Unfortunately many times they are done manually and after the whole system has been developed. &lt;a href=&#034;http://fitnesse.org/&#034;&gt;Fit/FitNesse&lt;/a&gt; is a tool for acceptance tests. The customer and the developer should write the acceptance tests together - so does XP say. Fit/FitNesse uses HTML as input format. Test data and expected results are provided as HTML tables. You need to write a simple class as a wrapper for business logic, which can be injected using @Configurable. This class is then used to pass data into the test and check the results.&lt;/p&gt;

&lt;p&gt;Eberhard is working on a general &lt;a href=&#034;https://spring-fitnesse.dev.java.net/&#034;&gt;Fit Exporter for Spring&lt;/a&gt;. It&#039;s currently Alpha code.&lt;/p&gt;

&lt;p&gt;The SpringActionFixture can be used to test actions that are usually performed in a GUI. You specify input data and actions - e.g. press add button - and then look for results. In the HTML input file you use the expression &#034;press&#034; to call a method. So the UI stuff is left out, but the method that normally be called by the UI is now being called by FitNesse.&lt;/p&gt;

&lt;p&gt;One question from the audience is whether you can run Fit/Fitnesse as part of a Maven build. As it&#039;s a command line tool that should be no problem.&lt;/p&gt;

&lt;p&gt;Fit uses HTML &lt;strong&gt;files&lt;/strong&gt; as input. Fitnesse uses Wiki pages. Triggered by a question from the audience Eberhard opinions that probably Word documents that get exported to HTML are the best solution to get business people to provide test data and rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#034;http://jakarta.apache.org/jmeter/&#034;&gt;JMeter&lt;/a&gt; is a good tool to performance test web based applications. JMeter creates a large number of requests, but how do you measure the performance in the whole system. You want to measure each part of the system. Using a regular profiler for Java would not be sufficient for the purpose of performance tests, because it only focuses on the Java code itself. &lt;a href=&#034;http://jamonapi.sourceforge.net/&#034;&gt;JAMon&lt;/a&gt; is a monitoring framework, which offers a Spring interceptor. For web application you configure a filter in web.xml. The JAMon filter measures HTTP request/response. JAMon profiles method calls using AOP. JAMon can be used as well to profile other parts of the system by simply declaring other AOP aspects, e.g. you could use it to profile SQL queries.&lt;/p&gt;

&lt;p&gt;One could use JAMon &lt;em&gt;even in production&lt;/em&gt; as the overhead is very little. It can use exiting Pointcuts and Spring AOP proxies. &lt;/p&gt;


&lt;!--
&lt;rdf:RDF xmlns:rdf=&#034;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#034;
         xmlns:dc=&#034;http://purl.org/dc/elements/1.1/&#034;
         xmlns:trackback=&#034;http://madskills.com/public/xml/rss/module/trackback/&#034;&gt;
&lt;rdf:Description
    rdf:about=&#034;http://www.stephan-schwab.com/2006/12/10/1165759065686.html&#034;
    dc:identifier=&#034;http://www.stephan-schwab.com/2006/12/10/1165759065686.html&#034;
    dc:title=&#034;[TSE] Meeting Requirements through Acceptance and Stress Testing&#034;
    trackback:ping=&#034;http://www.stephan-schwab.com/addTrackBack.action?entry=1165759065686&amp;token=-938240161682814562&#034; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
        </description>
      
      
    
    
    
    <category>SpringFramework</category>
    
    <category>TDD</category>
    
    <comments>http://www.stephan-schwab.com/2006/12/10/1165759065686.html#comments</comments>
    <guid isPermaLink="true">http://www.stephan-schwab.com/2006/12/10/1165759065686.html</guid>
    <pubDate>Sun, 10 Dec 2006 13:57:45 GMT</pubDate>
  </item>
  
  <item>
    <title>[TSE] The Building Blocks of Domain Driven Design</title>
    <link>http://www.stephan-schwab.com/2006/12/08/1165593898810.html</link>
    
      
        <description>
          &lt;p&gt;Keith Donald&#039;s talk at The Spring Experience has started. Right now he&#039;s summarizing what &lt;a href=&#034;/2006/12/08/1165587482609.html&#034;&gt;Eric&lt;/a&gt; told us before.&lt;/p&gt;

&lt;p&gt;A domain model does not capture every aspect of the real world. Instead it&#039;s a simplistic view of the world to serve a purpose. Discoveries during the implementation feed back into the model design.&lt;/p&gt;

&lt;p&gt;Isolate the domain by using a layered architecture. Do not mix UI, database, external services and business objects all together. The very same isolation allows unit testing and Spring helps in the wiring of the units.&lt;/p&gt;

&lt;p&gt;Keith shows a diagram with the user interface on top of the application and the application on top of the domain and everything on top of the infrastructure. The application layer delegates tasks to the domain layer for complex solutions.&lt;/p&gt;

&lt;p&gt;The domain layer represents business rules and states.&lt;/p&gt;

&lt;p&gt;The infrastructure layer interacts with the database, constructs UI widgets and deal with everything technical.&lt;/p&gt;

&lt;p&gt;The domain layer is to isolate the domain objects from other functions in the system to avoid mixing technical and domain concepts. One should bind the model the implementation early. Implement the behavior of the application within the domain model classes without thinking about the technical infrastructure. The resulting artifact is a unit test.&lt;/p&gt;

&lt;p&gt;In the beginning map domain entities literally to Java objects. Some of these mappings may be wrong in the end and you will need to refactor, but it&#039;s a start. Then start writing unit tests using those classes. Keith is now showing actual code of unit tests for his reward dining example.&lt;/p&gt;

&lt;p&gt;Organize domain behaviors into coarse-grain, high-level user operations. Make user operations part of the application layer. Unit tests in the domain layer are a good place to look for application layer use-cases. The application layer encapsulates complex domain layer objects and rules and allows for freedom in the implementation. After defining the boundaries of the application layer focus on streamlining the domain model implementation.&lt;/p&gt;

&lt;p&gt;Streamline associations between model objects. If you don&#039;t understand why an association is needed, avoid it. Association create coupling, which is generally to be avoided. Impose a traversal direction on associations.&lt;/p&gt;

&lt;p&gt;Entities, value objects and services. Often entities are persisted to a database. Entities maintain their identity that never changes. Entities may be used by other applications and need to be tracked. They have a life cycle and the model needs to define what it means to be the same thing. String entity objects down to the most intrinsic characteristics and only add required behavior and attributes needed for that behavior. For everything else add associated objects.&lt;/p&gt;

&lt;p&gt;Value objects are identified by their attributes and often they are interchangeable and transient. Value objects can be shared and are good candidates for immutability. They reduce bugs by avoiding invariants.&lt;/p&gt;

&lt;p&gt;Services are activities or actions, not a thing. A service is something that makes it happen and is stateless. Services should be thin coordinators and one should resist the urge to develop fat services that attempt to solve the problem all on their own. Look for natural opportunities to encapsulate behavior in services that doesn&#039;t make sense within Entities or Value Objects. The main responsibility of a service is to orchestrate things, to coordinate. It delegates to entities to do the work.&lt;/p&gt;

&lt;p&gt;The creation of Entities should be done using factories and repositories that restore an entity object from a persistent form. Services control and coordinate the life cycle of entities.&lt;/p&gt;

&lt;p&gt;Someone asked whether a repository isn&#039;t a service. Keith answers is that a repository is a DAO service, but with a very simple job. It doesn&#039;t coordinate work and therefore it wouldn&#039;t be justified to call it a service.&lt;/p&gt;

&lt;p&gt;Make sure that your factories and repositories return fully initialized objects to their callers.&lt;/p&gt;


&lt;!--
&lt;rdf:RDF xmlns:rdf=&#034;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#034;
         xmlns:dc=&#034;http://purl.org/dc/elements/1.1/&#034;
         xmlns:trackback=&#034;http://madskills.com/public/xml/rss/module/trackback/&#034;&gt;
&lt;rdf:Description
    rdf:about=&#034;http://www.stephan-schwab.com/2006/12/08/1165593898810.html&#034;
    dc:identifier=&#034;http://www.stephan-schwab.com/2006/12/08/1165593898810.html&#034;
    dc:title=&#034;[TSE] The Building Blocks of Domain Driven Design&#034;
    trackback:ping=&#034;http://www.stephan-schwab.com/addTrackBack.action?entry=1165593898810&amp;token=-9204469802866237899&#034; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
        </description>
      
      
    
    
    
    <category>SpringFramework</category>
    
    <category>TDD</category>
    
    <comments>http://www.stephan-schwab.com/2006/12/08/1165593898810.html#comments</comments>
    <guid isPermaLink="true">http://www.stephan-schwab.com/2006/12/08/1165593898810.html</guid>
    <pubDate>Fri, 08 Dec 2006 16:04:58 GMT</pubDate>
  </item>
  
  </channel>
</rss>
