<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel xmlns:blog="http://www.dotnetnuke.com/blog/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <title>Developing in the Domain</title>
    <description>This is a region for discussing thoughts on various aspects Business Objects/Domain Objects.
</description>
    <link>http://www.habanerolabs.com/Blogs/tabid/229/BlogId/1/Default.aspx</link>
    <language>en-US</language>
    <webMaster />
    <pubDate>Sun, 01 Aug 2010 07:28:57 GMT</pubDate>
    <lastBuildDate>Sun, 01 Aug 2010 07:28:57 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 4.0.0.0</generator>
    <item>
      <title>To Guid or not to Guid the question of Object Identity</title>
      <link>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/32/To-Guid-or-not-to-Guid-the-question-of-Object-Identity.aspx</link>
      <description>&lt;p&gt;
	The Concept of Object Persistance and Object identity have been around for as long as I've been programming (14 years) and probably longer. Unfortunately most systems and most developers in the Microsoft world have been developed using a database centric approach. The flow to Domain Driven Designs has thankfully finally started to flow strong and hard and I find myself spending less time having to argue the merits of DDD with other developers.&lt;/p&gt;
&lt;p&gt;
	However when Consulting I am regularly faced with Database Designs that use AutoIncrementing Fields or mutable properties or even worse composite mutable properties as the Primary Key in the Database.&lt;/p&gt;
&lt;p&gt;
	Example of AutoIncrementing Primary Key. Person has a PersonID : int as the Primary Key and the PersonID is set by the Database when the Person is first inserted into the DB.&lt;/p&gt;
&lt;p&gt;
	Example of a Composite mutable property as a Primary Key. Person has FirstName: string and Surname : string as the Primary Key in the Database. If these are mutable then some sort of Cascade Update is set so as to ensure that all other related tables FK's are maintained as valid.&lt;/p&gt;
&lt;p&gt;
	Now 12 years ago I used to see a lot more of this type of Database Design I still see quite a lot of this today. The reasons are numerous and sometimes inescapable e.g. I am developing with a legacy database, I have an .xxx.. DBA who is stuck in the 1960's. The company has programming standards that were written in the 80's etc.&lt;/p&gt;
