<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>TDD developer</title>
	<atom:link href="http://testdrivendevelopment.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://testdrivendevelopment.wordpress.com</link>
	<description>Diary of an agile developer</description>
	<lastBuildDate>Wed, 28 Oct 2009 22:06:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='testdrivendevelopment.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a6ef45b2d30fa0fcbe697fa111d46fdd?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>TDD developer</title>
		<link>http://testdrivendevelopment.wordpress.com</link>
	</image>
			<item>
		<title>Sql Azure first contact</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/10/28/sql-azure-first-contact/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/10/28/sql-azure-first-contact/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 22:06:05 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[aspnetmvc]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[sqlazure]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/10/28/sql-azure-first-contact/</guid>
		<description><![CDATA[Tonight I’m starting a new project. Porting to the cloud a real application running “on premises”.
The first step of this migration is the database. For the moment I want just to recreate the database schema. The data migration will be done in the future but since I hope the database schema will be the same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=105&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Tonight I’m starting a new project. Porting to the cloud a real application running “on premises”.</p>
<p>The first step of this migration is the database. For the moment I want just to recreate the database schema. The data migration will be done in the future but since I hope the database schema will be the same I believe this step will be an easy task.</p>
<p>I have already setup my SqlAzure credential (there are many posts about it). If you want to connect using SSMS (SQL Server Managment Studio) this are the step you need to follow:</p>
<ol>
<li>Cancel the first connection dialog that pops up when you open SSMS.</li>
<li>Click on the New Query button from the toolbar</li>
<li>Enter your server name: eg. xxxyyyzzz.database.windows.net</li>
<li>Enter your Login: <a href="mailto:username@xxxyyyzzz">username@xxxyyyzzz</a></li>
<li>Hit connect.</li>
</ol>
<p>This is my login prompt:</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/10/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb.png?w=304&#038;h=229" width="304" height="229" /></a> </p>
</p>
<p>If you get this error: “Invalid object name &#8217;sys.configurations&#8217;” it’s because you didn’t cancel the first logon prompt. </p>
<p>Once you logged on you are ready to go. In my case I have 2 scripts: one for database creation and one for the creation of the database’s objects (tables &amp; indexes). </p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/10/image1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb1.png?w=304&#038;h=146" width="304" height="146" /></a> </p>
<p>The first it’s very very simple. Just the common CREATE DATABASE statement in order to create the db. No problem with that.</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/10/image2.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb2.png?w=404&#038;h=129" width="404" height="129" /></a> </p>
<p>Now my database is up &amp; running. I need a new connection to run the second script. It this connection I must set the database name in the options as shown below:</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/10/image3.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb3.png?w=304&#038;h=140" width="304" height="140" /></a> </p>
<p>Unfortunately with the second I get some errors at the first run cause I’m using some SqlServer features that are not available on SqlAzure. Using the “Parse” button several times I can detect which features are not supported and than correct my script.</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/10/image4.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb4.png?w=304&#038;h=126" width="304" height="126" /></a> </p>
</p>
<p>At the end my script pass and my database is ready to use.</p>
<p>In the next post I’ll try to migrate the web application (which is built with ASP.NET MVC V1)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=105&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/10/28/sql-azure-first-contact/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/10/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>IronRuby</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 12:35:06 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[IronRuby]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/</guid>
		<description><![CDATA[Today I watched this realy interesting presentation about IronRuby. Now that the implementation is near the version 0.9 I believe it’s time to start using IronRuby in a production environment. First of all I’ll use it for testing (RSpec) and for developing web application (Rails and IronRubyMVC)
If you have time don’t miss it!

Iron Ruby (Ben [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=92&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I watched this realy interesting presentation about <a href="http://ironruby.net/" target="_blank">IronRuby</a>. Now that the implementation is near the version 0.9 I believe it’s time to start using <a href="http://ironruby.net/" target="_blank">IronRuby</a> in a production environment. First of all I’ll use it for testing (<a href="http://rspec.info/" target="_blank">RSpec</a>) and for developing web application (<a href="http://rubyonrails.org/" target="_blank">Rails</a> and <a href="http://github.com/jschementi/ironrubymvc/tree/master" target="_blank">IronRubyMVC</a>)</p>
<p>If you have time don’t miss it!</p>
</p>
<p><a href="http://vimeo.com/5660902">Iron Ruby (Ben Hall)</a> from <a href="http://vimeo.com/vistasquad">Vista Squad</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=92&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Web Toolkit (GWT) on Ubuntu Desktop 9.04</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/06/28/google-web-toolkit-gwt-on-ubuntu-desktop-9-04/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/06/28/google-web-toolkit-gwt-on-ubuntu-desktop-9-04/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 12:20:01 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/06/28/google-web-toolkit-gwt-on-ubuntu-desktop-9-04/</guid>
		<description><![CDATA[After watching a Google Wave video presentation my interest in the Google Web Toolkit (GWT) grown so I decided to create Virtual Machine with all the stuff I need to play with GWT. I’m using a VMWare virtual machine with Ubuntu Desktop 9.04. 
Im order to setup the development environment I found this great blog [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=91&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After watching a <a href="http://wave.google.com/" target="_blank">Google Wave</a> video presentation my interest in the Google Web Toolkit (GWT) grown so I decided to create Virtual Machine with all the stuff I need to play with GWT. I’m using a VMWare virtual machine with Ubuntu Desktop 9.04. </p>
<p>Im order to setup the development environment I found this great blog post with detailed informations on <a href="http://www.evejam.co.uk/node/132" target="_blank">how to set up Glassfish, Eclipse, Google Web toolkit (GWT), Development Environment on Ubuntu Desktop 9.04</a>.</p>
<p>I follow the instruction step by step. I’m not a Linux geek but everything was quite easy. Here below you can see my first application build with GWT.</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/06/capture1.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Capture" border="0" alt="Capture" src="http://testdrivendevelopment.files.wordpress.com/2009/06/capture_thumb1.jpg?w=644&#038;h=484" width="644" height="484" /></a> </p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c4918d6c-fab6-48ec-bf11-1cb5b0fe4b57" class="wlWriterEditableSmartContent">Technorati Tag: <a href="http://technorati.com/tags/Google+Web+Toolkit" rel="tag">Google Web Toolkit</a>,<a href="http://technorati.com/tags/GWT" rel="tag">GWT</a>,<a href="http://technorati.com/tags/Ubuntu" rel="tag">Ubuntu</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=91&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/06/28/google-web-toolkit-gwt-on-ubuntu-desktop-9-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/06/capture_thumb1.jpg" medium="image">
			<media:title type="html">Capture</media:title>
		</media:content>
	</item>
		<item>
		<title>Moonlight on Ubuntu 9 with Firefox</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/06/25/moonlight-on-ubuntu-9-with-firefox/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/06/25/moonlight-on-ubuntu-9-with-firefox/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:14:32 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/06/25/moonlight-on-ubuntu-9-with-firefox/</guid>
		<description><![CDATA[Just few mouse clicks and it works like a charm.
Here below you can see the site of the italian national television build with silverlight 2.0
 

Technorati Tag: ubuntu,moonlight,mono
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=88&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just few mouse clicks and it works like a charm.</p>
<p>Here below you can see the site of the italian national television build with silverlight 2.0</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/06/capture.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Capture" border="0" alt="Capture" src="http://testdrivendevelopment.files.wordpress.com/2009/06/capture_thumb.jpg?w=623&#038;h=484" width="623" height="484" /></a> </p>
</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6428516b-ff6b-47ef-9191-cbe6eecbed90" class="wlWriterEditableSmartContent">Technorati Tag: <a href="http://technorati.com/tags/ubuntu" rel="tag">ubuntu</a>,<a href="http://technorati.com/tags/moonlight" rel="tag">moonlight</a>,<a href="http://technorati.com/tags/mono" rel="tag">mono</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=88&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/06/25/moonlight-on-ubuntu-9-with-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/06/capture_thumb.jpg" medium="image">
			<media:title type="html">Capture</media:title>
		</media:content>
	</item>
		<item>
		<title>NHibernate 2.1.0 beta 2</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/06/21/nhibernate-2-1-0-beta-2/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/06/21/nhibernate-2-1-0-beta-2/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 17:15:56 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[NH2.1]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/06/21/nhibernate-2-1-0-beta-2/</guid>
		<description><![CDATA[Today NHibernate team released version 2.1.0 beta 2
This version contains a fix for bug that cause some problem with MS Sql server execution plans (more details here). 
Be carefull if you use an HQL query cause the actual parser is not still able to use the correct parameter type. I hope also this issue will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=85&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today NHibernate team released version 2.1.0 beta 2</p>
<p>This version contains a fix for bug that cause some problem with MS Sql server execution plans (more details <a href="http://testdrivendevelopment.wordpress.com/2009/03/10/nhibernate-queries-sql-server-execution-plans/" target="_blank">here</a>). </p>
<p>Be carefull if you use an HQL query cause the actual parser is not still able to use the correct parameter type. I hope also this issue will be solved in the future versions but in the meantime you can use the solution I wrote in post linked above.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b158800d-7b24-4338-af8b-fdcf8ad3c92b" class="wlWriterEditableSmartContent">Technorati Tag: <a href="http://technorati.com/tags/NHibernate" rel="tag">NHibernate</a>,<a href="http://technorati.com/tags/NH2.1" rel="tag">NH2.1</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=85&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/06/21/nhibernate-2-1-0-beta-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>LINQ to NHibernate</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/04/19/linq-to-nhibernate/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/04/19/linq-to-nhibernate/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 14:29:38 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[LinqToNHibernate]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/04/19/linq-to-nhibernate/</guid>
		<description><![CDATA[This is a very great news for NHibernate!
Time for another update; it&#8217;s been a while since the last one. Good progress has been made on the new HQL AST Parser port from Hibernate, and it&#8217;s now in a state where it&#8217;s usable, passing the vast majority of the tests within the NHibernate test suite. Of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=84&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://blogs.imeta.co.uk/sstrong/archive/2009/04/16/680.aspx">This</a> is a very great news for NHibernate!</p>
<p><em>Time for another update; it&#8217;s been a while since the last one. Good progress has been made on the new HQL AST Parser port from Hibernate, and it&#8217;s now in a state where it&#8217;s usable, passing the vast majority of the tests within the NHibernate test suite. Of those that are failing (around 8 out of over 1600), we are currently discussing on the developers group whether we will live with these minor breaking changes, or do continued work on the parser to get everything passing.</em></p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:83e2cea7-c49d-41bf-904a-21b8b9bb696e" class="wlWriterEditableSmartContent">Technorati Tag: <a href="http://technorati.com/tags/LinqToNHibernate" rel="tag">LinqToNHibernate</a>,<a href="http://technorati.com/tags/Linq" rel="tag">Linq</a>,<a href="http://technorati.com/tags/NHibernate" rel="tag">NHibernate</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=84&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/04/19/linq-to-nhibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>NHibernate queries &amp; sql server execution plans</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/03/10/nhibernate-queries-sql-server-execution-plans/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/03/10/nhibernate-queries-sql-server-execution-plans/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 20:57:06 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Query execution plan]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/03/10/nhibernate-queries-sql-server-execution-plans/</guid>
		<description><![CDATA[In these days I’m working with Andrea on a web application using ASP.NET &#38; SQL Server . You should kwon that Andrea, is a SQL Server MVP, but fortunately is not a T-SQL taliban so he agree without hesitation when I proposed to use NHibernate to build our data access layer. When a tool can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=80&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In these days I’m working with <a href="http://community.ugiss.org/blogs/abenedetti">Andrea</a> on a web application using ASP.NET &amp; SQL Server . You should kwon that <a href="http://community.ugiss.org/blogs/abenedetti">Andrea</a>, is a SQL Server MVP, but fortunately is not a T-SQL taliban so he agree without hesitation when I proposed to use NHibernate to build our data access layer. When a tool can help us while building an application why not use it ?</p>
<p>As you can image a skilled DBA like <a href="http://community.ugiss.org/blogs/abenedetti">Andrea</a> can rapidly find a bottleneck in any query fired to a database. While writing a simple query using NHibernate API we noticed a strange behavior of NHibernate 2.0 with parameters. Here is the code we wrote:</p>
<pre style="width:697px;height:206px;"><span style="color:#0000ff;">using</span> (ISession session = factory.OpenSession())
{
	<span style="color:#008000;">//nvarchar(4)</span>
	session.CreateQuery(&quot;<span style="color:#8b0000;">from Region r where r.Description like :desc</span>&quot;)
		.SetString(&quot;<span style="color:#8b0000;">desc</span>&quot;, &quot;<span style="color:#8b0000;">zon%</span>&quot;)
		.List();

	<span style="color:#008000;">//nvarchar(5)</span>
	session.CreateQuery(&quot;<span style="color:#8b0000;">from Region r where r.Description like :desc</span>&quot;)
		.SetString(&quot;<span style="color:#8b0000;">desc</span>&quot;, &quot;<span style="color:#8b0000;">zone%</span>&quot;)
		.List();
}</pre>
<p>This code generates these two sql queries:</p>
<pre style="width:697px;height:167px;">

<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=exec&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">exec</a> <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=sp_executesql&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">sp_executesql</a> N'<span style="color:#8b0000;">select region0_.RegionId as RegionId0_, region0_.RegionDescription as RegionDe2_0_ </span><span style="color:#8b0000;">from Region region0_ where (region0_.RegionDescription like @p0 )</span>',N'<span style="color:#8b0000;">@p0 nvarchar(4)</span>',@p0=N'<span style="color:#8b0000;">zon%</span>'

<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=exec&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">exec</a> <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=sp_executesql&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">sp_executesql</a> N'<span style="color:#8b0000;">select region0_.RegionId as RegionId0_, region0_.RegionDescription as RegionDe2_0_ </span><span style="color:#8b0000;">from Region region0_ where (region0_.RegionDescription like @p0 )</span>',N'<span style="color:#8b0000;">@p0 nvarchar(5)</span>',@p0=N'<span style="color:#8b0000;">zone%</span>'
</pre>
<p>As you can see the parameter type is different in the two statements. This unfortunately cause SqlServer to generate two different exection plans. If you need the best performace you should avoid this behaviour. If you send to the database queries using the same parameter (type &amp; size) SqlServer use his internal cache. You have already pay for it so why not to use it ?</p>
<p>I had the pleasure to discuss with Fabio Maulo about this topic (you can read <a href="http://groups.google.it/group/nh-it/browse_thread/thread/2925264ff8aad4c2">here</a>. The conversation is in italian). At the end I found this solution:</p>
<p>I edited my hibernate.cfg.xml file adding this node to the xml</p>
<pre><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">property</span> <span style="color:#ff0000;">name</span>=<span style="color:#0000ff;">&quot;prepare_sql&quot;</span><span style="color:#0000ff;">&gt;</span>true<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">property</span><span style="color:#0000ff;">&gt;</span></pre>
<p>and then I wrote this code:</p>
<pre style="width:696px;height:223px;"><span style="color:#0000ff;">using</span> (ISession session = factory.OpenSession())
{

	<span style="color:#008000;">//nvarchar(10)</span>
	session.CreateQuery(&quot;<span style="color:#8b0000;">from Region r where r.Description like :desc</span>&quot;)
		.SetParameter(&quot;<span style="color:#8b0000;">desc</span>&quot;, &quot;<span style="color:#8b0000;">zoneh%</span>&quot;, TypeFactory.GetStringType(10))
		.List();

	<span style="color:#008000;">//nvarchar(10)</span>
	session.CreateQuery(&quot;<span style="color:#8b0000;">from Region r where r.Description like :desc</span>&quot;)
		.SetParameter(&quot;<span style="color:#8b0000;">desc</span>&quot;, &quot;<span style="color:#8b0000;">neh%</span>&quot;, TypeFactory.GetStringType(10))
		.List();
}</pre>
<p>Now with this code NHibernate generates these two sql queries:</p>
<pre style="width:697px;height:250px;"><a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=declare&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">declare</a> @p1 <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=int&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">int</a>
<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=set&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">set</a> @p1=1
<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=exec&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">exec</a> <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=sp_prepexec&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">sp_prepexec</a> @p1 <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=output&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">output</a>,N'<span style="color:#8b0000;">@p0 nvarchar(10)</span>',N'<span style="color:#8b0000;">select region0_.RegionId as RegionId0_, region0_.RegionDescription as RegionDe2_0_ from Region region0_ where (region0_.RegionDescription like @p0 )</span>',@p0=N'<span style="color:#8b0000;">zoneh%</span>'
select @p1

<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=declare&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">declare</a> @p1 <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=int&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">int</a>
<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=set&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">set</a> @p1=2
<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=exec&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">exec</a> <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=sp_prepexec&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">sp_prepexec</a> @p1 <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=output&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">output</a>,N'<span style="color:#8b0000;">@p0 nvarchar(10)</span>',N'<span style="color:#8b0000;">select region0_.RegionId as RegionId0_, region0_.RegionDescription as RegionDe2_0_ from Region region0_ where (region0_.RegionDescription like @p0 )</span>',@p0=N'<span style="color:#8b0000;">neh%</span>'
select @p1</pre>
<p>This is better cause the parameters length is always the same. Now your database will thank you for this! But wait you can still do something better.<br />
  <br />If your database column type is a varchar and not nvarchar you can improve your code using a different SqlDbType. How ? Whit his code:</p>
<pre style="width:694px;height:179px;"><a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=using&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">using</a> (ISession <a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=session&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">session</a> = factory.OpenSession())
{
	<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=session&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">session</a>.CreateQuery(&quot;<span style="color:#8b0000;">from Region r where r.Description like :desc</span>&quot;)
		.SetParameter(&quot;<span style="color:#8b0000;">desc</span>&quot;, &quot;<span style="color:#8b0000;">z%</span>&quot;, TypeFactory.GetAnsiStringType(15))
		.List();

	<a href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=session&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">session</a>.CreateQuery(&quot;<span style="color:#8b0000;">from Region r where r.Description like :desc</span>&quot;)
		.SetParameter(&quot;<span style="color:#8b0000;">desc</span>&quot;, &quot;<span style="color:#8b0000;">za%</span>&quot;, TypeFactory.GetAnsiStringType(15))
		.List();
}</pre>
<p>Now the parameter type is a varchar and the size is always 15. Whit this latest improvement you remove a CONVER_IMPLICIT operation from your query execution plan (futher details <a href="http://community.ugiss.org/blogs/abenedetti/archive/2009/03/03/ancora-su-query-e-sulla-definizione-dei-parametri-perfomance-e-piani-di-esecuzione.aspx">here</a> but in italian ). This cast operation cost something so if you don’t need it why to remove it ? </p>
<p>I hope this will help someone (dev &amp; dba) in the future!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:955906c9-8de5-4d71-aba2-1031ea316d18" style="display:inline;float:none;margin:0;padding:0;">Technorati Tag: <a href="http://technorati.com/tags/NHibernate" rel="tag">NHibernate</a>,<a href="http://technorati.com/tags/SQLServer" rel="tag">SQLServer</a>,<a href="http://technorati.com/tags/Query+execution+plan" rel="tag">Query execution plan</a>,<a href="http://technorati.com/tags/ORM" rel="tag">ORM</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=80&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/03/10/nhibernate-queries-sql-server-execution-plans/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>NAnt sucks and Rake rocks</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/02/01/nant-sucks-and-rake-rocks/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/02/01/nant-sucks-and-rake-rocks/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 13:34:59 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[gallio]]></category>
		<category><![CDATA[NAnt]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/02/01/nant-sucks-and-rake-rocks/</guid>
		<description><![CDATA[In these days I’m moving my build scripts from NAnt to Rake. The main reason for doing this is that I’m moving from external dsl to an internal dsl. Internal DSLs are often the most approachable form of DSLs to write. Unlike external DSLs you don&#8217;t need to learn about grammars and language parsing, unlike [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=79&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In these days I’m moving my build scripts from NAnt to Rake. The main reason for doing this is that I’m moving from external dsl to an internal dsl. Internal DSLs are often the most approachable form of DSLs to write. Unlike external DSLs you don&#8217;t need to learn about grammars and language parsing, unlike language workbenches you don&#8217;t need any special tools. With internal DSLs you work in your regular language environment.</p>
<p>This means that now I build my build scritps just with ruby. I believe this is a good way to learn this nice language. Rake in fact is nothing more that a Ruby library.</p>
<p>Getting started with Rake and .NET is very easy:</p>
<ul>
<li>Download the <a href="http://www.ruby-lang.org/en/downloads/">Ruby for windows one click installer</a>. </li>
<li>Install it </li>
<li>Create a file Rakefile.rb (type is text file) </li>
<li>Type:
<pre style="width:591px;height:342px;">task :default =&gt; :build

task :build =&gt; [:compile, :<span style="color:#00008b;">test</span>, :deploy] 

task :compile <span style="color:#0000ff;">do</span>
  params = '/t:Rebuild /nologo /v:m /<span style="color:#00008b;">p</span>:Configuration=Release src\demo.sln'
  msbuid = 'C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5\\MSBuild.exe'
  sh &quot;<span style="color:#8b0000;">#{msbuid} #{params}</span>&quot;
<span style="color:#0000ff;">end</span>

task :<span style="color:#00008b;">test</span> <span style="color:#0000ff;">do</span>
 runner = 'tools\\Gallio\\Gallio.Echo.exe'
 assemblies = FileList[&quot;<span style="color:#8b0000;">src/**/bin/Release/*.Fixture.exe</span>&quot;]
 extension = '' <span style="color:#008000;">#'/e:TeamCityExtension,Gallio.TeamCityIntegration'</span>
 sh &quot;<span style="color:#8b0000;">#{runner} #{assemblies} #{extension}</span>&quot;
<span style="color:#0000ff;">end</span>

task :deploy <span style="color:#0000ff;">do</span>
    sh &quot;<span style="color:#8b0000;">echo Task not yet implemented!</span>&quot;
<span style="color:#0000ff;">end</span></pre>
</li>
<li>
<p>Open a command prompt (Start-&gt;Run-&gt;Cmd) </p>
</li>
<li>
<p>Type: cd c:\[my RakeFile.rb folder] (obviously put your own path in) </p>
</li>
<li>Type: rake </li>
<li>
<p>Done! </p>
</li>
</ul>
<p>As you can see here above with rake there is no need to learn some crazy xml syntax. Whit this little script I compile my solution and run all unit tests. No need to write xml, only some ruby code. </p>
<p>Nothing more nothing less.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:82fab512-4089-4dce-a650-ff5263fcf6fb" style="display:inline;float:none;margin:0;padding:0;">Technorati Tag: <a href="http://technorati.com/tags/rake" rel="tag">rake</a>,<a href="http://technorati.com/tags/ruby" rel="tag">ruby</a>,<a href="http://technorati.com/tags/nant" rel="tag">nant</a>,<a href="http://technorati.com/tags/gallio" rel="tag">gallio</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=79&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/02/01/nant-sucks-and-rake-rocks/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerCommands for Visual Studio 2008</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/01/06/powercommands-for-visual-studio-2008/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/01/06/powercommands-for-visual-studio-2008/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 13:18:29 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[PowerCommands]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/01/06/powercommands-for-visual-studio-2008/</guid>
		<description><![CDATA[I think Visual Studio 2008 is a great development environment but you can still improve its usability with some free add-in. For example &#34;PowerCommands for Visual Studio 2008&#34; is a set of useful extensions for VS 2008 that add a bunch of cool features to the IDE. 
You can download the installer from here

Technorati Tag: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=68&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I think Visual Studio 2008 is a great development environment but you can still improve its usability with some free add-in. For example <em>&quot;PowerCommands for Visual Studio 2008&quot;</em> is a set of useful extensions for VS 2008 that add a bunch of cool features to the IDE. </p>
<p>You can download the installer from <a href="http://www.visualstudiogallery.com/ExtensionDetails.aspx?ExtensionId=df3f0c30-3d37-4e06-9ef8-3bff3508be31">here</a></p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:582773b7-54f4-4f15-8df0-3bbeb4208da8" style="display:inline;margin:0;padding:0;">Technorati Tag: <a href="http://technorati.com/tags/PowerCommands" rel="tag">PowerCommands</a>,<a href="http://technorati.com/tags/VS2008" rel="tag">VS2008</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=68&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/01/06/powercommands-for-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>NAnt + NDepend.Console.exe and relative paths</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/01/05/ndependconsoleexe-and-relative-path/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/01/05/ndependconsoleexe-and-relative-path/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 13:31:49 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[Continuous integrated]]></category>
		<category><![CDATA[NAnt]]></category>
		<category><![CDATA[NDepend]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/01/05/ndependconsoleexe-and-relative-path/</guid>
		<description><![CDATA[If you read the documentation of NDepend.Console.exe you learn that relative paths are not supported. These remarks also apply to paths provided with options /InDirs /OutDir and /XslForReport.
Here you can see the result of a wrong line command
 
and here the result of a right line command
 
Unfortunately this is a problem for my solutions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=66&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you read the documentation of <a href="http://ndepend.com/NDependConsole.aspx">NDepend.Console.exe</a> you learn that relative paths are not supported. These remarks also apply to paths provided with options /InDirs /OutDir and /XslForReport.</p>
<p>Here you can see the result of a wrong line command</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/01/image.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="106" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb.png?w=644&#038;h=106" width="644" border="0" /></a> </p>
<p>and here the result of a right line command</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/01/image1.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="143" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb1.png?w=644&#038;h=143" width="644" border="0" /></a> </p>
<p>Unfortunately this is a problem for my solutions cause I need always relative path. My solution are continuous integrated using <a href="http://www.jetbrains.com/teamcity/">TeamCity</a> and in my setup the build agent checks out sources in a random folder on the build agent machine (for eg. C:\BuildAgent\work\12724a65ddd4c6d0).</p>
<p>Here the Version Control Settings page of my project inside my <a href="http://www.jetbrains.com/teamcity/">TeamCity</a> server where you can set the checkout directory.</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/01/image2.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="159" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb2.png?w=644&#038;h=159" width="644" border="0" /></a> </p>
<p>Using relative path for me is a plus cause allow developers to freely decise the checkout project folder. For some of our customer this has been a project requirement.</p>
<p>Ok now you know why I need relative paths. Now I want to explain how I use <a href="http://nant.sourceforge.net/">NAnt</a> + <a href="http://ndepend.com">NDepend</a> inside my continuous integrated solution.&#160; </p>
<p>This is the target I use to run <a href="http://ndepend.com/NDependConsole.aspx">NDepend.Console.exe</a>. </p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2009/01/image3.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="124" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb3.png?w=644&#038;h=124" width="644" border="0" /></a> </p>
<p>As you can see using the <a href="http://nant.sourceforge.net/release/latest/help/functions/directory.get-current-directory.html">directory::get-current-directory</a> I can build an absolute path at run-time. Maybe this result can be obtained using the built-in property&#160; ${nant.project.basedir} but this is marked as deprecated so I prefer to use the <a href="http://nant.sourceforge.net/release/latest/help/functions/directory.get-current-directory.html">directory::get-current-directory</a> function.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=66&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/01/05/ndependconsoleexe-and-relative-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2009/01/image-thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>