<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>IntoFactories.NET</title>
	<atom:link href="http://intofactories.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://intofactories.wordpress.com</link>
	<description>A deep dive into Microsoft software factory technologies and tools</description>
	<lastBuildDate>Sun, 11 Jan 2009 19:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='intofactories.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>IntoFactories.NET</title>
		<link>http://intofactories.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://intofactories.wordpress.com/osd.xml" title="IntoFactories.NET" />
	<atom:link rel='hub' href='http://intofactories.wordpress.com/?pushpress=hub'/>
		<item>
		<title>[GAT]: Differencing between bound and unbound recipes</title>
		<link>http://intofactories.wordpress.com/2008/06/25/gat-differencing-between-bound-and-unbound-recipes/</link>
		<comments>http://intofactories.wordpress.com/2008/06/25/gat-differencing-between-bound-and-unbound-recipes/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 18:59:08 +0000</pubDate>
		<dc:creator>Laila Bougria</dc:creator>
				<category><![CDATA[GAT]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=55</guid>
		<description><![CDATA[Do you have the new version of the Guidance Automation Toolkit and the Guidance Automation Extensions installed? Well, then it&#8217;s time we take off on a trip into the &#8220;zone&#8221; just like Thomas likes to say&#8230; In this case, we&#8217;re leaving to the &#8220;guidance-zone&#8221;! So what are the possibilities? What kind of guidance package do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=55&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you have the new version of the <a href="http://go.microsoft.com/fwlink/?LinkId=108988" target="_blank">Guidance Automation Toolkit</a> and the <a href="http://go.microsoft.com/fwlink/?LinkId=108982" target="_blank">Guidance Automation Extensions</a> installed? Well, then it&#8217;s time we take off on a trip into the <em>&#8220;zone&#8221;</em> just like Thomas likes to say&#8230; In this case, we&#8217;re leaving to the &#8220;guidance-zone&#8221;!</p>
<p>So what are the possibilities? What kind of guidance package do we want to develop? What audience will it target? What procedures will it automate? That&#8217;s a whole set of questions we have to answer before starting the development phase. But we have to do something else too&#8230; Before you can start off experimenting fully with the Guidance Automation Toolkit, there are some basic concepts that one should understand well so we can take full advantage of the capabilities of the toolkit.</p>
<p>One of the first concepts, a true GAPD (<strong>G</strong>uidance <strong>A</strong>utomation <strong>P</strong>ackage <strong>D</strong>eveloper) should master, is the diference between bound and unbound recipes. When do we use bound recipes, or when do we choose to implement unbound recipes? &#8230;<!-- more --></p>
<h3>Some basic things to know&#8230;</h3>
<p>The goal of a recipe, is <strong>automating</strong> a serie of actions, that are normally manually performed by a developer in each project. Using a recipe will ensure that these series of actions will be performed <em>correctly</em> and <em>consistently</em>. A recipe, can trigger a number of actions which have to be defined within the recipe. You can use an existing action (meaning one provided by the Recipe Framework) within the XML-file, or you can develop your own custom actions. The only key to defining your own  actions, is making them inherit the Microsoft.Practices.RecipeFramework.Action-class.<br />
More information and an example of developing actions, will follow later&#8230;</p>
<p>In most of the cases, a recipe needs a set of <strong>arguments</strong> to execute its actions. These arguments can be either required or optional. We can gather these arguments in two different ways: we let the user define the argument&#8217;s value using a wizard or we can use <strong>value providers</strong>, which are implementations of interfaces that can be used by the framework to gather arguments. The strength of value providers lies in the ability to intercept changes in other arguments, so you always obtain a value that&#8217;s completely up-to-date. Value providers implement the <a href="http://msdn2.microsoft.com/en-us/library/ms954621.aspx" target="_blank">Observer pattern </a>in this way. When an argument which is observed, changes it&#8217;s value, it notifies all the arguments that are observing it, so they can update their values.</p>
<h3>Getting to the different recipe types</h3>
<p>As we all have derived from the title by now, there are two kind of recipes within the Recipe Framework: bound and unbound recipes.</p>
<p>A bound recipe, is a recipe that is associated with a specified Visual Studio solution element. This can be a solution, a project, a class file&#8230; The recipe will only appear in the context menu on the item you have specified to bound it to (only on solution level for example).</p>
<p>A bound recipe can again be <strong>recurring</strong> or <strong>non-recurring</strong>.</p>
<p>Easily said: a recurring recipe is like a recipe to add a test class, it wil contain a basic test method from which to start, it wil contain the correct namespace references to get you started, and so on&#8230; You can add as many test classes as you want, meaning that that specific recipe, is recurring.</p>
<p>When using a non-recurring recipe, once the recipe is executed, you can&#8217;t choose to execute it again. A case scenario in which you would want to create a non-recurring recipe is when you want to create a static gateway. Imagine this static singleton class only serves to hold single instances of objects and provide it for usage in other classes using properties. We could develop a recipe that would create this class, for all objects you want to instantiate just once (you could let the user choose these classes in a wizard for example). You only want to create this static gateway once, so once the recipe is executed, it is never again available. It&#8217;s possible you would want to regenerate this static singleton class, adding more or less objects in the wizard, but let&#8217;s assume in this case, you would do this in a phase of your project where this decision can&#8217;t vary.</p>
<p>Bound recipes are bound to a <strong>bound recipe reference</strong>. A bound recipe reference is an object used by the Recipe Framework to associate a particular recipe with a particular launch point &#8211; or speaking in Visual Studio terms, a command. The reference enables the recipe to be executed, and stores it&#8217;s state (for example, has it been executed already?).</p>
<p>On the other hand, we have unbound recipes. Unbound recipes aren&#8217;t asociated with any item within Visual Studio. The recipe is not &#8220;placed&#8221; on solution-, project-, nor item-level. These kind of recipes work in a whole other way. Unbound recipes are associated with <strong>unbound recipe references</strong>, and these references, selects the solution items it&#8217;s associated with or used in.</p>
<p>As I just said, the unbound recipe reference chooses the solution items to appear on, but it does this according to a selection condition, a so called <strong>Target Condition</strong>. This condition is written in code, thus it is defined by us, the GAPD&#8217;s. It can be a simple condition and be satisfied by a very broad number of scenarios, or quite complex thus only satisfied in very specific cases. A TargetCondition is a piece of code returning a boolean value which specifies whether the condition was met or not.</p>
<p>Let&#8217;s discuss a concrete example. You&#8217;re developing a guidance package, which contains a number of folders inside the Domain-project that you have predefined for usage. Since you specify an &#8220;Exceptions&#8221; folder, you want all the custom Exceptions placed inside this folder, that&#8217;s obvious. You also developed a start for custom Exception classes, which you defined as &#8220;Exception class&#8221; (which is the same as a normal class, but already inherits the ApplicationException class and contains the correct namespace instead). You only want Exception classes within the specific Exceptions-folder, but how do we enforce it???<br />
Well, this is where the unbound recipes come to the rescue. You write a simple condition in code, which checks if the item on which the user clicked is a folder, and also checks it name&#8230;. If the recipe is satisfied, an extra command appears in the context menu of that folder: &#8220;Add new Custom Exception class&#8221;.</p>
<h3>How does VS deal with this?</h3>
<p>Actually I really wondered how this worked when I started with GAT. When we register a guidance package, one of the main things that happen, is that Visual Studio is told what commands we want to specify on each item in Visual Studio. In the Visual Studio world, this is not dynamic. The commands are loaded before the package, thus Visual Studio needs to know what &#8220;icons&#8221; it has to display on context-menu&#8217;s before anything. That&#8217;s why the registering process is so important (of course, this is not the only reason). The action behind the command, that&#8217;s where the guidance package comes to the scene. <a href="http://bloggingabout.net/blogs/olaf/" target="_blank">Olaf Conijn </a>explained this to us on the <a href="http://intofactories.net/2008/02/20/event-service-factory-modeling-edition/" target="_blank">VISUG-event </a>about Software Factories we had a while ago.</p>
<p>So, what about the unbound recipes? How could this be predefined? They actually seem quite dynamic since the commands to unbound recipes are only shown if the condition was satisfied… Well, every time a solution element is selected, Visual Studio queries the Recipe Framework and calls the TargetCondition of each unbound recipe in the package. If the condition returns true, the corresponding command is displayed in the context menu. In the last sentence, I want to emphasise <em>“displayed in the context menu”</em>. VS uses <strong>dynamic visibility </strong>for unbound recipes. When registering a package, the items on which the unbound recipes can be available, are in deed registered. But it’s when such an item in VS is <em>clicked</em>, that VS adjusts the visibility of commands according to the TargetCondition of the unbound recipes.</p>
<h3>Summary</h3>
<p>So, I think -and hope- you now understand the difference between bound and unbound recipes.</p>
<p>To summarize it in a sentence, a bound recipe is a recipe <em>attached to a particular item</em> in your project while unbound recipes aren&#8217;t attached to any item, but contain a <em>serie of conditions</em> which in combination <em>decide </em>whether you can or not execute the recipe in a certain scenario.</p>
<p>Stay tuned for more GAT-talks!<br />
Laila Bougria</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/55/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/55/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=55&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/06/25/gat-differencing-between-bound-and-unbound-recipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d19ffbe0001cde6bcfd992d70b93d8b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Laila Bougria</media:title>
		</media:content>
	</item>
		<item>
		<title>GAT/GAX &#8211; Creating a guidance package</title>
		<link>http://intofactories.wordpress.com/2008/06/14/gatgax-creating-a-guidance-package/</link>
		<comments>http://intofactories.wordpress.com/2008/06/14/gatgax-creating-a-guidance-package/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 12:21:46 +0000</pubDate>
		<dc:creator>Goeleven Yves</dc:creator>
				<category><![CDATA[GAT]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[GAT/GAX]]></category>
		<category><![CDATA[Guidance packages]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=63</guid>
		<description><![CDATA[In this post we will start of with our Domain Driven Design Software Factory, the first step is obviously creating the package itself. But before we commence, I need to give some credits to my former colleague Jelle Druyts as this post is blatant plagiarism of his blog post from back in the year 2006 &#8230; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=63&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post we will start of with our Domain Driven Design Software Factory, the first step is obviously creating the package itself. But before we commence, I need to give some credits to my former colleague Jelle Druyts as this post is blatant plagiarism of his <a href="http://jelle.druyts.net/2006/06/26/GAS02CreatingAGuidancePackage.aspx" target="_blank">blog post from back in the year 2006 </a>&#8230; but at least the pictures of this post are based on the 2008 edition of the Guidance Automation Toolkit.</p>
<p>To start of creating your own package, you can make use of a guidance package specifically designed for creating other guidance packages. That&#8217;s what I call eating your own dog food. So let&#8217;s generate the source for our package in a solution called Factory, which can be obtained in its current form from <a href="http://www.codeplex.com/IntoFactories">our codeplex team project</a>.</p>
<p><img src="http://intofactories.files.wordpress.com/2008/03/guidancepackagepackage.jpg?w=510" alt="guidancepackagepackage.jpg" /></p>
<p>The second part of this wizard allows you to set some package options like the package name, the namespace and some other information. Make sure not to include spaces in the package name as that will give issues later on.</p>
<p><img src="http://intofactories.files.wordpress.com/2008/03/guidancepackage-options.jpg?w=510" alt="guidancepackage-options.jpg" /></p>
<p><img src="http://intofactories.files.wordpress.com/2008/03/register-guidancepackage.jpg?w=510" alt="register-guidancepackage.jpg" hspace="10" vspace="10" align="right" />The wizard will create us a solution with sample code for most of the elements that you can find in a guidance package, like bound and unbound recipes, templates, snippets, wizard pages and more&#8230; Besides all the sample code, there is also an installer and a setup package generated so that you can immediatly start of testing the package.  But before we can do this we need to register the guidance package. This can be done by right clicking the guidance package project and selecting &#8220;Register Guidance Package&#8221;.</p>
<p>In order to test your guidance package, you need to open a new instance of visual studio and navigate to the Guidance Packages section of the New Project window. As you will notice, the Domain Driven Design Software Factory has been added as a guidance package.</p>
<p>Note that registering the guidance package does take some time as all elements need to be reconfigured inside the visual studio environment. If you don&#8217;t have any new recipes or templates that need to be registered or if you didn&#8217;t change any HostData sections that define the integration with Visual Studio, you can get away with the &#8220;Quick Register&#8221; option which is remarkably faster.</p>
<p>Now let&#8217;s open a new instance of Visual Studio and lets create a sample solution and fill out the wizard.</p>
<p><img src="http://intofactories.files.wordpress.com/2008/03/samplesolution.jpg?w=510" alt="samplesolution.jpg" /></p>
<p><img src="http://intofactories.files.wordpress.com/2008/03/samplesolutioncreated.jpg?w=510" alt="samplesolutioncreated.jpg" hspace="10" vspace="10" align="left" />And as a result of our guidance packages code generation, we end up with a solution that we can use to test the sample structure, templates, bound and unbound recipes.</p>
<p>I suggest you take a look around the generated solution if you&#8217;re not acquainted with the guidance automation packages, otherwise you can delete it again as it has obviously nothing to do with Domain Driven Design.</p>
<p>Next time we will start shaping our factory so that it will enforce the default Domain Driven Design layering, which has already been discussed in the <a href="http://intofactories.net/2008/02/14/setting-the-scene-layered-architecture/" target="_blank">Setting the scene column</a>.</p>
<p>See you next time,<br />
Yves Goeleven</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/63/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/63/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=63&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/06/14/gatgax-creating-a-guidance-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5110d4b4568fed47eb1ca845d4a538db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Goeleven Yves</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/guidancepackagepackage.jpg" medium="image">
			<media:title type="html">guidancepackagepackage.jpg</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/guidancepackage-options.jpg" medium="image">
			<media:title type="html">guidancepackage-options.jpg</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/register-guidancepackage.jpg" medium="image">
			<media:title type="html">register-guidancepackage.jpg</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/samplesolution.jpg" medium="image">
			<media:title type="html">samplesolution.jpg</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/samplesolutioncreated.jpg" medium="image">
			<media:title type="html">samplesolutioncreated.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting the scene &#8211; When identity matters</title>
		<link>http://intofactories.wordpress.com/2008/06/01/setting-the-scene-when-identity-matters/</link>
		<comments>http://intofactories.wordpress.com/2008/06/01/setting-the-scene-when-identity-matters/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 13:18:55 +0000</pubDate>
		<dc:creator>Goeleven Yves</dc:creator>
				<category><![CDATA[Domain-Driven Design]]></category>
		<category><![CDATA[Entities]]></category>

		<guid isPermaLink="false">http://intofactories.net/?p=61</guid>
		<description><![CDATA[Typically the objects in a domain model can be categorized into 2 types: entities and value objects. Both of these can be implemented as regular CLS objects with properties and methods, they represent domain concepts and provide methods that manipulate the internal state. So what&#8217;s the difference then? Well, some objects require specific identity management, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=61&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Typically the objects in a domain model can be categorized into 2 types: entities and value objects. Both of these can be implemented as regular CLS objects with properties and methods, they represent domain concepts and provide methods that manipulate the internal state. So what&#8217;s the difference then? Well, some objects require specific identity management, where a mistake in identity can lead to data corruption. Can you imagine assigning a million dollar contract to the wrong business partner? Obviously a BusinessPartner requires carefull identity management to prevent catastrophic errors in the system. These kinds of objects are called entities.</p>
<p>Remember that objects, when they are in memory, are identified by their memory address and not some property that acts as an identifier like this is the case in a relational database. The underlying infrastructure must ensure that the two are mapped to one another, which is often done using the <a href="http://www.martinfowler.com/eaaCatalog/identityMap.html" target="_blank">identity map</a> design pattern. Implementing such an infrastructure can be a pretty daunting task, but if you are interested, I have created <a href="http://www.goeleven.com/blog/entryDetail.aspx?entry=89" target="_blank">an entire series of blog posts</a> last year which covers most of the difficulties that you will encounter. Or, you could use an Object Relational Mapper instead.</p>
<p>On the other hand, a domain model contains a lot of Value Objects as well, which will be covered in the next post.</p>
<p>Stay tuned,<br />
Yves</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/61/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/61/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=61&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/06/01/setting-the-scene-when-identity-matters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5110d4b4568fed47eb1ca845d4a538db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Goeleven Yves</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting the scene &#8211; Divide and conquer</title>
		<link>http://intofactories.wordpress.com/2008/03/17/setting-the-scene-divide-and-conquer/</link>
		<comments>http://intofactories.wordpress.com/2008/03/17/setting-the-scene-divide-and-conquer/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 17:52:41 +0000</pubDate>
		<dc:creator>Goeleven Yves</dc:creator>
				<category><![CDATA[Domain-Driven Design]]></category>
		<category><![CDATA[Modules]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=56</guid>
		<description><![CDATA[Last time we discussed the concept of model driven design, and introduced a miniature domain model representing a Business Partner. Yet in real world applications, domain models aren&#8217;t that simple, in fact they tend to become pretty unwieldy if not extremely large. As the business domain that we are trying to capture is rather complex, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=56&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://intofactories.net/2008/03/04/setting-the-scene-model-driven-design/" title="Model Driven Design">Last time</a> we discussed the concept of model driven design, and introduced a miniature domain model representing a Business Partner. Yet in real world applications, domain models aren&#8217;t that simple, in fact they tend to become pretty unwieldy if not extremely large. As the business domain that we are trying to capture is rather complex, it seems logical that the domain model is complex as well. Still, the practice of Domain Driven Design is trying to tackle the complexity at the heart of the matter. To prevent from having dependencies all over the place, it&#8217;s recommended to divide your domain model into distinct parts with little or no coupling between the parts, these parts are called modules. Modules should be named after business terms, in fact if the name of the module isn&#8217;t part of the Ubiquitous Language, you probably started of on the wrong foot. Even though modules are designed to reduce coupling between business concepts, dependencies are allowed, but only in one direction. It&#8217;s perfectly normal that one part of your business domain depends on another part of the same domain.</p>
<p>I like to represent modules with folders containing classes in the domain. In the future though I hope we can have a nice DSL that displays the domain layer with all modules as simple shapes in a domain diagram, implemented behind the scenes as folders, and that allows to drill down to the components that are contained in the module. The different types of components that can exist in a module will be discussed in upcoming articles, for now we will continue with a real life example of how to determine modules.</p>
<p><img vspace="10" align="right" width="270" src="http://intofactories.files.wordpress.com/2008/03/gasflowmanagement.jpg?w=270&#038;h=157" hspace="10" alt="gasflowmanagement.jpg" height="157" /> To determine modules one should simply look at the business domain. Currently I&#8217;m working on a contracting application for the belgian gas flow manager, so the domain is definitly contracting. Now if you think about contracts, you probably think about different Business Partners signing Agreements right? Business partners can take up different roles depending on the agreement that is signed, they could be shippers, traders, gas flow managers etc. Furthermore agreements can come in many forms: first of all there is the master agreement that says that we&#8217;re going to do business together, next we have technical agreements that limit for example the pressure of gas that is exchanged or the rules that apply for allocation of capacity to the buyer and there are many more of these kinds of agreements. But just signing a paper isn&#8217;t going to cut it! If you want to, for example, store gas, you have to make sure whether it is possible or we may blow up that nice little storage tank. So you have to ask whether you can get a certain Service at a given point or period in time, services could for example consist of rights to store gas, or to inject it, to trade it, etc&#8230;</p>
<p>Now if you look at the description above of a typical contracting domain for the gas flow market, one can identify a few big groups of business logic in there. These big groups, like in this example Business Partners, Agreements and Services, are what modules are all about. Note that there is a direct dependency from Services to Agreements to Business Partners, but not the other way around.</p>
<p>To wrap up, if your domain is rather complex ( and which one isn&#8217;t? ), split it up in different parts based on the knowledge that you have of the particular domain, but be sure to let the domain be your guide.</p>
<p>Next time we will start to go through the different components that can be found inside a module.</p>
<p>Stay tuned,<br />
Yves Goeleven</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/56/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/56/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=56&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/03/17/setting-the-scene-divide-and-conquer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5110d4b4568fed47eb1ca845d4a538db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Goeleven Yves</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/gasflowmanagement.jpg" medium="image">
			<media:title type="html">gasflowmanagement.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating and using Visual Studio templates</title>
		<link>http://intofactories.wordpress.com/2008/03/11/creating-and-using-visual-studio-templates/</link>
		<comments>http://intofactories.wordpress.com/2008/03/11/creating-and-using-visual-studio-templates/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 07:28:29 +0000</pubDate>
		<dc:creator>Laila Bougria</dc:creator>
				<category><![CDATA[GAT]]></category>
		<category><![CDATA[Visual Studio Team System]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[visual studio templates]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=80</guid>
		<description><![CDATA[We all use Visual Studio templates, day by day, even if not all of us know that they are actually called Visual Studio templates…. Just create a new project, and you’ll get to see a whole series of available Visual Studio templates that were installed along with VS itself… A C# console application project, a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=80&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span>We all use Visual Studio templates, day by day, even if not all of us know that they are actually called Visual Studio templates…. Just create a new project, and you’ll get to see a whole series of available Visual Studio templates that were installed along with VS itself… A C# console application project, a C# windows forms project, …, they are all Visual Studio templates…<br />
</span></p>
<p><span><a href="http://intofactories.files.wordpress.com/2008/03/new-project-small.png" title="New project dialog"><img src="http://intofactories.files.wordpress.com/2008/03/new-project-small.png?w=1&#038;h=1" alt="New project dialog" align="absmiddle" border="0" height="1" width="1" /><img src="http://intofactories.files.wordpress.com/2008/03/new-project-small.png?w=510" alt="New project dialog" /></a></span></p>
<p><span>In this post I’ll simply line out the way to create them, and how you can use them. You’ll be using this approach many times once you get going with Guidance Automation, since they are one of the key parts to defining the solutions and projects you want your package to unfold. This talk was inspired by GAT, but of course, you can use this knowledge for a lot of other scenario’s… <span id="more-80"></span></span></p>
<h3>Why use Visual Studio templates?</h3>
<p><span>Why would you use Visual Studio templates? Well, as I said, they are a key part to using Guidance Automation, but then again, what is Guidance Automation about? It’s about automating everyday tasks, it’s about <b><i>reusability</i></b>. Well, with templates, you can reuse structures, classes, and some concepts you already applied in previous projects. A template contains a lot of information and can create basic projects (such as a C# library containing some default folders you use) or more specialized projects (such as a C# domain layer that already implements some basics to using Domain-Driven-Design in your project)… </span></p>
<h3>Let’s take off</h3>
<p><span>Just imagine you have this great project, and you would like to get a template that contains all the stuff you have in this project… How do you get started? Well, it’s pretty simple, with some clicks Visual Studio does the job for you… Just open your project, click the menu “File”, “Export Template” and a new wizard appears.</span></p>
<p><span><a href="http://intofactories.files.wordpress.com/2008/03/export-template.png" title="Export template menu"><img src="http://intofactories.files.wordpress.com/2008/03/export-template.png?w=510" alt="Export template menu" /></a></span></p>
<p><span>You can then choose to create a project template or an item template. What’s the difference? Usage is&#8230;</span></p>
<p><span>When you create a project template, you will be able to use it from the “New Project” dialog once it is installed and all new projects based on this template will contain the features of your base-project. When you’re creating an item template, it will be available in the “Add new item” dialog, which appears when &#8211; for example – you right-click on a solution item.</span></p>
<p><span>You can give project templates a rightfully chosen name (remember that this name will be used in the “New project” dialog, so I suggest you make it <b>meaningful yet simple</b>), a custom icon and even a description that contains more information for the users. The same story for item templates: give them a sensible name, and if you want to, choose a custom icon to differentiate them rapidly. </span></p>
<p><span>For item templates, there’s more to choose. Once you have chosen the class you want to create a template of, VS will list all the namespace references this class has and ask you the ones you want to include in the template.</span></p>
<p><span><a href="http://intofactories.files.wordpress.com/2008/03/export-wizard.png" title="Export template reference selection"><img src="http://intofactories.files.wordpress.com/2008/03/export-wizard.png?w=510" alt="Export template reference selection" /></a></span></p>
<p><span>If the item template already contains some code, this is very necessary to have a buildable item in the first place.You’ll be thinking, this is easy, I could have figured that out myself… Well, it is! You just have to know it exists…</span></p>
<p><span>But now, let’s take it all a step further, let’s see what Visual Studio has generated for us…</span></p>
<p><span></span></p>
<h3>The template file</h3>
<p><span>Open a windows explorer and navigate to the path you save the template in. You’ll see that VS created a zip-file with the name you provided as template-name. When extracted, you’ll notice there’s a bunch of files in there… Let’s have a look.</span></p>
<p><span><a href="http://intofactories.files.wordpress.com/2008/03/explorer-klein.png" title="Exported files"></a></span></p>
<div style="text-align:center;"><a href="http://intofactories.files.wordpress.com/2008/03/explorer-klein.png" title="Exported files"><img src="http://intofactories.files.wordpress.com/2008/03/explorer-klein.png?w=510" alt="Exported files" /></a></div>
<p>The most important file you want to have a look at, is “<b>MyTemplate.vstemplate</b>”. This is the actual template and contains the structure of the project. When you open it, you’ll see this is nothing but an XML-file, which can be divided in two major parts, the <i>TemplateData</i> and the <i>TemplateContent</i>.</p>
<p><span>The TemplateData-node contains a number of general properties for the template, such as it’s name, whether the template should create a new folder for the project, a default name, and so on… You can adjust every single one of these properties to your own preference. </span></p>
<p><pre class="brush: xml;">&lt;TemplateData&gt;
 &lt;Name&gt;Domain&lt;/Name&gt;
 &lt;Description&gt;Project for the Domain-layer of an application (DDD)&lt;/Description&gt;
 &lt;ProjectType&gt;CSharp&lt;/ProjectType&gt;
 ...
&lt;/TemplateData&gt;</pre><br />
<span>The other part, the information included in the TemplateContent-node, defines what the project consists of. First of all, it will reference a csproj-file, which the template uses to generate the project. </span><br />
<pre class="brush: xml;">&lt;TemplateContent&gt;
 &lt;Project TargetFileName=&quot;Goeleven.Web.RssAggregation.Domain.csproj&quot; File=&quot;Goeleven.Web.RssAggregation.Domain.csproj&quot; ReplaceParameters=&quot;true&quot;&gt;
  &lt;ProjectItem ReplaceParameters=&quot;true&quot; TargetFileName=&quot;Model.cd&quot;&gt;Model.cd&lt;/ProjectItem&gt;
  &lt;Folder Name=&quot;RssAggregate&quot; TargetFolderName=&quot;RssAggregate&quot;&gt;
   &lt;Folder Name=&quot;Exceptions&quot; TargetFolderName=&quot;Exceptions&quot;&gt;
    &lt;ProjectItem ReplaceParameters=&quot;true&quot; TargetFileName=&quot;InvalidAggregateException.cs&quot;&gt;InvalidAggregateException.cs&lt;/ProjectItem&gt;
    &lt;ProjectItem ReplaceParameters=&quot;true&quot; TargetFileName=&quot;InvalidFeedException.cs&quot;&gt;InvalidFeedException.cs&lt;/ProjectItem&gt;
   &lt;/Folder&gt;
  &lt;ProjectItem ReplaceParameters=&quot;true&quot; TargetFileName=&quot;RssFeedRepository.cs&quot;&gt;RssFeedRepository.cs&lt;/ProjectItem&gt;
  ...
  &lt;/Folder&gt;
 &lt;/Project&gt;
&lt;/TemplateContent&gt;</pre><br />
<span>You’ll notice an interesting parameter in the reference to the project-file, namely “<b>ReplaceParameters</b>”. What’s this for? Well, in the csproj-file, you can define some values that you will want to replace when the project is created, for example a namespace. Setting this property to true, will actually make the replacement occur. </span><span>Within the Project-tag, you can only define two type of childnodes: <i>ProjectItem</i>-nodes and <i>Folder</i>-nodes. A ProjectItem-node can be used to add items to your projects. These items can be classes, documents, class diagrams, … and so on. A Folder-node will define a folder with the specified name, and inside each Folder-node, you can again add as many ProjectItem- and/or Folder-nodes as you want. </span></p>
<h3>The project file</h3>
<p><span>A csproj-file also contains of two key-nodes: <i>PropertyGroup</i>-nodes and <i>ItemGroup</i>-nodes. </span></p>
<p><span>PropertyGroup-nodes will typically contain general information such as the output type, default namespace, the target framework, whether to treat warnings as errors (which I suggest to always set to true!), … You’ll recognize all this information when you look at the project properties of some existing projects you have. </span></p>
<p><span>The ItemGroup-nodes, can contain another group of nodes. In here, you want to define the references the project must have by default, and the files you want to include in it. For each file, you can again specify it’s properties (compile, content, … ?).</span></p>
<p><pre class="brush: xml;">&lt;ItemGroup&gt;
&lt;Reference Include=&quot;Goeleven.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a1fc815d91c11418, processorArchitecture=MSIL&quot;&gt;
  &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
  &lt;HintPath&gt;..\..\..\..\Dependencies\Goeleven.Framework.dll&lt;/HintPath&gt;
&lt;/Reference&gt;
...
&lt;Reference Include=&quot;System&quot; /&gt;
&lt;Reference Include=&quot;System.Data&quot; /&gt;
&lt;Reference Include=&quot;System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL&quot; /&gt;
...
&lt;/ItemGroup&gt;</pre><br />
<span>Now let’s get back to the “<b>ReplaceParameters</b>”-property I mentioned earlier… It’s in your project files and code files, that you will run into these parameters. You can simply recognize a parameter by the following format: <b>$parameterName$</b>. The dollar signs are just an indication that it’s a parameter, and that it will have to be replaced when used, the name you give it, will have to correspond with some value used later to fill it.</span><span> The most common example is parameter <i>$safeprojectname$</i>. This one is used by Visual Studio itself in most of the templates. The “safeprojectname”-parameter will contain a name that won’t contain special characters and thus be safe. </span><span>Another one, which is very important when using templates, is <i>$guid1$</i>. In the PropertyGroup-node, you’ll notice a property called “ProjectGuid”. This has to contain a unique Guid per project, but since it’s a template, we have to generate a new Guid per project. Well, we can just use “guid1”, “guid2”, “guid3”, until we have all the necessary Guid’s. VS will generate a new Guid for each new parameter and fill it in with the correct value. </span><br />
<pre class="brush: xml;">&lt;PropertyGroup&gt;
&lt;Configuration Condition=&quot; '$(Configuration)' == '' &quot;&gt;Debug&lt;/Configuration&gt;
&lt;Platform Condition=&quot; '$(Platform)' == '' &quot;&gt;AnyCPU&lt;/Platform&gt;
...
&lt;ProjectGuid&gt;$guid1$&lt;/ProjectGuid&gt;
&lt;ProjectTypeGuids&gt;{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;/ProjectTypeGuids&gt;
&lt;OutputType&gt;Library&lt;/OutputType&gt;
...
&lt;/PropertyGroup&gt;</pre><br />
<span><b><u>Note</u></b>: You don’t want to adjust the ProjectTypeGuids-node, since these have to point to existing Guid’s. These point to a specific project type (which is again another template) on which this project is based, for example, a C# library. </span><span>A feature that I also find very nice, is that you can define a PropertyGroup-node for each configuration you use in your project and thus adjust some properties according to the scenario. If you think it’s extreme to set the “TreatWarningsAsErrors” to true in a Debug-environment (which I don’t, but opinions differ <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), well, then you can activate it for Release-environments only.</span><br />
<pre class="brush: xml;">&lt;PropertyGroup Condition=&quot; '$(Configuration)|$(Platform)' == 'Release|AnyCPU' &quot;&gt;
...
&lt;TreatWarningsAsErrors&gt;True&lt;/TreatWarningsAsErrors&gt;
&lt;/PropertyGroup&gt;</pre><br />
<span>Well, I think I&#8217;ve covered the most important parts of Visual Studio templates and how to manage them. I hope you see the advantages of working with them.<br />
Stay tuned!</span></p>
<p><span></span><span></span><span>Regards,<br />
Laila Bougria</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/80/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/80/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=80&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/03/11/creating-and-using-visual-studio-templates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d19ffbe0001cde6bcfd992d70b93d8b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Laila Bougria</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/new-project-small.png" medium="image">
			<media:title type="html">New project dialog</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/new-project-small.png" medium="image">
			<media:title type="html">New project dialog</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/export-template.png" medium="image">
			<media:title type="html">Export template menu</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/export-wizard.png" medium="image">
			<media:title type="html">Export template reference selection</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/03/explorer-klein.png" medium="image">
			<media:title type="html">Exported files</media:title>
		</media:content>
	</item>
		<item>
		<title>Event &#8211; TechDays 2008</title>
		<link>http://intofactories.wordpress.com/2008/03/10/event-techdays-2008/</link>
		<comments>http://intofactories.wordpress.com/2008/03/10/event-techdays-2008/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 12:08:54 +0000</pubDate>
		<dc:creator>Stijn Guillemyn</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[event]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=87</guid>
		<description><![CDATA[Tomorrow (March 11th) Microsoft&#8217;s launch wave finally reaches Belgium! 3 new products (SQL Server, Windows Server and Visual Studio 2008) will be presented to the Belgian .NET community in Ghent. The next 2 days (March 12th &#38; 13th) will be filled with technical sessions at this year&#8217;s TechDays. HEROES happen {here} 2 days packed with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=87&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tomorrow (March 11th) Microsoft&#8217;s launch wave finally reaches Belgium!<br />
3 new products (SQL Server, Windows Server and Visual Studio 2008) will be presented to the Belgian .NET community in Ghent.<br />
The next 2 days (March 12th &amp; 13th) will be filled with technical sessions at this year&#8217;s <a href="http://www.heroeshappenhere.be" target="_blank" title="TechDays 2008">TechDays</a>.</p>
<h3>HEROES happen {here}</h3>
<p><a href="http://www.heroeshappenhere.be" title="TechDays 2008" target="_blank"><img src="http://www.microsoft.com/belux/heroeshappenhere/img/toolbox/signature_heroes_1.gif" alt="HEROES happen {here}" height="120" width="365" /></a></p>
<p>2 days packed with technical content, that&#8217;s what <a href="http://www.heroeshappenhere.be" target="_blank" title="TechDays 2008">TechDays</a> is for you. A full house of developers will have the opportunity to choose between 3 developer-oriented tracks and the architecture track. The agenda even provides some Software Factory related sessions! Some sessions that might interest you as a reader of this blog:</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>Title</th>
<th>Speaker</th>
</tr>
<tr>
<td>Domain Specific Development with Visual Studio Domain Specific Language (DSL) Tools</td>
<td>Jelle Druyts</td>
</tr>
<tr>
<td>VSTS Application Lifecycle management</td>
<td>Yves Goeleven</td>
</tr>
<tr>
<td>Application Lifecycle Management and Visual Studio Team System</td>
<td>Steven Wilssens</td>
</tr>
</table>
<h3>Community</h3>
<p>As always, TechDays also provides a good medium to connect with your peers. Most Belgian user groups are present, as will quite some members of IntoFactories.NET! Be sure to meet us at the Compuware booth!</p>
<p>Just like last year, <a href="http://www.visug.be" target="_blank" title="Visug">Visug</a> is organizing its Visug Geek Bowling as an evening activity.<br />
On the evening of March 12th, they&#8217;ll gather at the <a href="http://www.bowlingpaleis.be/lochristi.htm" title="Bowling palace Lochristi" target="_blank">Bowling Palace</a> in Lochristi around 20h!</p>
<p>Be there!<br />
Stijn.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/87/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/87/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=87&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/03/10/event-techdays-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6f7e85e4eed9ace7500cf56c37994436?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stijnguillemyn</media:title>
		</media:content>

		<media:content url="http://www.microsoft.com/belux/heroeshappenhere/img/toolbox/signature_heroes_1.gif" medium="image">
			<media:title type="html">HEROES happen {here}</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting the scene &#8211; Model Driven Design</title>
		<link>http://intofactories.wordpress.com/2008/03/04/setting-the-scene-model-driven-design/</link>
		<comments>http://intofactories.wordpress.com/2008/03/04/setting-the-scene-model-driven-design/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 20:02:34 +0000</pubDate>
		<dc:creator>Goeleven Yves</dc:creator>
				<category><![CDATA[Domain-Driven Design]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[Model Driven Design]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=20</guid>
		<description><![CDATA[Last time we spent some time separating the domain layer from the rest of the application using a Layered Architecture. This time we will take our first steps into the design of the most important layer: the domain layer. The goal of the domain layer is to capture all the business logic that applies to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=20&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last time we spent some time separating the domain layer from the rest of the application using a Layered Architecture. This time we will take our first steps into the design of the most important layer: the domain layer.</p>
<p>The goal of the domain layer is to capture all the business logic that applies to the domain that we are writing software for, hence its important that the source code for the domain layer reflects the true domain as much as possible.  Why? Well, this way you can use the source code as a means of communication with all members of the team and with the eventual consumers of the application, in fact all concepts that will be discussed in the upcoming chapters should be part of this common language, called the &#8216;Ubiquitous Language&#8217;.</p>
<p>Code an sich does not lend itself very well for communication does it? It contains a lot of chatter, like point comma&#8217;s, curly braces etc&#8230; just for the sake of getting it compiled. A better way to communicate the code is using a model, a graphical domain specific representation of the code. This is where DSL&#8217;s or Domain Specific Languages come in, they can provide a graphical representation of code which is specifically tailored for the problem domain and as such DSL&#8217;s can bridge the gap between the code and the Ubiquitous Language. An excellent example of a DSL can be found in the Visual Studio Class designer, which is nothing more than a nice DSL on top of code that represents classes.</p>
<p><img border="0" vspace="10" align="textTop" width="403" src="http://www.goeleven.com/resources/architecture/DDD/Aggregate.jpg" hspace="10" alt="Example DSL" height="150" /></p>
<p>A DSL is a great way to present the concepts in a given problem domain, like the concept of a class or a workflow, as long as the concept you want to show is expressable as a graphic. But many enterprise models are just to difficult or to wieldy to capture at one glance, which is one of the biggest problems for a graphical DSL.</p>
<p>Next time we will look into the options we have to separate the different parts of a large model into distinct parts.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=20&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/03/04/setting-the-scene-model-driven-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5110d4b4568fed47eb1ca845d4a538db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Goeleven Yves</media:title>
		</media:content>

		<media:content url="http://www.goeleven.com/resources/architecture/DDD/Aggregate.jpg" medium="image">
			<media:title type="html">Example DSL</media:title>
		</media:content>
	</item>
		<item>
		<title>The role of Team System in a Software Factory</title>
		<link>http://intofactories.wordpress.com/2008/02/29/the-role-of-team-system-in-a-software-factory/</link>
		<comments>http://intofactories.wordpress.com/2008/02/29/the-role-of-team-system-in-a-software-factory/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 19:29:42 +0000</pubDate>
		<dc:creator>Goeleven Yves</dc:creator>
				<category><![CDATA[DSL Tools]]></category>
		<category><![CDATA[GAT]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Visual Studio Team System]]></category>
		<category><![CDATA[dsl]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=49</guid>
		<description><![CDATA[I’m no thought leader on the future of IT, but I do have a vision of how software development will evolve in the next couple (or hundreds) of years and Team system plays a big part in it. But before we dive into this vision, let’s have a look at what the development world looks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=49&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin:0 0 10pt;" class="MsoNormal"><span><font face="Calibri"></font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span><font face="Calibri">I’m no thought leader on the future of IT, but I do have a vision of how software development will evolve in the next couple (or hundreds) of years and Team system plays a big part in it. But before we dive into this vision, let’s have a look at what the development world looks like today.<span id="more-49"></span></font></span></p>
<h3 class="MsoNormal"><span></span><span>What does software development look like today?</span></h3>
<p style="margin:0 0 10pt;" class="MsoNormal"><b><span></span></b><span><font face="Calibri">Today, software development is a craftsmanship, a lot like conventional industry was 400 years ago. Most software development teams are made up of a small amount of specialist developers, of which only a few actually master most of the available technologies or as Bart calls them in his article ‘<a target="_blank" href="http://intofactories.net/2008/02/22/software-factories-the-developer-gap/" title="The developer gap">The developer gap</a>’, expert and regular developers.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">In some cases these teams are </font><a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/04/16/Self-Organizing-Teams-are-Superior-to-Command-n_2700_-Control-Teams.aspx"><font color="#800080" face="Calibri">self organizing</font></a><font face="Calibri">, which means that they have managed to gather the right mix of developers, each talented in their own way, so that they can make all the necessary decisions for themselves. If you are in such a team, great, but reality tells me…</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">That there are just not enough good developers on the market to be sure that you can compose a self organizing team in the limited time you have to set up the project. Often you just have to work with less talented people, or people whose talents don’t match with the needs of the project.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span><font face="Calibri">And if you do manage to find the expert developers, you will only find a few and they will be pretty expensive. Both of these factors make that the software, which is supposed to add value to the business, will take several months to develop and will cost a lot of money. By the time the software is released, the market will already look differently and a lot of the effort goes to waste.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">Don’t get me wrong, I like the idea of the self organizing team, and I would love to have a few thousands of colleagues that have as much expertise as the few dozen I currently have, but that’s just not how our market works. And trust me, after being in the Compuware recruiting team for a few years now, there are not many good developers available on the market.</font></span></p>
<h3 class="MsoNormal"><span></span><span>Where should the industry go to?</span></h3>
<p style="margin:0 0 10pt;" class="MsoNormal"><b><span></span></b><span><font face="Calibri">In my opinion, the total cost of software development and the lack of talent on the market will force us to hire low cost, less skilled workers to complete our projects. We still have to go through the same revolution as happened with conventional industry in the 1800’s, we need to improve the current processes of software development and automate them into factories.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">The biggest difference between IT and conventional industry, however, is that we are not developing the same parts all over again, which makes standardization a lot harder. Each project has different business needs and is started to solve a different problem, it will be very difficult to design a ‘Customer’ class that will fulfill the needs of a local grocery shop or that of your countries biggest transport company.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">I don’t believe we can make some ‘Robot’ that will generate all the code of an application for us; instead I believe we should organize our software factory around a development process for which some tasks are fully automated, a few are done by expert developers and most of the labor is done by less skilled people, who don’t necessarily have to have skills in software development.</font></span></p>
<h3 class="MsoNormal"><span></span><span>What needs to happen before we can achieve this?</span></h3>
<p style="margin:0 0 10pt;" class="MsoNormal"><b><span></span></b><span><font face="Calibri">As the state of software development is today, I don’t believe this revolution is at hand in a very short time. A lot needs to be changed before we can even think about large scale automation:</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">First of all, we need to find the <b>default software architecture</b>. If we want to automate the development of most types of software, we need to figure out what the default architecture is for each kind of application and define the common denominator.<span> </span>Today most teams start all over again for each software project they attempt, but to be productive they should start off with the default architecture and only make minor changes to it if a special feature is required. I believe this is probably the hardest task we are facing; I do have a <span></span>default architecture for services, one for smart clients and one for web applications, but to achieve this goal all kinds of applications should be architected the same way preferably. Multiple defaults are possible as well, but that would make reuse of the assets much harder.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">Secondly, <b>all</b> <b>software components should be</b> <b>standardized</b>. This means they all should conform to a certain design, a fixed interface. In transport, all containers fulfill to a number of standard sizes, no matter what can be transported with the container, no matter how it’s going to be transported. This way the containers are interchangeable allowing trucks, trains and boats to be designed without knowing what they are going to be used for. Once the interfaces of all software components are stabilized, general infrastructure code can be provided to allow faster and easier development.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">Finally, <b>each detail</b> of the software development process, or better, the entire application lifecycle, <b>should be studied and documented in detail</b>. When a car manufacturer starts his assembly line, he will know exactly what parts are used at which points of the line, he knows how many milliseconds it will take to put a screw into the chassis, each part of the assembly line is controlled and monitored with great detail. When all details are documented, they can be assigned on an individual basis to non developers as well, in my opinion. With the correct documentation I do believe that a non developer can perform a code review targeting coding guidelines for example.</font></span></p>
<h3 class="MsoNormal"><span></span><span>What technologies are required?</span></h3>
<p style="margin:0 0 10pt;" class="MsoNormal"><b><span></span></b><span><font face="Calibri">In order to automate some of the tasks, we can resort to code generation. However I’m not a big believer of code generation as each piece of code to be generated has its own specific needs. What I do believe in though is discrete code generation in the form of <b>snippets</b> and <b>GAT recipes </b>that can be used by less skilled developers to perform a specific task like creating a data access component for example.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">If we would like to use non developers to actually create parts of the application, we need to provide them with a <b>DSL</b> so that they can configure the component with terms they know and have the code generated when they are finished.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">But a software factory is more than just snippets, recipes and DSL’s. Each of these technologies is like a robot in a factory that can perform a small specific task. All of these robots should be combined with people (both expert developers as unskilled ones), to form an assembly line. The role of the assembly line can in my opinion be played by <b>Team Foundation Server, </b>and more specifically the process template and continuous integration features.</font></span></p>
<h3 class="MsoNormal"><span></span><span>Team Foundation Server</span></h3>
<p style="margin:0 0 10pt;" class="MsoNormal"><b><span></span></b><span><font face="Calibri">Besides all the necessary tools that TFS provides us, like work item tracking, version control and a build server, it has one big advantage over different products: The process template. The process template gives us the means to set up the configuration of an assembly line.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">We can create custom work items that can be interpreted by humans to perform a task, but using the work item object model, software components can interpret them as well and could automate some of the jobs. Obviously a standardized and well controlled process is crucial to achieve this.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">Work items can be linked to code, in order to keep track of the time it took to complete the work, so that we can monitor how the assembly line is doing. Check-in policies allow us to enforce the linkage so that human interactions can be tracked as well.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">Team build and more specifically MS Build allows us to perform automated compilation, testing, code metrics collection and automated deployment without knowledge of the developer checking in his code. With the TFS 2008 features and the </font><a href="http://www.codeplex.com/sdctasks"><font color="#800080" face="Calibri">SDC library</font></a><font face="Calibri">, this task becomes even trivial.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">All collected information is gathered in a data ware house so that the management team has a clear view of performance and quality at any moment through advanced reports.</font></span></p>
<h3 class="MsoNormal"><span></span><span>My plans in the near future</span></h3>
<p style="margin:0 0 10pt;" class="MsoNormal"><b><span></span></b><span><font face="Calibri">I hope I have convinced you that TFS, or one of its successors, will be the key to the future software factory that I have in mind. In the near future I hope to write a series of articles on several parts of TFS and how you can use it to automate some of the tasks that need to be performed during the development of an application.</font></span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><span></span><span><font face="Calibri">I will double post the articles that are directly related to software factories on both </font><a href="http://www.goeleven.com/professional/"><font color="#800080" face="Calibri">my own blog</font></a><font face="Calibri"> and </font><a href="http://www.intofactories.net/"><font color="#800080" face="Calibri">the intofactories blog</font></a><font face="Calibri">. Articles that cover only technical details of TFS like the build API or process customization will only be posted on my own blog so that IntoFactories stays focused on software factories only.</font></span></p>
<p><span></span><span><font face="Calibri">Stay tuned,<br />
</font></span><span><font face="Calibri">Yves Goeleven</font></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/49/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/49/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=49&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/02/29/the-role-of-team-system-in-a-software-factory/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5110d4b4568fed47eb1ca845d4a538db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Goeleven Yves</media:title>
		</media:content>
	</item>
		<item>
		<title>IoC Dsl &#8211; Unity Framework</title>
		<link>http://intofactories.wordpress.com/2008/02/26/ioc-dsl-unity-framework/</link>
		<comments>http://intofactories.wordpress.com/2008/02/26/ioc-dsl-unity-framework/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 20:41:45 +0000</pubDate>
		<dc:creator>tannerel</dc:creator>
				<category><![CDATA[DSL Tools]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[entlib]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=54</guid>
		<description><![CDATA[As I promised in part 1 I will give you an intro of the available frameworks that support Ioc. First in the row is the Unity Framework. This framework will be part of Enterprise Library 4.0. They just released a first CTP (can be found on CodePlex). I’m quite enthusiastic about this framework and like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=54&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I promised in part 1 I will give you an intro of the available frameworks that support Ioc. First in the row is the Unity Framework. This framework will be part of Enterprise Library 4.0. They just released a first CTP (can be found on <a target="_blank" href="http://www.codeplex.com/unity" title="Unity project @ Codeplex">CodePlex</a>). I’m quite enthusiastic about this framework and like Mr Borat would say “Is naaizzz”. <span id="more-54"></span></p>
<p>The building block where Unity is built on, exists since the first version of Enterprise Library and is called ObjectBuilder. ObjectBuilder was one of the first Dependency Injection frameworks available for .Net, but it has lived a silent life since then. I think this was caused by the complex interface of the API and the lack of documentation.</p>
<p>Ok, enough bla bla! Let’s take a look at the Unity framework:</p>
<p>I made a small class that will do a HelloWorld, the HelloWorldService. Like every Ioc container, the container needs to be configured. Unity framework allows configuration from code or an xml configuration file. From code it looks like this:</p>
<p><pre class="brush: csharp;">IUnityContainer container = new UnityContainer();
container.Register();</pre><br />
In a configuration file it looks like this:<br />
<pre class="brush: xml;">
  
    
  
  
    
      
        
          
        
      
    
  
</pre><br />
Ok nothing shocking here. A typical config section and also a typical ioc config. But there is something about the schema I want to point out to you. &lt;containers&gt;. So we have the possibility to have multiple containers . You can give a container a name, the default container is the nameless container. I found this in the code, although there is already documentation in the package (Keep up the great job guys!). Now let’s see how we can use the HelloWorldService from code:<br />
<pre class="brush: csharp;">IUnityContainer container = new UnityContainer();
UnityConfigurationSection section =
   (UnityConfigurationSection)ConfigurationManager.GetSection(“unity“);
section.Containers.Default.GetConfigCommand().Configure(container);
IHelloWorldService service =
  container.Get();</pre><br />
I like the concept that they decoupled configuration from the container itself, but a small factory could ease the job. There is even another project called “Delta” on CodePlex that is creating an alternative configuration option.So, the next topic is about lifetime management. Most IoC containers support singleton and transient objects. Singleton means that once an object is created it will only exist once in the container . With transient you get a new object every time you request the object. Let’s put this to practice. In the config file:</p>
<p><pre class="brush: xml;">
</pre></p>
<div style="display:inline;float:none;margin:0;padding:0;" class="wlWriterSmartContent"></div>
<p>In code:</p>
<p><pre class="brush: csharp;">Console.WriteLine(container.Get(“transientHelloWorld“).HelloWorld(“Thomas Annerel“));
Console.WriteLine(container.Get(“transientHelloWorld“).HelloWorld(“Thomas Annerel“));
Console.WriteLine(“Singleton“);
Console.WriteLine(container.Get(“singletonHelloWorld“).HelloWorld(“Thomas Annerel“));
Console.WriteLine(container.Get(“singletonHelloWorld“).HelloWorld(“Thomas Annerel“));</pre></p>
<div style="display:inline;float:none;margin:0;padding:0;" class="wlWriterSmartContent"></div>
<p>The result:</p>
<p><a name="0.1_graphic03" href="http://intofactories.files.wordpress.com/2008/02/unity1.jpg" title="0.1_graphic03"><img border="0" width="628" src="http://intofactories.files.wordpress.com/2008/02/unity1-thumb.jpg?w=628&#038;h=317" alt="unity1" height="317" style="border:0;" /> </a></p>
<p>In this example I’ve shown you how you can manage the lifestyle of an Object. Another small feature is that you can give a type a name and use that name to get an instance. Next feature is dependency injection. Unity supports all types of Dependency Injection, Constructor, Property and Interface injection, it even supports injection of strings. So let’s give it a try. I created an improved version of the HelloWorldService. In this version the message (a string) is injected and the second object hosted by unity is injected to do the formatting (just a simple string.ToUpper(), nothing fancy). So here is the config:</p>
<p><pre class="brush: xml;">
  
    
  
  
  
    
  
</pre></p>
<div style="display:inline;float:none;margin:0;padding:0;" class="wlWriterSmartContent"></div>
<p>The code behind MessageInjectionHelloWorldService:</p>
<p><pre class="brush: csharp;">#region Properties

/// 
/// The injected formatter
/// 
[Dependency]
public IMessageFormatter Formatter
{
  get
    {
      return formatter;
    }
  set
    {
      formatter = value;
    }
}       

#endregion        

#region Override Properties       

/// 
/// The message of HelloWorld
/// 
[Dependency(“HelloWorldMessageString“)]
public string MessageFormat
{
  get
    {
      return helloWorldMessageFormat;
    }
  set
    {
      helloWorldMessageFormat = value;
    }
}       

#endregion</pre></p>
<div style="display:inline;float:none;margin:0;padding:0;" class="wlWriterSmartContent"></div>
<p>The attribute on the properties tells the ObjectBuilder behind Unity to inject an instance into this class. The attribute describes who to inject. The cool thing is that you can inject value types into an instance. The discussion about what to inject and what not is going to rise since the configuration of Unity can’t replace the need for custom configuration sections.</p>
<p>And now the result:</p>
<p><a name="0.1_graphic04" href="http://intofactories.files.wordpress.com/2008/02/unity2.jpg" title="0.1_graphic04"><img border="0" width="628" src="http://intofactories.files.wordpress.com/2008/02/unity2-thumb.jpg?w=628&#038;h=317" alt="unity2" height="317" style="border:0;" /> </a></p>
<p>A pity is that there is no way to configure the dependencies in the configuration file. Maybe this is a feature that’s not implemented (yet).</p>
<p>So, I think I covered the most important stuff of an IoC container, except some features that are totally new in IoC land.</p>
<p>The first one is hierarchical containers. You can’t configure it using the configuration file, but it can be easily done in code. You can actually add a child container to every Unity container. In this child container you can overrule mappings of the parent container. It’s like object inheritance. This is a unique feature and I love it. This will make overriding the container in some circumstances (like UnitTesting) a lot easier.</p>
<p>Another great feature is that ObjectBuilder isn’t hidden away, this means that you can inject in classes that are not hosted in the container, you only need to create them using the ObjectBuilder. In the following example we ask the container to create a Form. If the form has any dependencies these will be automatically injected.</p>
<p><pre class="brush: csharp;">container.Get());</pre></p>
<h3>Summary</h3>
<p>Lets put all the pros and cons together:</p>
<p><b>Pros</b>:</p>
<ul>
<li>Can contain multiple containers.</li>
<li>Container can be configured using code or a config file, letting the door open for other configuration options.</li>
<li>API Interface supports generics, so no unnecessary casts.</li>
<li>Container Hierachy.</li>
<li>Can inject in objects that are not in the container, using the Object Builder functionality.</li>
<li>Supports 3 sorts of Dependency Injection, namely constructor, property and method injection.</li>
<li>Can inject instances and value types.</li>
</ul>
<p><b>Cons</b>:</p>
<ul>
<li>Not everything is configurable yet using the app.config.</li>
<li>Missing some options in creating custom lifestyles (for singleton per HttpRequest in web applications).</li>
</ul>
<p><b>Conclusion</b>: this is the first CTP of Unity framework. I think this is a great start but still needs some work. I think it’s a great first candidate for our IoC DSL.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/54/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/54/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=54&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/02/26/ioc-dsl-unity-framework/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ce5a6443789536b186aca748cb0dce7b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">T</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/02/unity1-thumb.jpg" medium="image">
			<media:title type="html">unity1</media:title>
		</media:content>

		<media:content url="http://intofactories.files.wordpress.com/2008/02/unity2-thumb.jpg" medium="image">
			<media:title type="html">unity2</media:title>
		</media:content>
	</item>
		<item>
		<title>IoC Dsl &#8211; The Beginning</title>
		<link>http://intofactories.wordpress.com/2008/02/25/ioc-dsl-the-beginning/</link>
		<comments>http://intofactories.wordpress.com/2008/02/25/ioc-dsl-the-beginning/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 18:15:45 +0000</pubDate>
		<dc:creator>tannerel</dc:creator>
				<category><![CDATA[Domain-Driven Design]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[castle]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[objectbuilder]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://intofactories.wordpress.com/?p=48</guid>
		<description><![CDATA[First of all, before you begin to wonder what IoC Dsl stands for: IoC Dsl stands for Inversion of Control Domain specific language, not for International Olympic Committee. Secondly, IoC isn&#8217;t something new. It came from the java world (the Others …) and nowadays it’s a hot topic in .NET. IoC is something we use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=48&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First of all, before you begin to wonder what IoC Dsl stands for: IoC Dsl stands for <a target="_blank" href="http://martinfowler.com/bliki/InversionOfControl.html">Inversion of Control</a> <a target="_blank" href="http://martinfowler.com/bliki/DomainSpecificLanguage.html">Domain specific language</a>, not for <a target="_blank" href="http://en.wikipedia.org/wiki/International_Olympic_Committee">International Olympic Committee</a>. Secondly, IoC isn&#8217;t something new. It came from the <a target="_blank" href="http://www.java.com">java</a> world (the Others …) and nowadays it’s a hot topic in .NET. IoC is something we use every day without even realizing it. It’s about loading certain implementations of an interface without you knowing in code which implementation you loaded.</p>
<p><span id="more-48"></span></p>
<h3>Why build an IoC Dsl?</h3>
<p>Before I go into detail on IoC, I’ll give you a little explanation why IoC is important for us, <a target="_blank" href="http://intofactories.net/">IntoFactories</a> laborers. Our main goal is getting into all cool things like DSL, Guidance Automation Toolkit and any other Software Factory technologies. Because we want to build a Factory that builds something, we chose to create a DDD Software factory. Now any DDD implementation needs an IoC container. Why? Simple. One of the rules of DDD is that the Infrastructure Layer (ex an ORM) knows the Domain Layer and the Domain Layer <b>doesn’t</b> know the infrastructure Layer. Solution: IoC to the rescue!</p>
<h3>Inversion of Control</h3>
<p>Inversion of Control is all about loading the right <a target="_blank" href="http://www.martinfowler.com/eaaCatalog/plugin.html">plugin</a> implementation and injecting it in your running code. IoC is a too generic term, from a simple logging provider that is loaded (ex the Entlib logging) to advanced IoC containers as <a target="_blank" href="http://www.springframework.net/">Spring.Net</a> or <a target="_blank" href="http://www.castleproject.org/">Castle</a>. The term dependency injection is therefore closely coupled to IoC.</p>
<p>There are 3 forms of dependency injection:</p>
<ul>
<li><strong>Constructor Injection</strong>: Injects an instance of class A into class B using the constructor of B</li>
<li><strong>Property Injection</strong>: Injects an instance of class A into class B by setting a Property of B</li>
<li><strong>Interface Injection</strong>: An interface that describes how an instance needs to be injected</li>
</ul>
<p>Every IoC container is built on the same 3 pillars:</p>
<ul>
<li><strong>Configuration file</strong>: A file that describes which components are hosted by the IoC container.</li>
<li><strong>Assembler</strong>: Component responsible in loading the right implementation and injecting the necessary dependencies.</li>
<li><strong>Object lifestyle manager</strong>: Every IoC container has the possibility to manage the lifestyle of an object. Commonly supported lifestyles are singleton and single call.</li>
</ul>
<p>Most of the IoC containers also support aspect oriented programming (also called policy injection after the Policy Injection Block in EntlLib 3.1). This allows you to handle cross cutting concerns like logging, security and transactions of the in the IoC Container hosted objects.</p>
<h3>The frameworks</h3>
<p>There are a lot of available frameworks in the open that support dependency injection:</p>
<ul>
<li><a target="_blank" href="http://www.castleproject.org/container/index.html">Castle MicroKernel and Windsor</a></li>
<li><a target="_blank" href="http://www.springframework.net/">Spring.Net</a></li>
<li><a target="_blank" href="http://www.codeplex.com/ObjectBuilder">ObjectBuilder</a> &amp; <a target="_blank" href="http://www.codeplex.com/unity">Unity</a> (New framework of the <a target="_blank" href="http://msdn2.microsoft.com/nl-be/practices/default(en-us).aspx">P&amp;P group</a>)</li>
</ul>
<p>The following posts will handle these frameworks.</p>
<h3>Back to the main topic!</h3>
<p>What part of IoC and dependency injection can we automate in our Software Factory and technical framework? First off all, abstraction of external components is always a best practice. This will prevent assembly references to 3rd party frameworks in your projects and will ease the integration of a newer version. That’s typically a job for a technical framework. We will make the assumption that every AppDomain will contain only one instance of an IocContainer. By creating a static gateway to the IoC container we can hide its implementation. Because every architecture is different, we have to allow the user to choose which implementation of the IoC container he wants to use. This can be easily done by a provider mechanism.</p>
<p>Now let’s go to the cool stuff! The generation of the config file can be done with a Dsl. This Dsl needs to be able to generate the possible humongous config files for the different IoC Container implementations. Next thing that would be cool is single-click “Host in IoC” option provided by GAT&#8230; Ok, the requirements are almost set, so let’s start building the IoC Dsl/GAT package.</p>
<p>The following days/weeks I will write some posts about the different IoC implementations on the market, starting with Unity. See you next time!</p>
<p>Greetz,<br />
Thomas</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/intofactories.wordpress.com/48/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/intofactories.wordpress.com/48/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/intofactories.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/intofactories.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/intofactories.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/intofactories.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/intofactories.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/intofactories.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/intofactories.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/intofactories.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=intofactories.wordpress.com&amp;blog=2271865&amp;post=48&amp;subd=intofactories&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://intofactories.wordpress.com/2008/02/25/ioc-dsl-the-beginning/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ce5a6443789536b186aca748cb0dce7b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">T</media:title>
		</media:content>
	</item>
	</channel>
</rss>