&lt;p&gt;
	In this blog I will discuss why I prefer and rcommend using Guids whenever possible or an application generated Integer (when the DBA has an unjustified fear of GUID's) and also how&lt;/p&gt;
&lt;div class="tags"&gt;Tags: Object Identity,AutoIncrementing,Domain Driven Design,Habanero,Persistance,Object Relational Mapping.&lt;/div&gt;</description>
      <author />
      <comments>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/32/To-Guid-or-not-to-Guid-the-question-of-Object-Identity.aspx#Comments</comments>
      <slash:comments>3</slash:comments>
      <guid isPermaLink="true">http://www.habanerolabs.com/Blogs/tabid/229/EntryId/32/To-Guid-or-not-to-Guid-the-question-of-Object-Identity.aspx</guid>
      <pubDate>Wed, 19 May 2010 08:54:00 GMT</pubDate>
      <trackback:ping>http://www.habanerolabs.comDesktopModules/BlogTrackback.aspx?id=32</trackback:ping>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/24/Default.aspx">Object Identity</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/25/Default.aspx">AutoIncrementing</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/26/Default.aspx">Domain Driven Design</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/4/Default.aspx">Habanero</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/27/Default.aspx">Persistance</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/28/Default.aspx">Object Relational Mapping.</blog:tag>
    </item>
    <item>
      <title>TDD with AutoMockingUnityContainer - Simplify your test setup when using an IOC</title>
      <link>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/22/TDD-with-AutoMockingUnityContainer-Simplify-your-test-setup-when-using-an-IOC.aspx</link>
      <description>&lt;p&gt;
	When Doing TDD you are trying to Isolate your SUT (System Under Test). To do this you typically create Test Doubles (see &lt;a href="http://www.habanerolabs.com/Blogs/tabid/229/EntryId/20/Test-Spy-Stub-Double-Mock-Test-WTFs.aspx"&gt;previous blog&lt;/a&gt;) either automatically with a tool such as RhinoMocks or manually (i.e. you hand code the TestDouble).&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	When testing complex logic typically in the Logic/Services Layer you land up a significant number of your test doubles being simple Stubs (i.e. they are there to fulfill a parameter list or are being used inside the method but are of no interest to this particular test).&lt;/p&gt;
&lt;p&gt;
	In these cases I typically use RhinoMocks (the new RhinoMocks is awesome) to create my Stubs. The problem is that I then have to register my Proxy Stubs with the IOC Container so that the Resolve works. This is just another overhead with testing. I am a firm believer in making testing as frictionless as possible.&lt;/p&gt;
&lt;p&gt;
	Enter the AutoMockingUnityContainer&lt;/p&gt;
</description>
      <author />
      <comments>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/22/TDD-with-AutoMockingUnityContainer-Simplify-your-test-setup-when-using-an-IOC.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.habanerolabs.com/Blogs/tabid/229/EntryId/22/TDD-with-AutoMockingUnityContainer-Simplify-your-test-setup-when-using-an-IOC.aspx</guid>
      <pubDate>Sun, 16 May 2010 14:03:00 GMT</pubDate>
      <trackback:ping>http://www.habanerolabs.comDesktopModules/BlogTrackback.aspx?id=22</trackback:ping>
    </item>
    <item>
      <title>Cross Thread Runner - Testing User Controls in an STA Thread with NUnit</title>
      <link>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/18/Cross-Thread-Runner-Testing-User-Controls-in-an-STA-Thread-with-NUnit.aspx</link>
      <description>&lt;p&gt;
	I am not going to delve too deeply into the arguments on whether the User Interface should be tested or not. The principles of Unit Testing of User Interfaces are hotly debated in various Blogs. In this particular project I was using a third party control that was returning me a result of and I really needed to test my interaction with this control. The problem was the Control had to be run in STA and most Test Runners run in MTA. This seemed fairly simple since there is a [RequireSTA] in NUnit. Unforturtunately this did worked with some Test Runners but others seemed to ignore this attribute. The solution therefore became to create a Cross Thread Runner.&lt;/p&gt;
</description>
      <author />
      <comments>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/18/Cross-Thread-Runner-Testing-User-Controls-in-an-STA-Thread-with-NUnit.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.habanerolabs.com/Blogs/tabid/229/EntryId/18/Cross-Thread-Runner-Testing-User-Controls-in-an-STA-Thread-with-NUnit.aspx</guid>
      <pubDate>Sat, 10 Apr 2010 19:58:00 GMT</pubDate>
      <trackback:ping>http://www.habanerolabs.comDesktopModules/BlogTrackback.aspx?id=18</trackback:ping>
    </item>
    <item>
      <title>Filtering a Combo Box based on another Combo Box.</title>
      <link>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/17/Filtering-a-Combo-Box-based-on-another-Combo-Box.aspx</link>
      <description>&lt;p&gt;
	ComboBox Linker&lt;/p&gt;
&lt;p&gt;
	Ok so I have to admit that I have had to solve this problem several times over the past 12 years of programming. The problem is fairly generic and up untill now there was no general solution to it in Habanero.Faces.&lt;/p&gt;
&lt;p&gt;
	The problem is when you have two combo boxes that are linked i.e. the data from the first combo box filters the data in the second combo box. e.g. Select a Country and you get a filtered list of States for that country.&lt;/p&gt;
&lt;div class="tags"&gt;Tags: Habanero.Faces,User Interface ComboBox&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/1/Default.aspx&gt;.NET&lt;/a&gt;&lt;/div&gt;</description>
      <author />
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/1/Default.aspx">.NET</category>
      <comments>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/17/Filtering-a-Combo-Box-based-on-another-Combo-Box.aspx#Comments</comments>
      <slash:comments>7</slash:comments>
      <guid isPermaLink="true">http://www.habanerolabs.com/Blogs/tabid/229/EntryId/17/Filtering-a-Combo-Box-based-on-another-Combo-Box.aspx</guid>
      <pubDate>Thu, 01 Apr 2010 11:47:00 GMT</pubDate>
      <trackback:ping>http://www.habanerolabs.comDesktopModules/BlogTrackback.aspx?id=17</trackback:ping>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/18/Default.aspx">Habanero.Faces</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/19/Default.aspx">User Interface ComboBox</blog:tag>
    </item>
    <item>
      <title>The Anatomy of a Test</title>
      <link>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/14/The-Anatomy-of-a-Test.aspx</link>
      <description>&lt;p&gt;
	Learning to write good tests can be hard. There are a lot of things to learn technologies to master and if you have been programming for some time then there are some bad habits to undo.&lt;/p&gt;
&lt;p&gt;
	I train a lot of people to do TDD and have learnt from this that there a few small tricks that will significantly help you write a good test.&lt;/p&gt;
&lt;p&gt;
	This blog assumes that you are familiar with the Red, Green Refactor process of test driven development and have some exposure to a unit testing framework such as NUnit.&lt;/p&gt;
&lt;p&gt;
	I also assume you are familiar with the concept that TDD is not a testing activity but is in fact a design and development activity.&lt;/p&gt;
&lt;p&gt;
	In this blog I go through the parts of what I consider to be a good test.&lt;/p&gt;
&lt;div class="tags"&gt;Tags: TDD,SoftwareDevelopment,DotNet,CSharp,Code Snippets,Resharper Tesmplates&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/6/Default.aspx&gt;Firestarter&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/7/Default.aspx&gt;Habanero&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/18/Default.aspx&gt;Unit Testing&lt;/a&gt;&lt;/div&gt;</description>
      <author />
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/6/Default.aspx">Firestarter</category>
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/7/Default.aspx">Habanero</category>
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/18/Default.aspx">Unit Testing</category>
      <comments>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/14/The-Anatomy-of-a-Test.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.habanerolabs.com/Blogs/tabid/229/EntryId/14/The-Anatomy-of-a-Test.aspx</guid>
      <pubDate>Thu, 04 Mar 2010 11:39:00 GMT</pubDate>
      <trackback:ping>http://www.habanerolabs.comDesktopModules/BlogTrackback.aspx?id=14</trackback:ping>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/10/Default.aspx">TDD</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/12/Default.aspx">SoftwareDevelopment</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/13/Default.aspx">DotNet</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/14/Default.aspx">CSharp</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/30/Default.aspx">Code Snippets</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/31/Default.aspx">Resharper Tesmplates</blog:tag>
    </item>
    <item>
      <title>RhinoMocks and Stub Return</title>
      <link>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/2/RhinoMocks-and-Stub-Return.aspx</link>
      <description>&lt;p&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	Changing the Return Value of a Stub in RhinoMocks.&lt;/p&gt;
&lt;div class="tags"&gt;Tags: RhinoMocks,Test Driven Development&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/3/Default.aspx&gt;C#&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/7/Default.aspx&gt;Habanero&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.habanerolabs.com/Blogs/tabid/229/CatID/18/Default.aspx&gt;Unit Testing&lt;/a&gt;&lt;/div&gt;</description>
      <author />
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/3/Default.aspx">C#</category>
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/7/Default.aspx">Habanero</category>
      <category domain="http://www.habanerolabs.com/Blogs/tabid/229/CatID/18/Default.aspx">Unit Testing</category>
      <comments>http://www.habanerolabs.com/Blogs/tabid/229/EntryId/2/RhinoMocks-and-Stub-Return.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://www.habanerolabs.com/Blogs/tabid/229/EntryId/2/RhinoMocks-and-Stub-Return.aspx</guid>
      <pubDate>Wed, 27 Jan 2010 13:43:00 GMT</pubDate>
      <trackback:ping>http://www.habanerolabs.comDesktopModules/BlogTrackback.aspx?id=2</trackback:ping>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/2/Default.aspx">RhinoMocks</blog:tag>
      <blog:tag blog:url="http://www.habanerolabs.com/Blogs/tabid/229/TagID/3/Default.aspx">Test Driven Development</blog:tag>
    </item>
  </channel>
</rss>