<?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>dotNetChris @ Marisic.Net</title>
	<atom:link href="http://dotnetchris.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dotnetchris.wordpress.com</link>
	<description>C# ASP.Net Development Weblog</description>
	<lastBuildDate>Tue, 10 Nov 2009 15:54:40 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dotnetchris.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/c64eff40b73ced69fd6116053c89c81e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>dotNetChris @ Marisic.Net</title>
		<link>http://dotnetchris.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dotnetchris.wordpress.com/osd.xml" title="dotNetChris @ Marisic.Net" />
		<item>
		<title>Great Blog on URL Rewriting with URLRewriter.net</title>
		<link>http://dotnetchris.wordpress.com/2009/11/10/great-blog-on-url-rewriting-with-urlrewriter-net/</link>
		<comments>http://dotnetchris.wordpress.com/2009/11/10/great-blog-on-url-rewriting-with-urlrewriter-net/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 15:54:40 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=307</guid>
		<description><![CDATA[It&#8217;s been a while since I posted anything and I came across this great post on Run Tings Proper, Advanced url rewriting for the rest of us &#8211; how to create a custom transform in UrlRewriter.net.
This is a great post that really sumarizes the most common needs in URL rewriting and how to handle it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=307&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s been a while since I posted anything and I came across this great post on Run Tings Proper, <a href="http://runtingsproper.blogspot.com/2009/11/advanced-url-rewriting-for-rest-of-us.html">Advanced url rewriting for the rest of us &#8211; how to create a custom transform in UrlRewriter.net</a>.</p>
<p>This is a great post that really sumarizes the most common needs in URL rewriting and how to handle it with <a href="http://urlrewriter.net/">URLRewriter.net </a> (does anyone else find it ironic this website is php, of course I suppose it could be php in asp.net) while I didn&#8217;t try out what was on here yet or download the demo it definitely all looks right. At some point I wanted to implement an URL rewriting scheme in my applications and this post will be a great help when I actually start on that.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/307/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=307&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/11/10/great-blog-on-url-rewriting-with-urlrewriter-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
		<item>
		<title>Using jQuery to create a scrolling sidebar</title>
		<link>http://dotnetchris.wordpress.com/2009/09/01/using-jquery-to-create-a-scrolling-sidebar/</link>
		<comments>http://dotnetchris.wordpress.com/2009/09/01/using-jquery-to-create-a-scrolling-sidebar/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 13:45:47 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=298</guid>
		<description><![CDATA[The easiest way to start this post is with an image explaining the concept.

So now as you can see we have a basic site layout a 2 column with a fixed header and footer. For this example I&#8217;m dealing with a fixed header &#38; footer for simplicity but you&#8217;ll see you can easily handle dynamic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=298&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The easiest way to start this post is with an image explaining the concept.</p>
<p><a href="http://dotnetchris.files.wordpress.com/2009/09/layout.jpg"><img class="aligncenter size-full wp-image-299" title="layout" src="http://dotnetchris.files.wordpress.com/2009/09/layout.jpg?w=640&#038;h=480" alt="layout" width="640" height="480" /></a></p>
<p>So now as you can see we have a basic site layout a 2 column with a fixed header and footer. For this example I&#8217;m dealing with a fixed header &amp; footer for simplicity but you&#8217;ll see you can easily handle dynamic sizing also. The content column is a dynamic size column that can contain a large amount of text that if you scroll down past the fold of the page you will lose track of the sidebar. So the goal I was seeking was a way to have the sidebar follow the scroll bar in an aesthetically pleasing manner.</p>
<p>At first I attempted a fixed width layout but then ran into all of the browser compatibility issues so I turned to <a href="http://www.jquery.com">jQuery</a>. The first thing we need to achieve is to make the sidebar track the scrollbar.</p>
<table bgcolor="white" border="1" cellpadding="16">
<tr>
<td>
<pre><font color="black" face="Courier New" size="3"><font color="blue">&lt;</font><font color="maroon">script</font> type=&quot;text/javascript&quot;<font color="blue">&gt;</font>
$(window).scroll(function() {
    $('#sidebarPage1').animate(
        { top: $(window).scrollTop() + 'px' }
    );
});
<font color="blue">&lt;/</font><font color="maroon">script</font><font color="blue">&gt;</font>

</font></pre>
</td>
</tr>
</table>
<p>This will achieve the tracking we desire however it is a very jerky and unpleasant effect so lets see what we can do to tune it up.</p>
<table bgcolor="white" border="1" cellpadding="16">
<tr>
<td>
<pre><font color="black" face="Courier New" size="3"><font color="blue">&lt;</font><font color="maroon">script</font> type=&quot;text/javascript&quot;<font color="blue">&gt;</font>
$(window).scroll(function() {
    $('#sidebarPage1').animate(
        { top: $(window).scrollTop() + 'px' },
        { queue: false, duration: 500, easing: 'easeInOutSine' }
    );
});
<font color="blue">&lt;/</font><font color="maroon">script</font><font color="blue">&gt;</font>

</font></pre>
</td>
</tr>
</table>
<p>This will produce a much nicer effect. The queue parameter we included is to allow jQuery to create a series of events that happen in a certain order to create animation. We don&#8217;t want our animation waiting for anything so we set queue: false to make it run immediately. The duration parameter is how long in milliseconds the animation to take, so setting 500 is one half of a second. This lowers the amount of jumping the sidebar does significantly. Lastly the easing parameter allows us to setup an <a href="http://gsgd.co.uk/sandbox/jquery/easing/">easing algorithm</a>that influences how the animation handles the start and ends of the effects. If you look at the easing plugin&#8217;s site you can play around with the different options that are built into jQuery natively. I chose the easeInOutSine as it seemed to produce a very nice animation where it spends more of the animation time at the start and end where jerkiness can be more easily noticed, but this was just a personal preference.</p>
<p>Now the real fun, polishing this and fixing the &#8220;quirks&#8221; this code creates. If you make your browser view port very small you can actually scroll the sidebar off the entire screen because of the footer taking up space at the bottom and the sidebar is already offset from the top because it&#8217;s below the header. The first is to get it to stop scrolling off the page. This will involve doing some math to calculate limits on the scrolling.</p>
<table bgcolor="white" border="1" cellpadding="16">
<tr>
<td>
<pre><font color="black" face="Courier New" size="3"><font color="blue">&lt;</font><font color="maroon">script</font> type=&quot;text/javascript&quot;<font color="blue">&gt;</font>
    $(window).scroll(function() {
        var dynamicSidebarHeight = $('.sidebar').height();

        if ($(window).height() <font color="blue">&gt;</font> dynamicSidebarHeight) {
            var fixedFooterOffset = 150;
            var scrollTo = $(window).scrollTop()
            var calculatedMaxTop = $('#footer').offset().top - dynamicSidebarHeight - fixedFooterOffset;
            var fixedHeaderOffset = 150;

            if (scrollTo <font color="blue">&gt;</font> calculatedMaxTop) {
                scrollTo = calculatedMaxTop;
            }

            $('#sidebarPage1')
            .animate(
                { top: scrollTo + 'px' },
                { queue: false, duration: 500, easing: 'easeInOutSine' }
            );
        }
    });
<font color="blue">&lt;/</font><font color="maroon">script</font><font color="blue">&gt;</font>
</font></pre>
</td>
</tr>
</table>
<p>To explain what each of these variables mean:</p>
<ul>
<li>
dynamicSidebarHeight &#8211; this is the jQuery calculated height at run time of the sidebar</li>
<li>
fixedFooterOffset and fixedHeaderOffset &#8211; are the height in pixels of the static headers and footers, which for this example are said to be 150px.</li>
<li>calculatedMaxTop &#8211; This is the equation to know the farthest down the sidebar&#8217;s top can be set to that it won&#8217;t crash into the footer.</li>
</ul>
<p>The first check is make sure the browser viewport is atleast as big as the sidebar. If it&#8217;s smaller than the sidebar scrolling is pointless because you will never be able to see the bottom of the sidebar because when you&#8217;d scroll down to see the rest of the sidebar it will move off screen. After that we calculate the Max value for the Top of the sidebar which is the based off the location of the top of the footer which is what calling .offset().top returns, let&#8217;s say 2000px for this example. We&#8217;ll assume the sidebar height is 500px and we have our fixed footer height of 150px.</p>
<p>So top of footer is at 2000px we subtract the height of the bar 500px and the height of the footer 150px so in this example the furthest you could set the top of the sidebar would be 1350px since if the top of the sidebar is 1350px, the next 500px is the sidebar and the next 150px is the footer. So we want to check if scrollTo is &gt; than this value and if it is we want it to set it to the maximum length we would allow.</p>
<p>The final part is to handle once we scroll past the page fold the sidebar is now 150px offset from the top of the window due to the header being at the top that has scrolled up off the screen so it would look alot better if the bar stays stuck at the top edge. This is the reason I have the unused fixedHeaderOffset so far which accounts for the height of the header. The final code we will have is this</p>
<table bgcolor="white" border="1" cellpadding="16">
<tr>
<td>
<pre><font color="black" face="Courier New" size="3"><font color="blue">&lt;</font><font color="maroon">script</font> type=&quot;text/javascript&quot;<font color="blue">&gt;</font>
    $(window).scroll(function() {
        var dynamicSidebarHeight = $('#sidebar').height();

        if ($(window).height() <font color="blue">&gt;</font> dynamicSidebarHeight) {
            var fixedFooterOffset = 150;
            var scrollTo = $(window).scrollTop()
            var calculatedMaxTop = $('#footer').offset().top - dynamicSidebarHeight - fixedFooterOffset;
            var fixedHeaderOffset = 150;

            if (scrollTo <font color="blue">&gt;</font> calculatedMaxTop) {
                scrollTo = calculatedMaxTop;
            }
            else if (scrollTo <font color="blue">&lt;</font> fixedHeaderOffset) {
                scrollTo = 0;
            }
            else
            {
                scrollTo -= fixedHeaderOffset - 18; //18 is for a top margin
            }

            $('#sidebarPage1')
            .animate(
                { top: scrollTo + 'px' },
                { queue: false, duration: 500, easing: 'easeInOutSine' }
            );
        }
    });
<font color="blue">&lt;/</font><font color="maroon">script</font><font color="blue">&gt;</font>
</font></pre>
</td>
</tr>
</table>
<p>So far we&#8217;ve asserted that the viewport is larger than the sidebar, we now cannot scroll the sidebar under the footer or off the page. To make handle the calculation of where to have it in relation to the top of the page we add</p>
<table bgcolor="white" border="1" cellpadding="16">
<tr>
<td>
<pre><font color="black" face="Courier New" size="3"><font color="blue">else</font> <font color="blue">if</font> (scrollTo &lt; fixedHeaderOffset) {
    scrollTo = 0;
}
<font color="blue">else</font>
{
    scrollTo -= fixedHeaderOffset - 18; <font color="green">//18 is for a top margin</font>
}
</font></pre>
</td>
</tr>
</table>
<p>To our if statement. The first case is we&#8217;ve scrolled back up to the top of the page and want the sidebar to sit under the header so scrollTo is &lt; the height of the header. At this point we set scrollTo to 0 (I have a position: relative wrapper around my content and sidebar columns) if you don&#39;t have a position: relative tag around the sidebar you would set this to the fixedHeaderOffset and probably some margin say 18px.</p>
<p>Now we have the case where we&#39;re scrolling the bar down and we want it to be at the top of the viewport this is the else case. So the condition for this is scrollTo is shorter than the maximum allowed value AND scrollTo is further down than the header. Since the position of scrollTo includes the height of the header we need to subtract that off of the value of scrollTo and then subtract a little more so the sidebar sits 18px below the top of the page. If you don&#39;t have the position: relative container around the sidebar this would most likely just be the offset from the top of the page so scrollTo &#8211; 18px.</p>
<p>Unfortunately I don&#39;t have a demo for this but this should be very easy to test. I&#39;ll throw up a zip file with the html in it to let you test it out.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=298&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/09/01/using-jquery-to-create-a-scrolling-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>

		<media:content url="http://dotnetchris.files.wordpress.com/2009/09/layout.jpg" medium="image">
			<media:title type="html">layout</media:title>
		</media:content>
	</item>
		<item>
		<title>More Team Foundation Server Voodoo</title>
		<link>http://dotnetchris.wordpress.com/2009/08/04/more-team-foundation-server-voodoo/</link>
		<comments>http://dotnetchris.wordpress.com/2009/08/04/more-team-foundation-server-voodoo/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 20:28:18 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=288</guid>
		<description><![CDATA[After finally getting TFS installed I went to create my first project under it and was greeted with a new lovely error message:
TF30004: The New Team Project Wizard encountered an unexpected error while initializing the Microsoft.ProjectCreationWizard.Reporting plug-in. 
Explanation
TF30171: The Microsoft.ProjectCreationWizard.Reporting plug-in used to create the new team project could not be initialized and returned the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=288&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After finally getting TFS installed I went to create my first project under it and was greeted with a new lovely error message:</p>
<blockquote><p>TF30004: The New Team Project Wizard encountered an unexpected error while initializing the Microsoft.ProjectCreationWizard.Reporting plug-in. </p>
<p>Explanation<br />
TF30171: The Microsoft.ProjectCreationWizard.Reporting plug-in used to create the new team project could not be initialized and returned the following error: TF30224: Failed to retrieve projects from the report server. Please check that the SQL Server Reporting Services Web and Windows services are running and you have sufficient privileges for creating a project.. </p></blockquote>
<p>After alot of googling and reading the primary solution came down to reinstall Visual Studio 2008 SP1 again which I put off figuring there had to be a less voodoo solution to this but eventually broke down and tried it. Surprisingly that fixed <em>THIS</em> problem and then immediately I was confronted with <em>ANOTHER</em> problem.</p>
<p>Trying to view the created project on Windows Sharepoint the first thing that shows up is:</p>
<blockquote><p>An error has occurred during report processing. (rsProcessingAborted)<br />
Cannot create a connection to data source &#8216;TfsOlapReportDS&#8217;. (rsErrorOpeningConnection)<br />
For more information about this error navigate to the report server on the local server machine, or enable remote errors </p></blockquote>
<p>More google hoop jumping which buried deep down in this post on <a href="http://social.msdn.microsoft.com/forums/en-US/tfsreporting/thread/ec27e3de-1df6-4ed2-8296-9e42f10f8488/">How do I fix the TfsOlapReportDS user problem?</a> I saw a comment from MattPil29</p>
<blockquote><p>I had the same problem which was not solved by the &#8220;Allow log on locally&#8221; fix until I removed the same account from &#8220;Deny log on locally&#8221; !!!!
</p></blockquote>
<p>So I fixed that with:</p>
<p><code>NTRIGHTS -u TFSSERVICE -r SeDenyInteractiveLogonRight</code></p>
<p>Finally I have a successfully created Team Foundation Server project!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/288/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=288&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/08/04/more-team-foundation-server-voodoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash CS4 Publish to Gif file sucks</title>
		<link>http://dotnetchris.wordpress.com/2009/08/03/flash-cs4-publish-to-gif-file-sucks/</link>
		<comments>http://dotnetchris.wordpress.com/2009/08/03/flash-cs4-publish-to-gif-file-sucks/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:19:26 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=286</guid>
		<description><![CDATA[So today I had to convert a swf flash movie I made for an advertisement to an animated gif file so it could be added to an email newsletter and when I&#8217;d publish it using Flash CS4 it was just epic&#8230; fail. The fading/transparency effects would flicker massively, shift between colors that didn&#8217;t even exist [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=286&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So today I had to convert a swf flash movie I made for an advertisement to an animated gif file so it could be added to an email newsletter and when I&#8217;d publish it using Flash CS4 it was just epic&#8230; fail. The fading/transparency effects would flicker massively, shift between colors that didn&#8217;t even exist in the movie then when text would appear it just turned into a giant blob of black smear in my image.</p>
<p>How very useful&#8230;. NOT.</p>
<p>Luckily I found a program that just saved my day <a href="http://www.effectmatrix.com/swf2gif/index.htm">E.M. Magic Swf2Gif</a> I also tried a similar product from Aleosoft, <a href="http://www.aleosoft.com/swftogifconverter/index.html">Aleo SWF GIF Converter</a>. I&#8217;m not sure if this was related to the fact the Aleosoft is a limited functionality trial (watermarks output images)  but the resulting quality was substantially lower than E.M. Magic Swf2Gif. So if anyone else has issues with their Flash CS4 Gif publishing looking horrible I recommend taking a look at E.M. Magic Swf2Gif.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/286/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=286&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/08/03/flash-cs4-publish-to-gif-file-sucks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
		<item>
		<title>Team Foundation Dual Server Installation Headaches</title>
		<link>http://dotnetchris.wordpress.com/2009/07/17/team-foundation-dual-server-installation-headaches/</link>
		<comments>http://dotnetchris.wordpress.com/2009/07/17/team-foundation-dual-server-installation-headaches/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 16:18:58 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=282</guid>
		<description><![CDATA[Finally I was able to complete the installation of Team Foundation Server (TFS) successfully. I definitely ran into some major headaches along the way.
Firstly, you cannot install TFS on a Domain Controller (DC). This might be a semi-acknowledged limitation but I had no idea of this prior to my first attempt at installation. Working at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=282&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Finally I was able to complete the installation of Team Foundation Server (TFS) successfully. I definitely ran into some major headaches along the way.</p>
<p>Firstly, you cannot install TFS on a Domain Controller (DC). This might be a semi-acknowledged limitation but I had no idea of this prior to my first attempt at installation. Working at a small business we only have 2 servers, 1 being the DC. I&#8217;m lucky that I was able to have the other server to install it on in the first place and didn&#8217;t have to use my local machine.</p>
<p>Since Sql Server was installed on the DC as it&#8217;s the more powerful server this requires me to do a dual server setup (Sql Server on one machine and TFS application tier on another.) This isn&#8217;t even possible to do using the DVD image or media setup on it&#8217;s own. You will need to modify files on the install disk, more on that later.</p>
<p>Another fact I was unaware of is TFS cannot be installed with Sql Server 2008 out of box. The installation needs to have TFS Sp1 slip streamed into the the setup files. I find it rather daunting that I needed to research these options so far in depth to just complete an installation.</p>
<p>First extra steps that need to be done to configure your Sql Server 2008 machine to support TFS.</p>
<p>Change the Sql Server Reporting Services (SSRS) service from using the local system account to a domain account. This account must be configured with the privileges to log on locally, I named the account TFSREPORTS. After creating this account in the active directory you need to configure the rights on it. The easiest way is with the command prompt (start &lt; run &lt; &#8220;cmd&#8221; ) while still on the server.</p>
<p>NTRIGHTS -u TFSREPORTS +r SeInteractiveLogonRight</p>
<p>While your creating account information you should also create a domain account for TFS to use for it&#8217;s service interaction, this requires the Log On as a Service right. I named mined TFSSERVICE. To assign that logon right with NTRIGHTS.</p>
<p>NTRIGHTS -u TFSSERVICE +r SeServiceLogonRight</p>
<p>Now that you have these accounts created you need to either install Sql Server and Reporting Services and when you get to the SSRS configuration the install to designate the TFSREPORTS account to be the account to use. If you already have installed Sql Server + SSRS contrary to the install instructions with TFS you can not just change the account Sql Server Reporting Services using in the services.msc you actually need to use the &#8220;Reporting Services Configuration Manager.&#8221; By default there is a start menu entry for it under Start &lt; Programs &lt; Microsoft SQL Server 2008 \ Configuration Tools. Open the tool and connect to the server (most likely localhost, unless you&#8217;re doing it remotely) under the Service Account tree menu item check Use Another Account supply the account you created in DOMAIN\AccountName form along with the password you created for the account.</p>
<p>Following these steps either updating or your current install or installing new, now it&#8217;s time to update Sql Server 2008 to SP1 if it hasn&#8217;t already been done so before continuing on to the TFS installation.</p>
<p>At this point you need to dump the files from the TFS dvd image or media onto your hard drive. You will need to slipstream the TFS Sp1 release into your copy of regular TFS. This is included in the TFS documentation or you can view it online <a href="http://devcatharsis.blogspot.com/2009/02/how-to-integrate-installation-of-team.html">How to: Integrate the Installation of Team Foundation Server and Service Pack 1</a> on devCatharis.</p>
<p>Now you need to modify InstallMedia\AT\msiproperty.ini you need to configure the VSTF_RS_SERVER, VSTF_RS_REPORTS_URI, VSTF_RS_REPORTSERVER_URI. For detail information for setting these values you can view <a href="http://blogs.msdn.com/sudhir/archive/2007/09/10/reporting-services-flexibility-orcas-rtm-only.aspx">Reporting Services Flexibility (Orcas RTM Only)</a> by Microsoft MVP Sudhir Hasbe.</p>
<p>Now after all of these steps, you <em>SHOULD</em> be ready to install TFS as a dual server installation with Sql Server 2008 on a separate machine and have it complete successfully!</p>
<p>Does anyone else find this basically unacceptable to have to go through this long of a process to just <em>INSTALL</em> your copy of TFS? It sure ruined a few of my days.</p>
<p><code>BloggingContext.ApplicationInstance.CompleteRequest();</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/282/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=282&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/07/17/team-foundation-dual-server-installation-headaches/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s been a while!</title>
		<link>http://dotnetchris.wordpress.com/2009/06/25/its-been-a-while/</link>
		<comments>http://dotnetchris.wordpress.com/2009/06/25/its-been-a-while/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 14:10:31 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Off Topic]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=279</guid>
		<description><![CDATA[It&#8217;s definitely been a while since I updated my blog with a new post that&#8217;s going to change starting again today. While this one really won&#8217;t have any new content I just felt like adding some personal thoughts. After my last blog post my software development contract ended unexpectedly which left me with alot of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=279&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s definitely been a while since I updated my blog with a new post that&#8217;s going to change starting again today. While this one really won&#8217;t have any new content I just felt like adding some personal thoughts. After my last blog post my software development contract ended unexpectedly which left me with alot of free time other than searching for a new contract to work on. My first thoughts were great, a vacation! Which I used to enjoy a few weeks of my time without having to do anything specific which I haven&#8217;t had in my life since probably high school during the summer.  After stepping back for a few weeks I did some casual development on StructuredWeb at home for a little while then started slacking on that. It really is hard to stay focused on the technology world when you&#8217;re not exposed to it every day at work especially since software development (especially when done well) isn&#8217;t easy and takes alot of will and drive to accomplish, well that ends today.</p>
<p>This Monday I started a new position at a small Insurance company / marketing firm to be their lead architect to drive their technology usage and provide them strategic applications far above their previous piecemeal approach with using some outside contracts for their website. I&#8217;m really looking forward to this because finally I don&#8217;t have to answer or justify using new technology or different technology (to an extent atleast) for solving software problems. Nothing has ever bothered me more in previous jobs at larger companies where most developers just choose mediocrity at best, or to be abysmal at worst and just don&#8217;t care to learn anything new as developers and to just apply bad practices to problems because that&#8217;s what they&#8217;re familiar with.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=279&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/06/25/its-been-a-while/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a generic Model-View-Presenter framework</title>
		<link>http://dotnetchris.wordpress.com/2009/02/16/creating-a-generic-model-view-presenter-framework/</link>
		<comments>http://dotnetchris.wordpress.com/2009/02/16/creating-a-generic-model-view-presenter-framework/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 03:54:31 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[StructuredWeb]]></category>
		<category><![CDATA[Dependency Injection]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Inversion of Control]]></category>
		<category><![CDATA[Model View Presenter]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[Object Oriented Design]]></category>
		<category><![CDATA[Patterns]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=268</guid>
		<description><![CDATA[With all of the current talk about ASP.NET MVC it seem dated to bring up the model view presenter architecture but I still believe it&#8217;s a very strong pattern in separating UI logic from application design. This post is meant to offer a successor to the Web Client Software Factory (WCSF) framework provided by Microsoft. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=268&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>With all of the current talk about ASP.NET MVC it seem dated to bring up the model view presenter architecture but I still believe it&#8217;s a very strong pattern in separating UI logic from application design. This post is meant to offer a successor to the Web Client Software Factory (WCSF) framework provided by Microsoft. In last usage of WCSF I encountered numerous errors stemming from ObjectBuilder during the dependency injection of WCSF which is what lead me down the road of creating UnityWeb which has evolved into StructuredWeb. The rest of this post will include no specific dependencies except 1 to <a href="http://dotnetchris.wordpress.com/structuredweb/">StructureMap </a>to handle the actual resolution of objects through dependency injection. This could be very easily replaced by Unity or any other inversion of control framework that supports the BuildUp() method. For a framework that does not support a BuildUp operation it will make things more complicated and that will need to be solved by your case basis.</p>
<p>Firstly, what is the model-view-presenter (MVP) pattern? The View is defined as an interface that the Presenter will use for getting and setting data to and from the Model. The View implementation will instantiate the Presenter object and provide a reference to itself (the formal constructor parameter is the View interface while the actual parameter is a concrete View class). When the event methods of the View are triggered, they will do nothing but invoke a method of the Presenter which has no parameters and no return value. The Presenter will then get data from the View, through the View interface variable that the Presenter stored when the constructor was called. The Presenter then invokes methods of the Model, and sets data from the Model into the View through the View interface.</p>
<p>From a layering point of view, the Presenter class might be considered as belonging to the application layer in a multilayered architectured object-oriented system with common layers but it can also be seen as a Presenter layer of its own between the Application layer and the User Interface layer. </p>
<p>Now if you&#8217;re at all like me you will have almost no more of an idea what the MVP pattern is supposed to do after that explanation. To generalize on that statement it&#8217;s basically taking the interaction of the UI and the application logic which usually is coupled together and separating it into 3 areas.</p>
<p>The model &#8211; this is the application logic which will be housed in controller classes.</p>
<p>The view &#8211; which is an interface which abstracts the UI away, all data sent and retrieved from the UI is done through this interface</p>
<p>The presenter &#8211; this is a mediator that negotiates how the UI and application logic interact. The view is also a composition of this class.</p>
<p>Starting with the view:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> interface IView
{
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>This is the most basic of the basic of interfaces, for my needs it&#8217;s purely a <a href="http://en.wikipedia.org/wiki/Marker_interface_pattern">marker interface</a>. If every single one of your pages shares a common property perhaps an event message collection this would be a good place to define a property for it.</p>
<p>The presenter class:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> abstract <span style="color:blue;">class</span> Presenter&lt;TView&gt; where TView : IView
{
    <span style="color:blue;">public</span> TView View { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }

    <span style="color:blue;">public</span> virtual <span style="color:blue;">void</span> OnViewInitialized()
    {
    }

    <span style="color:blue;">public</span> virtual <span style="color:blue;">void</span> OnViewLoaded()
    {
    }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>The OnViewInitialized method is to represent any operations you would execute in Page_Load if(Page.IsPostback == false) so only on the initial page load. The OnViewLoaded method represents all page loads whether or not they are post backs. Currently I have no global page operations since I have no global view properties. This class is also constrainted that</p>
<p>Next creating a view:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> interface IEmployeeView: IView
{
    IList&lt;Employee&gt; Employees { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
    IList&lt;Employee&gt; EmployeesListDatasource { <span style="color:blue;">set</span>; }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>As you can see my view will have 2 properties one for getting or setting a collection and another for setting only the same type. The view also implements the marker interface IView.</p>
<p>Creating the presenter:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> EmployeePresenter : Presenter&lt;IEmployeeView&gt;
{
    <span style="color:blue;">private</span> readonly IEmployeeController _controller;

    <span style="color:blue;">public</span> EmployeePresenter(IEmployeeController controller)
    {
        _controller = controller;
    }

    <span style="color:blue;">public</span> override <span style="color:blue;">void</span> OnViewInitialized()
    {
        View.Employees = _controller.GetEmployees();
    }

    <span style="color:blue;">public</span> override <span style="color:blue;">void</span> OnViewLoaded()
    {
        View.EmployeesListDatasource = View.Employees;
    }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>I&#8217;m not going to go into the details of the IEmployeeController this is the &#8220;model&#8221; where actual application code is ran there is nothing special about this class or it&#8217;s interface and only contains logic specific to getting my set of employees. As you can see the EmployeePresenter implements Presenter. I overrided both of the methods provided by the Presenter base where the Initialize method gets list from the model and the loaded method binds the list to a datasource.</p>
<p>Now before I move onto implementing the IEmployeeView inside a page I&#8217;m going to create an abstract base page that will handle the dependency injection build up for my MVP framework.</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> abstract <span style="color:blue;">class</span> ViewBasePage&lt;TPresenter, TView&gt; : Page
    where TPresenter : Presenter&lt;TView&gt;
    where TView : IView
{
    <span style="color:blue;">protected</span> TPresenter _presenter;

    <span style="color:blue;">public</span> TPresenter Presenter
    {
        <span style="color:blue;">set</span>
        {
            _presenter = value;
            _presenter.View = GetView();
        }
    }

    <span style="color:green;">/// &lt;summary&gt;</span>
    <span style="color:green;">/// Gets the view. This will get the page during the ASP.NET</span>
    <span style="color:green;">/// life cycle where the physical page inherits the view</span>
    <span style="color:green;">/// &lt;/summary&gt;</span>
    <span style="color:green;">/// &lt;returns&gt;&lt;/returns&gt;</span>
    <span style="color:blue;">private</span> <span style="color:blue;">static</span> TView GetView()
    {
        <span style="color:blue;">return</span> (TView) HttpContext.Current.Handler;
    }

    <span style="color:blue;">protected</span> override <span style="color:blue;">void</span> OnPreInit(EventArgs e)
    {
        ObjectFactory.BuildUp(<span style="color:blue;">this</span>);
        <span style="color:blue;">base</span>.OnPreInit(e);
    }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>This class might look quite a bit strange, the majority of it is from the class definition it&#8217;s setup to only allow you to inherit it in a valid way such as: ViewBasePage&lt;EmployeePresenter,IEmployeeView&gt;. On the Presenter set method this is where the page actually becomes part of the composition of the Presenter (the description from Wikipedia said this).</p>
<p>The GetView method also probably looks strange what this is doing is getting the physical page that&#8217;s being instantiated by ASP.NET. The reason I&#8217;m doing this is it makes it easier to reference the page generically otherwise I would be required to do something smilar to</p>
<p>return (TView) (object) this</p>
<p>Which is borderline wrong since THIS technically refers to the ViewBasePage which does not implement the interface that TView consists of but at runtime eventually resolves correctly since a Page will implement the interface that makes up TView and not cause a runtime error.</p>
<p>This class overrides Page&#8217;s OnPreInit method to call ObjectFactory.BuildUp() which will cause all the dependency resolution to take place. In my specific usage of StructureMap I have it identify all Presenter properties as targets for dependency injection, in your case you may be required to use the [Setter] attribute from SturctureMap or the [Dependency] attribute from Unity or some other similar convention in other inversion of control frameworks.</p>
<p>Now finally onto the actual page.</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> partial <span style="color:blue;">class</span> _Default :
    ViewBasePage&lt;EmployeePresenter, IEmployeeView&gt;, IEmployeeView
{
    <span style="color:blue;">protected</span> <span style="color:blue;">void</span> Page_Load(object sender, EventArgs e)
    {
        <span style="color:blue;">if</span> (!Page.IsPostBack)
        {
            _presenter.OnViewInitialized();
        }

        _presenter.OnViewLoaded();
        Page.DataBind();
    }

    #region Implementation of IEmployeeView

    IList&lt;Employee&gt; IEmployeeView.Employees
    {
        <span style="color:blue;">get</span> { <span style="color:blue;">return</span> ViewState["IEmployeeView.Employees"] as IList&lt;Employee&gt;; }
        <span style="color:blue;">set</span> { ViewState["IEmployeeView.Employees"] = value; }
    }

    IList&lt;Employee&gt; IEmployeeView.EmployeesListDatasource
    {
        <span style="color:blue;">set</span> { lstEmployees.DataSource = value; }
    }

    #endregion
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>This class inherits the ViewBasePage class and implements the IEmployeeView. The _presenter field is in the ViewBasePage and contains the fully resolved dependency to EmployeePresenter. As I stated in the portion of the presenter code you can see where OnViewInitialized() and OnViewLoaded() are called inside the page life cycle.</p>
<p>Implementing the IEmployeeView you have the properties target actual controls on the page or the ViewState / QueryString etc that is available to the page. Now if you remember the code in my actual EmployeePresenter it should make sense why in ViewInitialized the Employees property is set by the controller and on the ViewLoaded the Employees property is assigned to the EmployeesListDatasource since it&#8217;s just refreshing the data source to the view state collection on subsequent page post backs.</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetchris.wordpress.com%2f2009%2f02%2f16%2fcreating-a-generic-model-view-presenter-framework%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetchris.wordpress.com%2f2009%2f02%2f16%2fcreating-a-generic-model-view-presenter-framework%2f&amp;bgcolor=0066FF" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<p><a rev="vote-for" href="http://dotnetshoutout.com/Creating-a-generic-Model-View-Presenter-framework-dotNetChris-Marisicnet"><img style="border:0;" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetchris.wordpress.com%2F2009%2F02%2F16%2Fcreating-a-generic-model-view-presenter-framework%2F" alt="Shout it" /></a></p>
<p><code>BloggingContext.ApplicationInstance.CompleteRequest();</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/268/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=268&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/02/16/creating-a-generic-model-view-presenter-framework/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetchris.wordpress.com%2f2009%2f02%2f16%2fcreating-a-generic-model-view-presenter-framework%2f&#38;bgcolor=0066FF" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetchris.wordpress.com%2F2009%2F02%2F16%2Fcreating-a-generic-model-view-presenter-framework%2F" medium="image">
			<media:title type="html">Shout it</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a generic validation framework</title>
		<link>http://dotnetchris.wordpress.com/2009/02/11/creating-a-generic-validation-framework/</link>
		<comments>http://dotnetchris.wordpress.com/2009/02/11/creating-a-generic-validation-framework/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 22:25:07 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[StructuredWeb]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=260</guid>
		<description><![CDATA[Recently in a few discussions of system architecture I have brought up adamant complaints about coupling validation logic to your domain objects. This weekend Thomas Mayfield contacted me on how I would go about implementing this in a domain driven designed system. Initially I got sidetracked over what tool I would use for my rules [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=260&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently in a few discussions of system architecture I have brought up adamant complaints about coupling validation logic to your domain objects. This weekend Thomas Mayfield contacted me on how I would go about implementing this in a domain driven designed system. Initially I got sidetracked over what tool I would use for my rules engine and I&#8217;ve still not concluded which would be best so I went about creating my Validation layer and decided to leave the specific details of creating validation logic for later.</p>
<p>As always I start with an interface. In this case it ends up being a very simple interface.</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> interface IValidator&lt;T&gt;
{
    ValidationResult Validate(T obj);
    ValidationResult Validate(T obj, <span style="color:blue;">bool</span> suppressWarnings);
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>Basically I want this service to take in an object and validate it, and then return to me whether it&#8217;s valid and any warnings or error messages associated with the validation. Which lead me to creating a ValidationResult class (in lieu of the similarly named class in the Enterprise Library validation block).</p>
<p>First I created a very simple ValidationMessage class:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> sealed <span style="color:blue;">class</span> ValidationMessage
{
    <span style="color:blue;">public</span> <span style="color:blue;">string</span> Message { <span style="color:blue;">get</span>; internal <span style="color:blue;">set</span>; }
    <span style="color:blue;">public</span> <span style="color:blue;">bool</span> Warning { <span style="color:blue;">get</span>; internal <span style="color:blue;">set</span>; }

    <span style="color:green;">//Only allow creation internally or by ValidationResult class.</span>
    internal ValidationMessage()
    {
    }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>The ValidationResult class is a little more complex:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> sealed <span style="color:blue;">class</span> ValidationResult
{
    <span style="color:blue;">private</span> <span style="color:blue;">bool</span> _dirty = <span style="color:blue;">true</span>;
    <span style="color:blue;">private</span> <span style="color:blue;">bool</span> _valid;

    <span style="color:blue;">public</span> <span style="color:blue;">bool</span> Valid
    {
        <span style="color:blue;">get</span>
        {
            <span style="color:green;">//theoretically O(n) time but in pratice will be constant time</span>
            <span style="color:green;">//Still, no need for multiple traversals, Traverse only if it's changed</span>
            <span style="color:blue;">if</span> (_dirty)
            {
                _valid = Messages.FirstOrDefault(msg =&gt; msg.Warning == <span style="color:blue;">false</span>) == <span style="color:blue;">null</span>;
                _dirty = <span style="color:blue;">false</span>;
            }

            <span style="color:blue;">return</span> _valid;
        }
    }

    <span style="color:blue;">public</span> ValidationResult()
    {
        Messages = <span style="color:blue;">new</span> List&lt;ValidationMessage&gt;();
    }

    <span style="color:blue;">public</span> IList&lt;ValidationMessage&gt; Messages { <span style="color:blue;">get</span>; internal <span style="color:blue;">set</span>; }

    <span style="color:green;">/// &lt;summary&gt;</span>
    <span style="color:green;">/// Adds the error. </span>
    <span style="color:green;">/// &lt;/summary&gt;</span>
    <span style="color:green;">/// &lt;param name="errorMessage"&gt;The error message.&lt;/param&gt;</span>
    <span style="color:blue;">public</span> <span style="color:blue;">void</span> AddError(<span style="color:blue;">string</span> errorMessage)
    {
        _dirty = <span style="color:blue;">true</span>;
        Messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = errorMessage});
    }

    <span style="color:green;">/// &lt;summary&gt;</span>
    <span style="color:green;">/// Adds the warning. </span>
    <span style="color:green;">/// &lt;/summary&gt;</span>
    <span style="color:green;">/// &lt;param name="warningMessage"&gt;The warning message.&lt;/param&gt;</span>
    <span style="color:blue;">public</span> <span style="color:blue;">void</span> AddWarning(<span style="color:blue;">string</span> warningMessage)
    {
        <span style="color:green;">//No need to mark collection dirty since warnings never generate validation changes</span>
        Messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = warningMessage, Warning = <span style="color:blue;">true</span>});
    }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>Basically the only tricks to this class is that I only allow the creation of the internal list of ValidationMessages to be handled by the same assembly. I also appended factory methods to allow manual insertion of errors or warnings. The reason for this is in my workings with EntLib VAB was that the results were inflexible in letting me append some messages myself and then roll the results down to the screen. This resulted in me having to create marshaling  classes to just transfer the messages from the results to a collection that I could add more information to.</p>
<p>Implementing a concrete validator, the EmployeeValidator:</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> EmployeeValidator : IValidator&lt;Employee&gt;
{
    #region Implementation of IValidation&lt;Employee&gt;

    <span style="color:blue;">public</span> ValidationResult Validate(Employee employee)
    {
        <span style="color:blue;">return</span> Validate(employee, <span style="color:blue;">false</span>);
    }

    <span style="color:blue;">public</span> ValidationResult Validate(Employee employee, <span style="color:blue;">bool</span> suppressWarnings)
    {
        var result = <span style="color:blue;">new</span> ValidationResult();

        <span style="color:green;">//This code here would be replaced with a validation rules engine later</span>

        <span style="color:blue;">if</span> (employee != <span style="color:blue;">null</span>)
        {
            <span style="color:blue;">if</span> (!suppressWarnings &amp;&amp; employee.HireDate &gt; DateTime.Now)
                result.Messages.Add(<span style="color:blue;">new</span> ValidationMessage {
                    Message = <span style="color:blue;">string</span>.Format("Employee hire date: {0} is <span style="color:blue;">set</span> <span style="color:blue;">in</span> the future.", employee.HireDate),
                    Warning = <span style="color:blue;">true</span>});

            <span style="color:blue;">if</span> (employee.Person != <span style="color:blue;">null</span>)
            {
                <span style="color:blue;">if</span> (<span style="color:blue;">string</span>.IsNullOrEmpty(employee.Person.FirstName))
                    result.Messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = "Employee FirstName is required."});
                <span style="color:blue;">if</span> (<span style="color:blue;">string</span>.IsNullOrEmpty(employee.Person.LastName))
                    result.Messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = "Employee LastName is required."});
            }
            <span style="color:blue;">else</span>
                result.Messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = "Employee person data is missing."});
        }
        <span style="color:blue;">else</span>
            result.Messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = "Employee data is missing."});

        <span style="color:blue;">return</span> result;
    }

    #endregion
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>Nothing really complicated goes on here just simple very basic validation code that rolls in error messages if needed. This area here would be replaced by a ruleset engine later on, for myself atleast. Otherwise you could do any validation you wanted here.</p>
<p>Now to actually validate your objects I created a ValidationFactory method also simliar to the VAB.</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">class</span> ValidationFactory
{
    <span style="color:blue;">public</span> <span style="color:blue;">static</span> ValidationResult Validate&lt;T&gt;(T obj)
    {
        <span style="color:blue;">try</span>
        {
            var validator = ObjectFactory.GetInstance&lt;IValidator&lt;T&gt;&gt;();
            <span style="color:blue;">return</span> validator.Validate(obj);
        }
        <span style="color:blue;">catch</span> (Exception ex)
        {
            var messages = <span style="color:blue;">new</span> List&lt;ValidationMessage&gt; {<span style="color:blue;">new</span> ValidationMessage {
                Message = <span style="color:blue;">string</span>.Format("Error validating {0}", obj)}};

            messages.AddRange(FlattenError(ex));

            var result = <span style="color:blue;">new</span> ValidationResult {Messages = messages};
            <span style="color:blue;">return</span> result;
        }
    }

    <span style="color:blue;">private</span> <span style="color:blue;">static</span> IEnumerable&lt;ValidationMessage&gt; FlattenError(Exception exception)
    {
        var messages = <span style="color:blue;">new</span> List&lt;ValidationMessage&gt;();
        var currentException = exception;

        do
        {
            messages.Add(<span style="color:blue;">new</span> ValidationMessage {Message = exception.Message});
            currentException = currentException.InnerException;
        } <span style="color:blue;">while</span> (currentException != <span style="color:blue;">null</span>);

        <span style="color:blue;">return</span> messages;
    }
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>Once again beauty comes with simplicity I take advantage of StructureMap to handle my dependency injection with the GetInstance method. Then just call Validate. I added a helper method that will allow me to roll out a complex exception message (most likely it&#8217;d only ever be you forgot to register a validator for some type) if any occur.</p>
<p>Registering this for StructureMap  is extremely simple inside you registry setup for SM you would just add</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;">ForRequestedType&lt;IValidator&lt;Employee&gt;&gt;().TheDefaultIsConcreteType&lt;EmployeeValidator&gt;();
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>And then onto a quick usage example</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;">[Test]
<span style="color:blue;">public</span> <span style="color:blue;">void</span> InvalidEmployeeTest()
{
    var employee = <span style="color:blue;">new</span> Employee {Person = <span style="color:blue;">new</span> Person {FirstName = <span style="color:blue;">string</span>.Empty, LastName = <span style="color:blue;">string</span>.Empty}};

    var results = ValidationFactory.Validate(employee);

    Assert.IsNotNull(results);
    Assert.IsFalse(results.Valid);
    Assert.IsTrue(results.Messages.Count &gt; 0);
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p>At this point you have en entirely decoupled validation framework that will allow you to validate your objects with any kit, ruleset engine, or static validation you wish. Now if you wondered where I would put this in my architecture I would have it validate at the presenter level right after the screen scrape of data.</p>
<table border="1" cellpadding="16" bgcolor="white">
<tbody>
<tr>
<td>
<pre><span style="font-family:Courier New;color:black;font-size:small;"><span style="color:blue;">public</span> <span style="color:blue;">bool</span> SaveEmployee()
{
    var employee = View.Employee;

    var results = ValidationFactory.Validate(employee);

    <span style="color:blue;">if</span> (results.Valid)
        _controller.SaveEmployee(employee);
    <span style="color:blue;">else</span>
        View.Errors = results.Messages;
}
</span></pre>
</td>
</tr>
</tbody>
</table>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetchris.wordpress.com%2f2009%2f02%2f11%2fcreating-a-generic-validation-framework%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetchris.wordpress.com%2f2009%2f02%2f11%2fcreating-a-generic-validation-framework%2f&amp;bgcolor=0066FF" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<p><a rev="vote-for" href="http://dotnetshoutout.com/Creating-a-generic-validation-framework"><img style="border:0;" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetchris.wordpress.com%2F2009%2F02%2F11%2Fcreating-a-generic-validation-framework%2F" alt="Shout it" /></a></p>
<p><code>BloggingContext.ApplicationInstance.CompleteRequest();</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/260/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=260&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/02/11/creating-a-generic-validation-framework/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetchris.wordpress.com%2f2009%2f02%2f11%2fcreating-a-generic-validation-framework%2f&#38;bgcolor=0066FF" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdotnetchris.wordpress.com%2F2009%2F02%2F11%2Fcreating-a-generic-validation-framework%2F" medium="image">
			<media:title type="html">Shout it</media:title>
		</media:content>
	</item>
		<item>
		<title>20,000 views!</title>
		<link>http://dotnetchris.wordpress.com/2009/02/03/20000-views/</link>
		<comments>http://dotnetchris.wordpress.com/2009/02/03/20000-views/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 13:49:41 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Off Topic]]></category>
		<category><![CDATA[20000 views]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=254</guid>
		<description><![CDATA[Wow, I honestly feel pride. A year ago when I started my blog I never imagined this is where it would be at today. At first I started it to share the information I learned about the problems I faced with Oracle since I spent over 3 days trying to accomplish a simple task of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=254&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Wow, I honestly feel pride. A year ago when I started my blog I never imagined this is where it would be at today. At first I started it to share the information I learned about the problems I faced with Oracle since I spent over 3 days trying to accomplish a simple task of writing an xml string to oracle over 2,000 characters! When I initially wrote that post, my blog had the only conclusive answer that I could find as I had to spend lots of time searching both java and microsoft forums related to oracle to get any information.</p>
<p>Since then I&#8217;ve watched my blog grow from a handful of visitors and a few comments to 20,000 views and over 100 comments. I want to thank everyone of you that&#8217;s taken the time to read any of rantings or design ideas and I especially want to thank every person that has taken the time to offer input on anything I&#8217;ve wrote. See you all again at 50,000!</p>
<p><code>BloggingContext.ApplicationInstance.CompleteRequest();</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=254&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/02/03/20000-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
		<item>
		<title>StructuredWeb Alpha 1</title>
		<link>http://dotnetchris.wordpress.com/2009/02/03/structuredweb-alpha-1/</link>
		<comments>http://dotnetchris.wordpress.com/2009/02/03/structuredweb-alpha-1/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 05:14:34 +0000</pubDate>
		<dc:creator>dotnetchris</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[StructuredWeb]]></category>
		<category><![CDATA[Dependency Injection]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[Fluent-Nhibernate]]></category>
		<category><![CDATA[Inversion of Control]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[Model View Presenter]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[nHibernate]]></category>
		<category><![CDATA[Object Orientated Design]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Practices]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[Seperation of Concerns]]></category>
		<category><![CDATA[StructuredMap]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://dotnetchris.wordpress.com/?p=251</guid>
		<description><![CDATA[After my long road down the rabbit hole of object orientated design, inversion of control, NHibernate, Fluent NHibernate I&#8217;ve finally reached a point where I feel my codebase is stable enough to almost warrant my beta 1 release. I switched from Unity as my DI container to StructureMap and definitely feel this was a good [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=251&subd=dotnetchris&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After my long road down the rabbit hole of object orientated design, inversion of control, NHibernate, Fluent NHibernate I&#8217;ve finally reached a point where I feel my codebase is stable enough to almost warrant my beta 1 release. I switched from Unity as my DI container to StructureMap and definitely feel this was a good call especially the timing of the 2.5.3 release of StructureMap where it natively includes the BuildUp method and natively includes the functionality I had to add with custom lifetime managers for wrapping my objects into the HttpContext and HtttpSession.</p>
<p>Just recently I published my implementation of Business Conversation per Transaction session management along with my repository pattern I followed for StructuredWeb. I still haven&#8217;t gotten my second level caching for NHibernate running yet but that will on slate for Beta 2.</p>
<p>See my <a href="http://dotnetchris.wordpress.com/structuredweb-installation/">StructuredWeb Installation</a> page for details for setting it up.</p>
<p>This still needs a little bit of work for me to qualify it as a beta but since I checked everything into Assembla I figured I&#8217;d announce it&#8217;s alpha release since the code is already available online.</p>
<p><code>BloggingContext.ApplicationInstance.CompleteRequest();</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dotnetchris.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dotnetchris.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dotnetchris.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dotnetchris.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dotnetchris.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dotnetchris.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dotnetchris.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dotnetchris.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dotnetchris.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dotnetchris.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dotnetchris.wordpress.com&blog=3411356&post=251&subd=dotnetchris&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dotnetchris.wordpress.com/2009/02/03/structuredweb-alpha-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f0e7c2d0d5d83c928cfcfce66928160e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dotnetchris</media:title>
		</media:content>
	</item>
	</channel>
</rss>