<?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/"
	>

<channel>
	<title>James Crisp &#187; C#</title>
	<atom:link href="http://jamescrisp.org/category/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamescrisp.org</link>
	<description>C#, .NET, Ruby, Rails, book reviews, mind hacks, Wing Chun and the occasional personal bit.</description>
	<lastBuildDate>Mon, 26 Nov 2012 23:23:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>nRake Microsoft Case Study</title>
		<link>http://jamescrisp.org/2010/11/27/nrake-microsoft-case-study/</link>
		<comments>http://jamescrisp.org/2010/11/27/nrake-microsoft-case-study/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 02:20:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/?p=318</guid>
		<description><![CDATA[nRake is now the subject of a Microsoft case study. Check it out here: Microsoft Case Study on nRake in PDF format UPDATE: Now on the Microsoft Case Study site.]]></description>
				<content:encoded><![CDATA[<p><a href="https://github.com/jcrisp/nRake">nRake</a> is now the subject of a Microsoft case study. Check it out here:</p>
<ul>
<li><a href="http://jamescrisp.org/wordpress/wp-content/uploads/2010/11/MSCaseStudy.pdf">Microsoft Case Study on nRake in PDF format</a></li>
</ul>
<p><b>UPDATE:</b> Now on the <a href="http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?CaseStudyID=4000008831">Microsoft Case Study site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/11/27/nrake-microsoft-case-study/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby 1.8 Scoping and Blocks</title>
		<link>http://jamescrisp.org/2010/10/23/ruby-scoping-and-blocks/</link>
		<comments>http://jamescrisp.org/2010/10/23/ruby-scoping-and-blocks/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 00:02:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/?p=278</guid>
		<description><![CDATA[Quick ruby quiz.. after these two lines execute, what is the value of number? >> number = 5 >> (1..10).each {&#124;number&#124; print number} Well, number will be 10, thanks to the block being run and re-assigning the value of number. This can cause you some pretty subtle bugs if you happen to have the same [...]]]></description>
				<content:encoded><![CDATA[<p>Quick ruby quiz.. after these two lines execute, what is the value of number?</p>
<p>>> number = 5<br />
>> (1..10).each {|number| print number}</p>
<p>Well, number will be 10, thanks to the block being run and re-assigning the value of number. This can cause you some pretty subtle bugs if you happen to have the same name for a local/function argument, and as a variable name in a block.</p>
<p>In C#, the compiler is kind enough to tell you that this would be a very bad idea and give you an error.</p>
<p>And thanks to Sudhinda for commenting - this has been fixed in Ruby 1.9. In 1.9, the variable used as the argument in the block does not affect the variable outside the block.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/10/23/ruby-scoping-and-blocks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Azure Build and Deploy using Powershell</title>
		<link>http://jamescrisp.org/2010/08/15/azure-build-and-deploy-using-powershell/</link>
		<comments>http://jamescrisp.org/2010/08/15/azure-build-and-deploy-using-powershell/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 09:30:20 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/?p=248</guid>
		<description><![CDATA[Started working with Windows Azure? Want to have automated build and deploy, rather than clicking around in a web console or Visual Studio? Check out the AzureBuildDeploy repository on GitHub. I set this up for an Azure proof of concept project. It contains Powershell scripts for simple automated packaging, build and deploy, and a dummy [...]]]></description>
				<content:encoded><![CDATA[<p>Started working with Windows Azure? Want to have automated build and deploy, rather than clicking around in a web console or Visual Studio?</p>
<p>Check out the <a href="http://github.com/jcrisp/AzureBuildDeploy">AzureBuildDeploy repository</a> on GitHub.</p>
<p>I set this up for an Azure proof of concept project. It contains Powershell scripts for simple automated packaging, build and deploy, and a dummy WCF application for deployment to the cloud. The WCF application can however be easily replaced with a web application or what ever other .NET application you would like to host in the cloud.</p>
<p><strong>How to use</strong></p>
<ul>
<li>Clone or download the source from <a href="http://github.com/jcrisp/AzureBuildDeploy">http://github.com/jcrisp/AzureBuildDeploy</a></li>
<li>Update the $serviceName at the top of build-package-deploy.ps1</li>
<li>Update the certificate details, and subscription id at the top of deploy.ps1</li>
<li>If you plan to use SqlAzure (as in my proof of concept), update the connection details in HelloWorldService.svc.cs. If you don't plan to use SqlAzure, just stub out the whole FindFirstGreetingUsingSqlAzure() method by returning a string.
<li>Test out deployment to the cloud (run build-package-deploy.ps1). You can ensure it is working using the sample client in the repository. </li>
<li>Now you've got everything working, replace the dummy WCF application with whatever you want.</li>
</ul>
<p><strong>Notes</strong><br />
In my experience, the deployment of a simple application via these scripts, Visual Studio or the console takes about 16 minutes, from start of deploy to the service able to accept clients. This is extremely slow - I hope it improves!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/08/15/azure-build-and-deploy-using-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ACS Alm Talk: Presentation Wrap Up &amp; Slides</title>
		<link>http://jamescrisp.org/2010/06/03/acs-alm-talk-presentation-wrap-up-slides/</link>
		<comments>http://jamescrisp.org/2010/06/03/acs-alm-talk-presentation-wrap-up-slides/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 01:52:03 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2010/06/03/acs-alm-talk-presentation-wrap-up-slides/</guid>
		<description><![CDATA[Thanks everyone who came along last night. It was a fun session, with a lot of lively discussion, especially around project management and software design. As mentioned during the talk, you might want to check out nRake for .NET builds and psDeploy for Powershell deployments. Here are the slides from the talk. If you have [...]]]></description>
				<content:encoded><![CDATA[<p>Thanks everyone who came along last night. It was a fun session, with a lot of lively discussion, especially around project management and software design. As mentioned during the talk, you might want to check out <a href="http://github.com/jcrisp/nRake">nRake for .NET builds</a> and <a href="http://wiki.github.com/rprieto/psDeploy/">psDeploy for Powershell deployments</a>. <a href="http://jamescrisp.org/wordpress/wp-content/uploads/2010/06/alm_acs.pptx">Here are the slides from the talk</a>. If you have any more questions or areas to discuss, please feel free to <a href="http://jamescrisp.org/contact">drop me a line</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/06/03/acs-alm-talk-presentation-wrap-up-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ACS Talk: The Ultimate ALM Environment (circa 2010)</title>
		<link>http://jamescrisp.org/2010/05/31/acs-talk-the-ultimate-alm-environment-circa-2010/</link>
		<comments>http://jamescrisp.org/2010/05/31/acs-talk-the-ultimate-alm-environment-circa-2010/#comments</comments>
		<pubDate>Mon, 31 May 2010 01:22:40 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2010/05/31/acs-talk-the-ultimate-alm-environment-circa-2010/</guid>
		<description><![CDATA[I'll be giving a presentation at an Australian Computer Society Special Interest Group on Wed 2 June, 6:30pm. More details here. The abstract is: Application Lifecycle Management (ALM) covers the whole software development lifecycle and associated processes including project management, business analysis, testing, build and deploy and development. Based on experiences in the field on [...]]]></description>
				<content:encoded><![CDATA[<p>I'll be giving a presentation at an Australian Computer Society Special Interest Group on Wed 2 June, 6:30pm. More <a href="http://www.acs.org.au/nsw/index.cfm?action=event&#038;area=9001&#038;temID=eventdetails&#038;eveID=30167469003491">details here</a>.</p>
<p>The abstract is:</p>
<p><i>Application Lifecycle Management (ALM) covers the whole software development lifecycle and associated processes including project management, business analysis, testing, build and deploy and development. Based on experiences in the field on projects with ThoughtWorks and consulting with other teams, I will describe what I consider to be the ultimate ALM environment, using an agile approach and techniques. This talk will cover goals, assessment criteria, practices, tools, and physical workspace design.</i></p>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/05/31/acs-talk-the-ultimate-alm-environment-circa-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nRake now on IronRuby</title>
		<link>http://jamescrisp.org/2010/05/25/nrake-now-on-ironruby/</link>
		<comments>http://jamescrisp.org/2010/05/25/nrake-now-on-ironruby/#comments</comments>
		<pubDate>Tue, 25 May 2010 04:46:06 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2010/05/25/nrake-now-on-ironruby/</guid>
		<description><![CDATA[nRake, the premier project and build template for .NET projects using the Rake build system now has a branch for .NET4 using IronRuby. Projects are also updated to VS2010 format, and Albacore gems are now updated to 0.1.5. Check out the IronRuby .NET 4 branch of nRake. or the check out the IronRuby .NET 2 [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://github.com/jcrisp/nRake">nRake</a>, the premier project and build template for .NET projects using the Rake build system now has a branch for .NET4 using <a href="http://ironruby.net/">IronRuby</a>. Projects are also updated to VS2010 format, and <a href="http://github.com/derickbailey/Albacore">Albacore gems</a> are now updated to 0.1.5.</p>
<p>Check out the <a href="http://github.com/jcrisp/nRake/tree/IronRuby4">IronRuby .NET 4 branch of nRake</a>.</p>
<p>or the check out the <a href="http://github.com/jcrisp/nRake/tree/IronRuby2">IronRuby .NET 2 / 3.5 branch of nRake</a>.</p>
<p>Master branch is still using MRI ruby 1.9. However, plans are to change over to IronRuby for master branch in the future. IronRuby is now performing well enough and sufficiently compatible to support .NET builds. IronRuby has advantages around size (smaller download) and more exciting interop possibilities with .NET code.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/05/25/nrake-now-on-ironruby/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Podcast from ALM Conference</title>
		<link>http://jamescrisp.org/2010/04/27/podcast-from-alm-conference/</link>
		<comments>http://jamescrisp.org/2010/04/27/podcast-from-alm-conference/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 00:18:33 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2010/04/27/podcast-from-alm-conference/</guid>
		<description><![CDATA[At the ALM Conference, Richard interviewed me for a podcast on the Ultimate ALM Environment circa 2010 as well as a little on build and deployment automation. Check out the podcast on Talking Shop!]]></description>
				<content:encoded><![CDATA[<p>At the ALM Conference, <a href="http://richardsbraindump.blogspot.com/">Richard</a> interviewed me for a podcast on the <a href="http://jamescrisp.org/2010/04/14/australian-alm-conference-and-slides-from-the-ultimate-alm-environment-circa-2010/">Ultimate ALM Environment circa 2010</a> as well as a little on build and deployment automation. <a href="http://www.talkingshopdownunder.com/2010/04/episode-10-james-crisp-live-at-alm.html">Check out the podcast on Talking Shop!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/04/27/podcast-from-alm-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Australian ALM Conference, and slides from &#8216;The Ultimate ALM Environment circa 2010&#8242;</title>
		<link>http://jamescrisp.org/2010/04/14/australian-alm-conference-and-slides-from-the-ultimate-alm-environment-circa-2010/</link>
		<comments>http://jamescrisp.org/2010/04/14/australian-alm-conference-and-slides-from-the-ultimate-alm-environment-circa-2010/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 11:50:58 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2010/04/14/australian-alm-conference-and-slides-from-the-ultimate-alm-environment-circa-2010/</guid>
		<description><![CDATA[The inaugural Australian ALM Conference has been an interesting 2 days. The first day had a number of insightful talks, especially interesting to hear Sam Guckenheimer on how Microsoft has been reshaping their internal development practices into a more agile model. Today, I enjoyed Richard's agile adoption talk (hear hear!) and the other highlight was [...]]]></description>
				<content:encoded><![CDATA[<p>The inaugural <a href="http://www.australianalm.com.au/">Australian ALM Conference</a> has been an interesting 2 days. The first day had a number of insightful talks, especially interesting to hear <a href="http://blogs.msdn.com/sam/">Sam Guckenheimer</a> on how Microsoft has been reshaping their internal development practices into a more agile model. Today, I enjoyed <a href="http://richardsbraindump.blogspot.com/">Richard</a>'s agile adoption talk (hear hear!) and the other highlight was the last presentation of the day, explaining what's gone into the design of the new Windows 7 Mobile OS (though some things still seem under wraps). Also a pleasure to catch up with some old friends at the conference. </p>
<p>Conference organisation was very good (thanks to <a href="http://myalmblog.com/ ">Anthony Borton</a> and his team). The focus was very Microsoft centric, but next year, the plans are for a much wider variety of content. Lunar Park was a cosy conference venue and fun to go outside during the breaks and see kids screaming on rides and the sun shining on the bridge and harbour.</p>
<p>My presentation was 8.30am this morning (aargh!) but despite the early hour, there was a reasonable turn out and quite a few interested people asking questions. The plan was to co-present with <a href="http://jchyip.blogspot.com/">Jason Yip</a>, but he was called away to Perth so I presented solo. Unlike most other presentations at the conference, Visual Studio and TFS were barely mentioned. Instead I focused on current problems in each area of  ALM, coming up with a criteria to assess this area, and what we usually do on projects to meet this criteria - eg, story walls, story maps, automated build and deploy etc. You can find the <a href="http://jamescrisp.org/wordpress/wp-content/uploads/2010/04/alm.pptx">Powerpoint slides here</a>. The slides are promises for a conversation (ie, mainly images with some notes), so don't hesitate to <a href="http://jamescrisp.org/contact">contact me</a> if you want to chat.</p>
<p>Also, thanks Richard for this photo from the presentation:</p>
<p><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2010/04/mepresenting.jpg' title='James Crisp presenting ‘The Ultimate ALM Environment circa 2010′'><img src='http://jamescrisp.org/wordpress/wp-content/uploads/2010/04/mepresenting.jpg' alt='James Crisp presenting ‘The Ultimate ALM Environment circa 2010′' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/04/14/australian-alm-conference-and-slides-from-the-ultimate-alm-environment-circa-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>nRake &#8211; Rake builds for .NET</title>
		<link>http://jamescrisp.org/2010/03/20/nrake-rake-builds-for-net/</link>
		<comments>http://jamescrisp.org/2010/03/20/nrake-rake-builds-for-net/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 13:16:01 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2010/03/20/nrake-rake-builds-for-net/</guid>
		<description><![CDATA[Fed up with XML based builds that are hard to maintain, refactor and extend? Rather than trying to fix this with more xml and community tasks, or re-invent the wheel, let's use Rake. Rake is a mature build system developed by the ruby community which can be applied equally well in the .NET world. To [...]]]></description>
				<content:encoded><![CDATA[<p>Fed up with XML based builds that are hard to maintain, refactor and extend? Rather than trying to fix this with more xml and community tasks, or re-invent the wheel, let's use Rake. Rake is a mature build system developed by the ruby community which can be applied equally well in the .NET world. </p>
<p>To help you get started quickly, I've put together <a href="http://wiki.github.com/jcrisp/nRake/">nRake</a>. nRake provides a template C# .NET solution with a nice directory structure (src, tools, lib, etc), a Rake build, NUnit tests, templated app and web configs for different environments (eg, dev, uat, prod, etc) and Continuous Integration server sample config files. It comes with everything you need - no additional libraries or downloads required, and all the plumbing work has been done for you.  </p>
<p><b>How to use</b></p>
<ul>
<li><a href="http://github.com/jcrisp/nRake">Git clone</a> or <a href="http://github.com/jcrisp/nRake/archives/master">Download nRake as a Zip</a></li>
<li>Rename PlaceHolder app and tests to reflect your project</li>
<li>Run rake in the root of the project. This will clean, compile, template config files and run unit tests.</li>
<li>Start developing your app! How easy was that <img src='http://jamescrisp.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<p><b>Note:</b> nRake currently uses Ruby 1.9 since IronRuby start up time was prohibitively slow. Hopefully IronRuby will get faster, and then nRake can make use of it. Also nRake uses the <a href="http://albacorebuild.net/">Albacore Gem</a> for .NET build tasks. <a href="http://wiki.github.com/derickbailey/Albacore/">Documentation on Albacore tasks here</a>.</p>
<p><b>Also check out the <a href="http://jamescrisp.org/2010/05/25/nrake-now-on-ironruby/">IronRuby update</a>!</b></p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2010/03/20/nrake-rake-builds-for-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slides &amp; Code: Securing your MVC site against Code Injection and X-Site Scripting</title>
		<link>http://jamescrisp.org/2009/08/26/slides-code-securing-your-mvc-site-against-code-injection-and-x-site-scripting/</link>
		<comments>http://jamescrisp.org/2009/08/26/slides-code-securing-your-mvc-site-against-code-injection-and-x-site-scripting/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 05:34:07 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2009/08/26/slides-code-securing-your-mvc-site-against-code-injection-and-x-site-scripting/</guid>
		<description><![CDATA[Here are the slides and code from yesterday's talk at Sydney ALT.NET. See Steve Sanderson's post for the code/binary for subclassed aspx compiler and more information about the automatic encoding approach we covered in the talk.]]></description>
				<content:encoded><![CDATA[<p>Here are the <a href='http://jamescrisp.org/wordpress/wp-content/uploads/2009/08/securingmvcagainstcodeinjection.zip' title='Slides and code for securing your asp.net mvc site against x-site scripting and code injection'>slides and code</a> from <a href="http://jamescrisp.org/2009/08/18/talk-securing-your-mvc-site-against-code-injection-and-x-site-scripting/">yesterday's talk</a> at <a href="http://sydney.ozalt.net">Sydney ALT.NET</a>.</p>
<p>See <a href="http://blog.codeville.net/2007/12/19/aspnet-mvc-prevent-xss-with-automatic-html-encoding/">Steve Sanderson's post</a> for the code/binary for subclassed aspx compiler and more information about the automatic encoding approach we covered in the talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2009/08/26/slides-code-securing-your-mvc-site-against-code-injection-and-x-site-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows / .NET Dev Tools</title>
		<link>http://jamescrisp.org/2009/08/18/windows-net-dev-tools/</link>
		<comments>http://jamescrisp.org/2009/08/18/windows-net-dev-tools/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:42:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2009/08/18/windows-net-dev-tools/</guid>
		<description><![CDATA[Recently I visited a .NET dev team to take a look at design, code and processes with a view to making recommendations to improve delivery speed. One of the more minor, but easily generalisable areas is around tooling. I often find that the little extra tools you pick up can make your work significantly more [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I visited a .NET dev team to take a look at design, code and processes with a view to making recommendations to improve delivery speed. One of the more minor, but easily generalisable areas is around tooling. I often find that the little extra tools you pick up can make your work significantly more efficient. Here are a few free ones I use:</p>
<p><b><a href="http://kdiff3.sourceforge.net/">KDiff3</a></b><br />
A brilliant merge tool that plugs nicely into TFS or SVN. SVN integration is automatic from the Kdiff3 installer. TFS integration is manual, but <a href="http://blogs.msdn.com/jmanning/articles/535573.aspx">quite easy</a>.</p>
<p><b><a href="http://sourceforge.net/projects/console/">Console2</a></b><br />
A tabbed console which works well with classic windows shell and powershell. Good support for resizing, copy paste, etc.</p>
<p><b><a href="http://www.red-gate.com/products/reflector/">.NET Reflector</a></b><br />
.NET decompiler for those dlls that don't have source. There is also a great plugin that lets you decompile entire assemblies to files on disk.</p>
<p><b><a href="http://www.fiddler2.com/fiddler2/">Fiddler</a></b><br />
When you're debugging SOAP or RESTful web services, Fiddler is great. It lets you see the messages sent / received and even change and impersonate them.</p>
<p><b><a href="http://www.albahari.com/queryexpress.aspx">QueryExpress</a></b><br />
If you've got SQLExpress or just no tools installed, QueryExpress is a tiny (~100K) and quick query analyser style application for all breeds of MS SQLServer. Download in a few seconds, and be running queries before a minute is up.</p>
<p><b><a href="http://ccollomb.free.fr/unlocker/">Unlocker</a></b><br />
Don't you hate it when Windows gets its locks in a mess and you can't delete/rename files? Unlocker will automatically pop up, show you which applications are holding file locks and let you release the locks.</p>
<p><b><a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx">Process Explorer</a></b><br />
A more powerful and accurate Task Manager application which allows you to see file locks and many other types of information.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2009/08/18/windows-net-dev-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Talk: Securing your MVC site against Code Injection and X-Site Scripting</title>
		<link>http://jamescrisp.org/2009/08/18/talk-securing-your-mvc-site-against-code-injection-and-x-site-scripting/</link>
		<comments>http://jamescrisp.org/2009/08/18/talk-securing-your-mvc-site-against-code-injection-and-x-site-scripting/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:08:52 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2009/08/18/talk-securing-your-mvc-site-against-code-injection-and-x-site-scripting/</guid>
		<description><![CDATA[I'll be giving a lightning talk on securing your ASP.NET MVC site against code injection and x-site scripting next Tuesday 25 August at the Sydney ALT.NET group. I'll be demonstrating potential pitfalls and dangers of arbitary code injection, and how you can protect against it, elegantly. We've got 6 interesting talks lined up for the [...]]]></description>
				<content:encoded><![CDATA[<p>I'll be giving a lightning talk on securing your ASP.NET MVC site against code injection and x-site scripting next Tuesday 25 August at the <a href="http://sydney.ozalt.net">Sydney ALT.NET group</a>. I'll be demonstrating potential pitfalls and dangers of arbitary code injection, and how you can protect against it, elegantly. We've got <a href="http://sydney.ozalt.net/2009/08/august-lightning-talks-subjects.html">6 interesting talks</a> lined up for the night. See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2009/08/18/talk-securing-your-mvc-site-against-code-injection-and-x-site-scripting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Green &amp; Red Local Builds (adding colour to the local build process)</title>
		<link>http://jamescrisp.org/2008/11/20/green-red-local-builds-adding-colour-to-the-local-build-process/</link>
		<comments>http://jamescrisp.org/2008/11/20/green-red-local-builds-adding-colour-to-the-local-build-process/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 12:13:45 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[ThoughtWorks]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/11/20/green-red-local-builds-adding-colour-to-the-local-build-process/</guid>
		<description><![CDATA[Well, who doesn't write tests and do continuous integration (CI) these days? Whether you use one of the many Cruise Control variants, or Team City or some other tool, you most likely get a handy colour coding of builds as either green or red (ie, good, or bad). But, you can take this a step [...]]]></description>
				<content:encoded><![CDATA[<p><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/11/build.JPG' title='build.JPG'><img src='http://jamescrisp.org/wordpress/wp-content/uploads/2008/11/build.thumbnail.JPG' alt='build.JPG' style="float: left; margin-right: 6px;" /></a>Well, who doesn't write tests and do continuous integration (CI) these days? Whether you use one of the many Cruise Control variants, or Team City or some other tool, you most likely get a handy colour coding of builds as either green or red (ie, good, or bad). But, you can take this a step further! </p>
<p><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/11/redbuild.JPG' title='redbuild.JPG'><img src='http://jamescrisp.org/wordpress/wp-content/uploads/2008/11/redbuild.thumbnail.JPG' alt='redbuild.JPG'  style="float: left; margin-right: 6px;" /></a>Often on .NET projects, we have a little batch file that we run before checking in (often with a pause at the end so it can be run from a shortcut), to confirm that no tests are broken locally. Well, it's not much fun peering at the ugly Nant output (or whatever build system you use). Instead, it is quite easy to add a couple of lines to your batch file and  change the colour of the console to bright Red or bright Green depending on the success of the local build. It is great for telling what the result was at a glance. I can't claim credit the idea - it was something we used at <a href="http://www.cargowise.com/">EDI</a> for our custom build system, but here's some batch file code I whipped up which I can claim is all mine, every last GOTO of it! Enjoy <img src='http://jamescrisp.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The following code uses NAnt, but you can replace it with MsBuild or any other build tool that returns a status code.</p>
<pre>
@echo off

color 07

tools\\nant\\NAnt.exe -buildfile:mybuild.build %*

IF ERRORLEVEL 1 goto RedBuild
IF ERRORLEVEL 0 goto GreenBuild

:RedBuild
color 4F
goto TheEnd

:GreenBuild
color 2F

:TheEnd
pause

</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/11/20/green-red-local-builds-adding-colour-to-the-local-build-process/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slides from ACS REST Talk</title>
		<link>http://jamescrisp.org/2008/10/01/slides-from-acs-rest-talk/</link>
		<comments>http://jamescrisp.org/2008/10/01/slides-from-acs-rest-talk/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 12:29:55 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/10/01/slides-from-acs-rest-talk/</guid>
		<description><![CDATA[Thanks to everyone who came along to the REST talk at ACS tonight. Here are the slides. They are quite a big download (10mb) as a result of all the images. When you review them, you might want to turn on the "Notes" view as I've added some text to go along with the image [...]]]></description>
				<content:encoded><![CDATA[<p>Thanks to everyone who came along to the REST talk at <a href="http://www.acs.org.au/index.cfm?action=event&#038;area=9001&#038;temID=eventdetails&#038;eveID=10114821847938">ACS</a> tonight. Here are the <a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/10/rest-talk.ppt' title='REST talk'>slides</a>. They are quite a big download (10mb) as a result of all the images. When you review them, you might want to turn on the "Notes" view as I've added some text to go along with the image based slides.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/10/01/slides-from-acs-rest-talk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sydney ALT.NET Launched &amp; Ruby Slides</title>
		<link>http://jamescrisp.org/2008/09/30/sydney-altnet-launched-ruby-slides/</link>
		<comments>http://jamescrisp.org/2008/09/30/sydney-altnet-launched-ruby-slides/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 13:31:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ThoughtWorks]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/09/30/sydney-altnet-launched-ruby-slides/</guid>
		<description><![CDATA[This evening we had the first Sydney Alt.Net meeting. It went really well. Our venue at the ThoughtWorks offices was pretty packed with about 35 interested people coming along. We started with a discussion of news in the .NET space, and then broke for food. After that we had my presentation on Ruby &#038; Rails [...]]]></description>
				<content:encoded><![CDATA[<p>This evening we had the <a href="http://sydneyaltdotnet.blogspot.com/2008/09/and-we-away.html">first Sydney Alt.Net meeting</a>. It went really well. Our venue at the ThoughtWorks offices was pretty packed with about 35 interested people coming along. We started with a discussion of news in the .NET space, and then broke for food. After that we had my presentation on Ruby &#038; Rails from a .NET perspective, followed by <a href="http://richardsbraindump.blogspot.com/">Richard's</a> presentation on Rhino Mocks. We ended with a retrospective to gather feedback and thoughts for future meetings. Thanks to everyone for coming along and making it such a great night! And also a big thank you to ThoughtWorks for the venue, food and drink.</p>
<p>Here's the <a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/09/ruby-dotnet-talk.ppt'>slides from "Ruby and Rails from a .NET perspective"</a>. It's a bit hard to give you a transcript of the demos but here is a taste of some of the ruby commands we looked at today.</p>
<p><b>Basic IronRuby Console demo</b></p>
<pre>
4+4
"hello".class
$friends = ["James", "Richard", "Bill"]
$friends.find_all { |f| f.include? "a" }
$friends.collect { |f| f.length }
"-" * 100
$person_type = Struct.new(:name, :age, :sex)
$j = person_type.new("James", 27, "m") 
</pre>
<p><b>Iron Ruby Calling WinForms</b></p>
<pre>
require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 
Form = System::Windows::Forms::Form  
MessageBox = System::Windows::Forms::MessageBox  
Button = System::Windows::Forms::Button 

$b = Button.new
$b.text = "Hello Button"
$f = Form.new
$f.controls << $b
$f.show_dialog 
</pre>
<p><b>Simple Rails App Demo</b></p>
<pre>
rails myapp
ruby script/generate scaffold Person name:string age:integer
rake db:migrate
ruby script/server
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/09/30/sydney-altnet-launched-ruby-slides/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First Sydney ALT.NET Meeting on 30 Sept</title>
		<link>http://jamescrisp.org/2008/09/11/first-sydney-altnet-meeting-on-30-sept/</link>
		<comments>http://jamescrisp.org/2008/09/11/first-sydney-altnet-meeting-on-30-sept/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 01:07:54 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[ThoughtWorks]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/09/11/first-sydney-altnet-meeting-on-31-oct/</guid>
		<description><![CDATA[Exciting news! We now have an ALT.NET group in Sydney! Our first meeting is Tuesday 30 September. Meetings will be the last Tuesday of the month. Rough agenda for the first meeting is: 6:00pm &#160;&#160;Meet &#038; Greet time and then Kick Off! 6:30pm &#160;&#160;"Ruby, Rails and IronRuby from a .NET perspective" (me). 7:00pm &#160;&#160;Break with [...]]]></description>
				<content:encoded><![CDATA[<p>Exciting news! We now have an ALT.NET group in Sydney! Our first meeting is Tuesday 30 September. Meetings will be the last Tuesday of the month.</p>
<p>Rough agenda for the first meeting is:</p>
<p>6:00pm &nbsp;&nbsp;Meet &#038; Greet time and then Kick Off!<br />
6:30pm &nbsp;&nbsp;<em>"Ruby, Rails and IronRuby from a .NET perspective"</em> (me).<br />
7:00pm &nbsp;&nbsp;Break with food and drink<br />
7:30pm &nbsp;&nbsp;<em>"Mocking with Rhino Mocks 3.5"</em> (<a href="http://richardsbraindump.blogspot.com/">Richard Banks</a>).<br />
8:00pm &nbsp;&nbsp;Wrap up &#038; go home.</p>
<p><a href="http://thoughtworks.com">ThoughtWorks</a> is sponsoring the event with a nice office location in the CBD, and also pizza and beer. So if you're planning to come, please comment or send me or <a href="http://richardsbraindump.blogspot.com/">Richard Banks</a> a mail to help us get enough food and drinks for everyone.</p>
<p>Address is:<br />
Level 8, 51 Pitt Street<br />
Sydney NSW 2000 Australia<br />
<a href="http://maps.google.com/maps?f=q&#038;hl=en&#038;geocode=&#038;q=51+Pitt+Street,+Sydney+NSW+2000,+Australia">[Map]</a></p>
<p>ALT.NET is about designing and building the best solutions possible. This means continuous improvement, retrospection and often reaching outside the mainstream, considering Open Source frameworks and tools, Agile methodologies and ideas from other language communities such as Ruby, Java and Haskell.</p>
<p>For more info about ALT.NET, check out our <a href="http://sydneyaltdotnet.blogspot.com/">Sydney ALT.NET Blog</a>, and the main <a href="http://altnetpedia.com/">ALT.NET wiki</a>. </p>
<p>See you on the 30th!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/09/11/first-sydney-altnet-meeting-on-30-sept/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>REST and .NET talk at ACS on 1 October</title>
		<link>http://jamescrisp.org/2008/09/10/rest-and-net-talk-at-acs/</link>
		<comments>http://jamescrisp.org/2008/09/10/rest-and-net-talk-at-acs/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 03:52:13 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/09/10/rest-and-net-talk-at-acs/</guid>
		<description><![CDATA[I'll be giving a talk at the ACS (in Sydney CBD) on 1 October, about REST, designing good RESTful systems and implementing them in .NET. It will be quite similar to the REST Patterns in .NET talk I gave at Tech Ed. For more information, please check out the blurb at the ACS site.]]></description>
				<content:encoded><![CDATA[<p>I'll be giving a talk at the ACS (in Sydney CBD) on 1 October, about REST, designing good RESTful systems and implementing them in .NET. It will be quite similar to the <a href="http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/">REST Patterns in .NET talk</a> I gave at Tech Ed. For more information, please check out the <a href="http://www.acs.org.au/index.cfm?action=event&#038;area=9001&#038;temID=eventdetails&#038;eveID=10114821847938">blurb at the ACS site</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/09/10/rest-and-net-talk-at-acs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides from Tech Ed &#8220;Rest Patterns and .NET&#8221; Talk</title>
		<link>http://jamescrisp.org/2008/09/05/slides-from-tech-ed-rest-patterns-and-net-talk/</link>
		<comments>http://jamescrisp.org/2008/09/05/slides-from-tech-ed-rest-patterns-and-net-talk/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 06:37:52 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/09/05/slides-from-tech-ed-rest-patterns-and-net-talk/</guid>
		<description><![CDATA[Here's the slides from "REST Patterns and .NET". I've put some extra info in the notes on various slides, so suggest browsing with notes displayed. You might also be interested in more information about the talk or the simple rest client with code I mentioned during the presentation.]]></description>
				<content:encoded><![CDATA[<p>Here's the <a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/09/talk-teched.ppt' title='TechEd REST and .NET talk'>slides from "REST Patterns and .NET"</a>. I've put some extra info in the notes on various slides, so suggest browsing with notes displayed.</p>
<p>You might also be interested in <a href="http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/">more information about the talk</a> or the <a href="http://jamescrisp.org/2008/08/08/simple-rest-client/">simple rest client with code</a> I mentioned during the presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/09/05/slides-from-tech-ed-rest-patterns-and-net-talk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple REST Client</title>
		<link>http://jamescrisp.org/2008/08/08/simple-rest-client/</link>
		<comments>http://jamescrisp.org/2008/08/08/simple-rest-client/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 03:42:42 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/08/08/simple-rest-client/</guid>
		<description><![CDATA[While preparing for my upcoming REST talk, I made a basic REST client. It's nothing special but allows you to set the verb, request body and see the status code and all the headers on the response. It's quite handy for debugging and exploration of RESTful services. Feel free to download the: Rest Client Code [...]]]></description>
				<content:encoded><![CDATA[<p>While preparing for my upcoming <a href="http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/">REST talk</a>, I made a basic REST client. It's nothing special but allows you to set the verb, request body and see the status code and all the headers on the response. It's quite handy for debugging and exploration of RESTful services. </p>
<p>Feel free to download the:</p>
<ul>
<li><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/08/restclient.zip' title='Rest Client Code'>Rest Client Code</a></li>
<li><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2008/08/restclient.exe' title='Rest Client Executable'>Rest Client Compiled Executable</a></li>
</ul>
<p>Hope it is useful and saves you having to whip up your own little client!</p>
<p><b>UPDATE:</b>  <a href="http://github.com/jcrisp/simple_rest_client_c_sharp">Source now available on GitHub!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/08/08/simple-rest-client/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Tech Ed Talk: REST Patterns and .NET</title>
		<link>http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/</link>
		<comments>http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 01:35:30 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/</guid>
		<description><![CDATA[I'll be giving a talk at Tech Ed this year on REST and how it can be implemented in .NET, much inspired by the thoughts of Jim Webber on good RESTful web services, and Garr Reynolds on the "Zen" presentation style. Here's some more info: REST Patterns and .NET Sydney Convention Centre, Darling Harbour 5 [...]]]></description>
				<content:encoded><![CDATA[<p>I'll be giving a talk at Tech Ed this year on REST and how it can be implemented in .NET, much inspired by the thoughts of <a href="http://jim.webber.name">Jim Webber</a> on good RESTful web services, and <a href="http://www.presentationzen.com/">Garr Reynolds</a> on the "Zen" presentation style. Here's some more info:</p>
<div style="border-left: 2px solid grey; margin-left: 2px; padding-left: 5px;"><strong>REST Patterns and .NET</strong></p>
<p><em>Sydney Convention Centre, Darling Harbour</em><br />
5 September 2008<br />
10:15am - 11:30am<br />
(ARC306)</p>
<p>REST has sparked furious debate, and reactions from fan-boy adoration to hate. As the arguments quiet and the dust settles, it is becoming clear that the RESTful style is a viable choice for the Enterprise. Framework support is growing rapidly. WCF now provides basic REST support. Meanwhile, the budding MVC framework opens the door to building services which leverage hypermedia. This talk will leave you with an understanding of the RESTful architectural style and provide you with recommendations on designing and building both simple and hypermedia driven web services in .NET.</p></div>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/08/07/tech-ed-talk-rest-patterns-and-net/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bounded Actions Using Lambda &#8211; IDisposable is old and ugly!</title>
		<link>http://jamescrisp.org/2008/05/26/bounded-actions-using-lambda-idisposable-is-old-and-ugly/</link>
		<comments>http://jamescrisp.org/2008/05/26/bounded-actions-using-lambda-idisposable-is-old-and-ugly/#comments</comments>
		<pubDate>Mon, 26 May 2008 13:17:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/05/26/bounded-actions-using-lambda-idisposable-is-old-and-ugly/</guid>
		<description><![CDATA[In .NET 2, it was all the rage to make hand-crafted, clever IDisposables that let you do a bounded action with clean up. Eg, void SomeMethod() { using (new SetCursorToWaitEggTimer()) { VerySlowOperation(); } } void VerySlowOperation() { ... etc ... } This was kind of cute - you could make sure that, even if an [...]]]></description>
				<content:encoded><![CDATA[<p>In .NET 2, it was all the rage to make hand-crafted, clever IDisposables that let you do a bounded action with clean up. Eg,</p>
<pre>
void SomeMethod()
{
        using (new SetCursorToWaitEggTimer())
        {
            VerySlowOperation();
        }
}

void VerySlowOperation()
{
    ... etc ...
}
</pre>
<p>This was kind of cute - you could make sure that, even if an exception was thrown, your clean up (eg, changing cursor back to normal) would occur. Implementing the IDisposable was a bit ugly but consuming it wasn't bad.</p>
<p>Now, with the sexy C# 3 syntax, you can do something similar much more elegantly. Eg,</p>
<pre>
void SomeMethod()
{
       DoWithWaitEggTimer(VerySlowOperation);
}

void DoWithWaitEggTimer(Action action)
{
    try
    {
        Mouse.OverrideCursor = Cursors.Wait;
        action();
    }
    finally
    {
        Mouse.OverrideCursor = null;
    }
}
</pre>
<p>If you're feeling like more adventures, you can also start passing these delegates around and injecting them. For example:</p>
<pre>
class SomeClass
{
    public Action<Action> RunSlowCode 
    {
    	get { return runSlowCode ?? new Action<Action>(a => a.Invoke()); }
    	set { runSlowCode = value; }
    }
    Action<Action> runSlowCode;

    void DoSomethingSlow()
    {
         RunSlowCode(PullDataFromExternalSystem);
    }
}

</pre>
<p>This approach allows you to inject the delegate for what happens when slow code is run. So you could inject DoWithWaitEggTimer() or something new like DoWithWaitMessageDisplayedToUser(). Similarly, it could be used for unit testing or injecting between layers in your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/05/26/bounded-actions-using-lambda-idisposable-is-old-and-ugly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C# Default Access Modifier for Class Members &#8211; and drop that private habit!</title>
		<link>http://jamescrisp.org/2008/05/26/c-default-access-modifier-for-class-members-and-drop-that-private-habit/</link>
		<comments>http://jamescrisp.org/2008/05/26/c-default-access-modifier-for-class-members-and-drop-that-private-habit/#comments</comments>
		<pubDate>Mon, 26 May 2008 12:39:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/05/26/c-default-access-modifier-for-class-members-and-drop-that-private-habit/</guid>
		<description><![CDATA[The default access modifier for the members of a C# class (eg, fields, methods, and properties) is 'private'. As such, I recommend never using the redundant 'private' keyword for class members. Leaving off the private nicely separates your privates from your public/inheritable interface in syntax highlighting. It also saves people having to read redundant code [...]]]></description>
				<content:encoded><![CDATA[<p>The default access modifier for the members of a C# class (eg, fields, methods, and properties) is 'private'. As such, I recommend never using the redundant 'private' keyword for class members. Leaving off the private nicely separates your privates from your public/inheritable interface in syntax highlighting. It also saves people having to read redundant code - you wouldn't want your code to be full of un-needed casts, or redundant 'this.' references, would you?</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/05/26/c-default-access-modifier-for-class-members-and-drop-that-private-habit/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>WPF Control Inheritance With Generics</title>
		<link>http://jamescrisp.org/2008/05/26/wpf-control-inheritance-with-generics/</link>
		<comments>http://jamescrisp.org/2008/05/26/wpf-control-inheritance-with-generics/#comments</comments>
		<pubDate>Mon, 26 May 2008 12:19:17 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/05/26/wpf-control-inheritance-with-generics/</guid>
		<description><![CDATA[Working in WPF is quite exciting - there's a lot of new possibilities, especially with easy control composition, much improved binding and Expression Blend to make sexy interfaces. One of the things you're likely to want to do though, when writing anything more than a toy application, is to have a base class for your [...]]]></description>
				<content:encoded><![CDATA[<p>Working in WPF is quite exciting - there's a lot of new possibilities, especially with easy control composition, much improved binding and Expression Blend to make sexy interfaces. One of the things you're likely to want to do though, when writing anything more than a toy application, is to have a base class for your UserControls or Windows, to share common functionality. It is also quite likely you will want to use generics in conjunction with control inheritance. With both the code behind, and the XAML, it's not immediately obvious how to do generic inheritance. It is a bit fiddly to get going, and sometimes the errors are not helpful. Here's a simple example that outlines how to bring it together.</p>
<p><br/></p>
<p><b>The base control</b></p>
<pre>
namespace WpfGenericsDemo
{
    public class BaseUserControl&lt;T&gt; : UserControl where T : IPresenter
    {
        public BaseUserControl()
        {
            ... various configurations ...
        }

         ... Awesome functionality to share ...
    }
}
</pre>
<p><br/></p>
<p><b>The child control code-behind</b></p>
<pre>
namespace WpfGenericsDemo
{
    public partial class ChildUserControl : BaseUserControl&lt;ChildPresenter&gt;
    {
        public ChildUserControl()
        {
            InitializeComponent();
        }

         ... More code ...
    }
}
</pre>
<p><br/></p>
<p><b>The child control XAML</b></p>
<pre>
&lt;WpfGenericsDemo:BaseUserControl x:Class="WpfGenericsDemo.ChildUserControl"
    x:TypeArguments="WpfGenericsDemo:ChildPresenter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WpfGenericsDemo="clr-namespace:WpfGenericsDemo"&gt;
    
    ... The rest of your awesome XAML ...

&lt;/WpfGenericsDemo:BaseUserControl&gt;
</pre>
<p><br/></p>
<p>
<b>Notes</b></p>
<ul>
<li>Your top level node is the parent class of the control you want to create (eg, BaseUserControl). You specify the control class you want to create with 'x:class' (eg, ChildUserControl)</li>
<li>'x:TypeArguments' is the way you specify the generic type (eg, ChildPresenter)</li>
<li>You need to namespace your classes - eg, with 'xmlns:WpfGenericsDemo' which uses a clr-namespace style reference</li>
<li>Only your top level node can be genericised in XAML</li>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/05/26/wpf-control-inheritance-with-generics/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>NUnit Test Runners Were Not All Made Equal</title>
		<link>http://jamescrisp.org/2008/04/08/nunit-test-runners-were-not-all-made-equal/</link>
		<comments>http://jamescrisp.org/2008/04/08/nunit-test-runners-were-not-all-made-equal/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 07:26:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/04/08/nunit-test-runners-were-not-all-made-equal/</guid>
		<description><![CDATA[NUnit tests can be run using a variety of different runners. Some common ones are: NUnit GUI Test Driven .NET Resharper test runner NUnit MS Build Task The NUnit GUI and Test Driven create a new instance of the test class for each test run. This leads to more isolation but potentially slower performance. Resharper [...]]]></description>
				<content:encoded><![CDATA[<p>NUnit tests can be run using a variety of different runners. Some common ones are:</p>
<ul>
<li><a href="http://www.nunit.org/">NUnit GUI</a></li>
<li><a href="http://www.testdriven.net/">Test Driven .NET</a></li>
<li><a href="http://www.jetbrains.com/resharper/">Resharper test runner</a></li>
<li><a href="http://msbuildtasks.tigris.org/">NUnit MS Build Task</a></li>
</ul>
<p>The NUnit GUI and Test Driven create a new instance of the test class for each test run. This leads to more isolation but potentially slower performance.</p>
<p>Resharper and NUnit MSBuild Task re-use the same instance of the test class when running each test in the class. This can lead to unintended interaction between tests. Using these runners, it is vital to to assign initial values to instance variables in SetUp, rather than when they are defined or in the constructor.</p>
<p>If you use a mix of different test runners, you can end up with tests that pass on some machines and fail on others (eg, Test Driven locally works fine, but you use NUnit MSBuild Task on your build box and get intermittent failures). </p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/04/08/nunit-test-runners-were-not-all-made-equal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NUnit SetUp Attribute and Subclassed Test Cases</title>
		<link>http://jamescrisp.org/2008/04/08/nunit-setup-attribute-and-subclassed-test-cases/</link>
		<comments>http://jamescrisp.org/2008/04/08/nunit-setup-attribute-and-subclassed-test-cases/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 07:05:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2008/04/08/nunit-setup-attribute-and-subclassed-test-cases/</guid>
		<description><![CDATA[If you have a ChildTestCase class that inherits from a ParentTestCase class, and both of these have a SetUp method, marked with the [SetUp] attribute, would you expect both to be called? If so, you would be sadly disappointed. Only the SetUp method of the ChildTestCase will be called, and the SetUp in the ParentTestCase [...]]]></description>
				<content:encoded><![CDATA[<p>If you have a ChildTestCase class that inherits from a ParentTestCase class, and both of these have a SetUp method, marked with the [SetUp] attribute, would you expect both to be called? If so, you would be sadly disappointed. Only the SetUp method of the ChildTestCase will be called, and the SetUp in the ParentTestCase will be ignored. </p>
<p>According to the <a href="http://www.nunit.org/index.php?p=setup&#038;r=2.2.10">NUnit documentation on the Set Up attribute</a>, this is intended behaviour:</p>
<blockquote><p>
If you wish to add more SetUp functionality in a derived class you need to mark the method with the appropriate attribute and then call the base class method.
</p></blockquote>
<p>An alternative approach to get all your SetUps called is to have a base TestCase class define a protected virtual SetUp() (with the SetUp attribute), which all child classes override (and call base on their first line).</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2008/04/08/nunit-setup-attribute-and-subclassed-test-cases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delicious .NET &#8211; Slides &amp; Code</title>
		<link>http://jamescrisp.org/2007/10/04/delicious-net-slides-code/</link>
		<comments>http://jamescrisp.org/2007/10/04/delicious-net-slides-code/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 04:47:07 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/10/04/delicious-net-slides-code/</guid>
		<description><![CDATA[Here's the slides and code from yesterday's "Delicious Dot Net" talk at ACS. Powerpoint Presentation Delicious Server Code Delicious Client Code (online and offline) Microsoft samples]]></description>
				<content:encoded><![CDATA[<p>Here's the slides and code from yesterday's <a href="http://jamescrisp.org/2007/09/28/acs-talk-delicious-net-3rd-oct/">"Delicious Dot Net" talk at ACS</a>.</p>
<ul>
<li>
  <a href="/wordpress/wp-content/uploads/2007/10/DeliciousDotNet.ppt">Powerpoint Presentation</a>
</li>
<li>
  <a href="/wordpress/wp-content/uploads/2007/10/DeliciousServer.zip">Delicious Server Code</a>
</li>
<li>
  <a href="/wordpress/wp-content/uploads/2007/10/DeliciousClient.zip">Delicious Client Code (online and offline)</a>
</li>
<li>
  <a href="/wordpress/wp-content/uploads/2007/10/MicrosoftSamples.zip">Microsoft samples</a>
</li>
</ul>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/10/04/delicious-net-slides-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ACS Talk &#8211; &#8220;Delicious .NET&#8221; &#8211; 3rd Oct</title>
		<link>http://jamescrisp.org/2007/09/28/acs-talk-delicious-net-3rd-oct/</link>
		<comments>http://jamescrisp.org/2007/09/28/acs-talk-delicious-net-3rd-oct/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 13:41:38 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/09/28/acs-talk-delicious-net-3rd-oct/</guid>
		<description><![CDATA[I'll be giving a talk at an ACS event after work on Wed next week (3rd October). Here's the blurb: A tasty take on WPF, WCF, LINQ and O-R Mapping An exploration of some of the freshest, tastiest and most powerful features in .NET 3.5 through implementing a useful application. You'll take away an understanding [...]]]></description>
				<content:encoded><![CDATA[<p>I'll be giving a talk at an ACS event after work on Wed next week (3rd October). Here's the blurb:</p>
<p><b>A tasty take on WPF, WCF, LINQ and O-R Mapping</b></p>
<p>An exploration of some of the freshest, tastiest and most powerful features in .NET 3.5 through implementing a useful application.<br />
You'll take away an understanding of what's in .NET 3.5 and how to build online and offline applications with the new technology stack supported by Visual Studio 2008 (Orcas Beta 2). </p>
<p><b>Location</b><br />
Norman Selfe Room,<br />
Level 3,<br />
280 Pitt St Sydney (Sydney Mechanics School of Arts)</p>
<p><b>Time</b><br />
6:15pm, 3rd October 2007</p>
<p>For more info or to register, please visit the <a href="http://acs.org.au/index.cfm?action=event&#038;area=9001&#038;temID=eventdetails&#038;eveID=10082197413786">ACS site</a>.</p>
<p>Hope you can come <img src='http://jamescrisp.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/09/28/acs-talk-delicious-net-3rd-oct/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reflexil, cute code injection for C#</title>
		<link>http://jamescrisp.org/2007/09/27/reflexil-cute-code-injection-for-c/</link>
		<comments>http://jamescrisp.org/2007/09/27/reflexil-cute-code-injection-for-c/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 07:20:42 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/09/27/reflexil-cute-code-injection-for-c/</guid>
		<description><![CDATA[While catching up on my favourite blogs, I came across Reflexil on Fabrice's blog. Reflexil is able to do C# code injection into existing assemblies and save the resulting assembly. I haven't given it a go yet, but it looks like a really neat tool. The legal implications may mean it is only useful for [...]]]></description>
				<content:encoded><![CDATA[<p>While catching up on my favourite blogs, I came across <a href="http://sebastien.lebreton.free.fr/reflexil/">Reflexil</a> on <a href="http://weblogs.asp.net/fmarguerie/archive/2007/09/05/Reflexil-csharp-code-injection-in-assemblies.aspx">Fabrice's blog</a>. Reflexil is able to do C# code injection into existing assemblies and save the resulting assembly. I haven't given it a go yet, but it looks like a really neat tool. The legal implications may mean it is only useful for emergency patching or debugging however...</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/09/27/reflexil-cute-code-injection-for-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BarCamp Sydney this Saturday</title>
		<link>http://jamescrisp.org/2007/08/22/barcamp-sydney-this-saturday/</link>
		<comments>http://jamescrisp.org/2007/08/22/barcamp-sydney-this-saturday/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 12:09:05 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/08/22/barcamp-sydney-this-saturday/</guid>
		<description><![CDATA[It is BarCamp in Sydney this Saturday. I haven't been to one of these unconference style events before, but I've heard good things about it from my colleagues. I'm quite excited to go along and see what it is like. If you're in Sydney and interested in stopping by, details are as follows: When: Sat [...]]]></description>
				<content:encoded><![CDATA[<p>It is <a href="http://barcampsydney.org/">BarCamp in Sydney</a> this Saturday. I haven't been to one of these unconference style events before, but I've heard good things about it from my colleagues. I'm quite excited to go along and see what it is like. </p>
<p>If you're in Sydney and interested in stopping by, details are as follows:</p>
<p><b>When:</b> Sat 25th August 2007 from about 9am<br />
<b>Where:</b> University of Technology, Sydney (Jones St entrance)<br />
<a href="http://barcampsydney.org/?page_id=4">More details...</a></p>
<p>One of the novel aspects of BarCamp is that all participants are encouraged to present or start a discussion around something that interests them. For my part, depending on what people are interested in, I was thinking of one of the following:</p>
<ul>
<li>new stuff in the .net space (C# 3.0, .NET 3.5, LINQ, WPF, WCF, etc) and showing some demos</li>
<li>giving a bit of a Ruby/JRuby introduction with help from <a href="http://ola-bini.blogspot.com/2007/08/my-presentation-from-javabin.html">Ola's  JavaBin slides</a></li>
<li>or, if people are keen, a discussion around JRuby vs C# 3 vs Java vs ?? and their stacks for different situations and problems</li>
<ul>
<p>By the way, the conference is free, and it is not too late to sign up <img src='http://jamescrisp.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/08/22/barcamp-sydney-this-saturday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides from &#8216;Learning to live with the static-typing fascist and the dynamic-typing fan-boy in your enterprise…&#8217;</title>
		<link>http://jamescrisp.org/2007/08/15/slides-from-learning-to-live-with-the-static-typing-fascist-and-the-dynamic-typing-fan-boy-in-your-enterprise%e2%80%a6/</link>
		<comments>http://jamescrisp.org/2007/08/15/slides-from-learning-to-live-with-the-static-typing-fascist-and-the-dynamic-typing-fan-boy-in-your-enterprise%e2%80%a6/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 02:03:13 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/08/15/slides-from-learning-to-live-with-the-static-typing-fascist-and-the-dynamic-typing-fan-boy-in-your-enterprise%e2%80%a6/</guid>
		<description><![CDATA[Here's the slides from Jim's and my recent presentation at Tech Ed 07 on the Gold Coast and in Auckland: LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.pptx (Powerpoint 2007) LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.ppt (Powerpoint 2003) You may also be interested in having a read of the abstract.]]></description>
				<content:encoded><![CDATA[<p>Here's the slides from <a href="http://jim.webber.name">Jim</a>'s and my recent presentation at Tech Ed 07 on the Gold Coast and in Auckland:</p>
<p><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2007/08/LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.pptx' title='LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.ptx'>LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.pptx  (Powerpoint 2007)</a></p>
<p><a href='http://jamescrisp.org/wordpress/wp-content/uploads/2007/08/LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.ppt' title='LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.ppt'>LearningToLiveWithTheStaticTypingFascistAndTheDynamicTypingFanboy-TechEd07.ppt (Powerpoint 2003)</a></p>
<p>You may also be interested in having a read of the <a href="http://jamescrisp.org/2007/08/02/tech-ed-talks/">abstract</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/08/15/slides-from-learning-to-live-with-the-static-typing-fascist-and-the-dynamic-typing-fan-boy-in-your-enterprise%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TechEd 07 &#8211; Some interesting snippets</title>
		<link>http://jamescrisp.org/2007/08/14/teched-07-some-interesting-snippets/</link>
		<comments>http://jamescrisp.org/2007/08/14/teched-07-some-interesting-snippets/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 22:06:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/08/14/teched-07-some-interesting-snippets/</guid>
		<description><![CDATA[Silverlight Silverlight runs on MAC and PC. There is now a CLR for the Mac. Microsoft is not currently planning to provide Silverlight for any unix platform (although there is MoonLight). Silverlight 1.0 is basically a media player. It has hooks for javascript etc and some might say it has similar functionality to the Flash [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Silverlight</strong></p>
<ul>
<li>Silverlight runs on MAC and PC.</li>
<li>There is now a CLR for the Mac.</li>
<li>Microsoft is not currently planning to provide Silverlight for any unix platform (although there is MoonLight).</li>
<li>Silverlight 1.0 is basically a media player. It has hooks for javascript etc and some might say it has similar functionality to the Flash movie player.</li>
<li>Silverlight 1.1 has the real programming API. All further Silverlight references are to 1.1.</li>
<li>Silverlight will do a (currently undefined) simplified subset of WPF.</li>
<li>Silverlight gives acess to DOM in the browser.</li>
<li>Currently, the alpha allows 1mb local storage per page. In future, the storage is probably going to be shared across a domain rather than on a page by page basis.</li>
<li>Silverlight provides the capability to open a file on disk for read to allow for file uploads etc.</li>
<li>Interop between JavaScript and hosted Silverlight app is quite easy.</li>
<li>Silverlight looks a bit fiddly to set up, requiring javascript and sometimes xaml bootstrap - but being improved.</li>
</ul>
<p><strong>Software Factories</strong></p>
<ul>
<li>Allow solution and project structures to be auto-generated based on wizards.</li>
<li>Can provide code snippets and some (often template-based) code auto-generation.</li>
<li>Comes with documentation in help files and some context specific stuff.</li>
<li>Can include GUI designers that generate code.</li>
<li>People can develop their own domain specific factories.</li>
</ul>
<p><strong>DSLs</strong><br />
Currently, Microsoft's take on DSLs is GUI editors, not written language or code. At the Software Factories talk, a GUI tool in Visual Studio for drawing your business entities and relationships was billed as a DSL.</p>
<p><strong>Windows Workflow Foundation (WF)</strong></p>
<ul>
<li>Activity based with GUI designer for connecting and composing activities.</li>
<li>Custom activities and compositions can be developed and inherit from base classes.</li>
<li>Single threaded and mainly queue based, with some events sprinkled through.</li>
<li>Activities can reference data from other activities using a mechanism vaguely like data binding.</li>
<li>Hosted in the CLR, so can be part of a console app, ASP.NET, WinForms etc.</li>
<li>Handles pickling and reconstitution of long running activities.</li>
<li>Base Activity classes provide virtual hooks. Eg, 'Execute' for doing the work, 'Cancel', and 'Compensate' for handling rollback scenarios.
</ul>
<p><strong>New in the Enterprise Library 3.1</strong></p>
<ul>
<li>Validation Application Block: provides simple, attribute based property validation. Easy integration with standard ErrorProvider on WinForms and WebForms and WPF is possible. Looks ok but somewhat basic - don't think it supports warnings for example. It has GUI tool support and also capability to specify related objects which need to be validated.</li>
<li>Policy Injection Application Block: provides aspect oriented programming (AOP) style coding using attributes. All new AOP objects need to be created using the block's object factory. Looks useful - there is out of the box support for validation, caching and logging in AOP fashion.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/08/14/teched-07-some-interesting-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tech Ed Talks</title>
		<link>http://jamescrisp.org/2007/08/02/tech-ed-talks/</link>
		<comments>http://jamescrisp.org/2007/08/02/tech-ed-talks/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 06:37:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/2007/08/02/tech-ed-talks/</guid>
		<description><![CDATA[Jim Webber and I will be co-presenting at Tech Ed Australia and Tech Ed New Zealand this year. Here's the low down: Learning to live with the static-typing fascist and the dynamic-typing fan-boy in your enterprise... Gold Coast Thursday 9 Aug 5pm - 6:15pm Auckland Tuesday 14 Aug 2:20pm - 3:35pm "What's best for your [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://jim.webber.name">Jim Webber</a> and I will be co-presenting at <a href="https://aunz.msteched.com/public/ausessions.aspx">Tech Ed Australia</a> and <a href="https://aunz.msteched.com/public/nzsessions.aspx">Tech Ed New Zealand</a> this year. Here's the low down:</p>
<div style="border-left: 2px solid grey; margin-left: 2px; padding-left: 5px;"><strong>Learning to live with the static-typing fascist and the dynamic-typing fan-boy in your enterprise... </strong></p>
<p><em>Gold Coast</em><br />
Thursday 9 Aug<br />
5pm - 6:15pm</p>
<p><em>Auckland</em><br />
Tuesday 14 Aug<br />
2:20pm - 3:35pm</p>
<p>"What's best for your enterprise? Is it the 'glue that never sets' and flexibility of dynamic languages like Ruby, or the tried and true, hard and fast rules and tool support of static languages like C# 3.0? Are there different trade-offs for green field development and integration?</p>
<p>And more importantly, which is best, the Mac or PC?</p>
<p>In a dynamic, and combative presentation, Jim and James will let their alter-egos run amok and answer these questions from the perspective of a seasoned enterprise architect and a l33t hax0r. By the end of this session you will understand the interplays between the two personality types, have had a few laughs, and picked up a few tips on how to use both technology<br />
sets in harmony in your enterprise. "</p></div>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/08/02/tech-ed-talks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Castle Project &#8211; Rails for .NET</title>
		<link>http://jamescrisp.org/2007/06/12/the-castle-project-rails-for-net/</link>
		<comments>http://jamescrisp.org/2007/06/12/the-castle-project-rails-for-net/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 13:26:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/wordpress/?p=61</guid>
		<description><![CDATA[The Castle Project is an interesting open source alternative to ASP.NET / ADO.NET. Among other things, the Castle Project provides a Rails-like development framework for .NET. It has an ActiveRecord implementation built on top of NHibernate, a very Rails-like MVC setup called MonoRail, and uses NVelocity for template style views. It's worth checking out. This [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.castleproject.org/">The Castle Project</a> is an interesting open source alternative to ASP.NET / ADO.NET. Among other things, the Castle Project provides a <a href="http://www.rubyonrails.org/">Rails</a>-like development framework for .NET. It has an ActiveRecord implementation built on top of <a href="http://www.nhibernate.org/">NHibernate</a>, a very Rails-like MVC setup called MonoRail, and uses <a href="http://nvelocity.sourceforge.net/">NVelocity</a> for template style views. It's worth checking out. This <a href="http://hammett.castleproject.org/wp-content/uploads/2007/01/mr%20formvalidation.html">screencast</a> gives a bit of an overview.</p>
<p>There's tough competition around the corner though, with <a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">Orcas already in beta</a>, providing XAML, LINQ and O-R mapping.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/06/12/the-castle-project-rails-for-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is .NET or Java dying?</title>
		<link>http://jamescrisp.org/2007/06/05/is-net-or-java-dying/</link>
		<comments>http://jamescrisp.org/2007/06/05/is-net-or-java-dying/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 09:52:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/wordpress/?p=60</guid>
		<description><![CDATA[Are C# and .NET losing ground as Martin Fowler suggests? Or is Java's market share dropping? What about Ruby? And what about the Australian market in particular? Here's what I've been able to find. Job Trends Which technologies have the most demand for people? From Indeed.com, which claims to search "millions of jobs from thousands [...]]]></description>
				<content:encoded><![CDATA[<p>Are C# and .NET losing ground as <a href="http://martinfowler.com/bliki/RubyMicrosoft.html">Martin Fowler</a> suggests? Or is <a href="http://www.businessweek.com/technology/content/dec2005/tc20051213_042973.htm">Java's market share dropping</a>? What about Ruby? And what about the Australian market in particular?</p>
<p>Here's what I've been able to find.</p>
<p><span style="font-weight: bold;">Job Trends</span><br />
Which technologies have the most demand for people?</p>
<p>From <a href="http://www.indeed.com/jobtrends?q=.net%2C+java%2C+c%23%2C+ruby&#038;l=">Indeed.com</a>, which claims to search "millions of jobs from thousands of job sites", but I suspect may have a USA focus:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_TlhwVaDeyBE/RmTGdLuuu0I/AAAAAAAAAW8/Z5uOqrnvNJk/s1600-h/indeed.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_TlhwVaDeyBE/RmTGdLuuu0I/AAAAAAAAAW8/Z5uOqrnvNJk/s400/indeed.png" alt="" id="BLOGGER_PHOTO_ID_5072397284993317698" border="0" /></a></p>
<p><a href="http://www.vision6.com.au/ch/dx8s7z/236720/f5785zrx3.pdf">"Best Talent Index May 2007"</a> from <a href="http://best-international.com.au/">Best People Solutions</a>  gives an Australian perspective:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_TlhwVaDeyBE/RmTpGruuu1I/AAAAAAAAAXE/OxDKaQ4KZfY/s1600-h/best.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_TlhwVaDeyBE/RmTpGruuu1I/AAAAAAAAAXE/OxDKaQ4KZfY/s400/best.JPG" alt="" id="BLOGGER_PHOTO_ID_5072435381353233234" border="0" /></a></p>
<p>Here's job counts from the (largest?) primarily Australian job search site <a href="http://www.seek.com.au/">Seek</a> on 5 June 2007, 3pm (today):</p>
<table class="ttable" bordercolordark="#003366" bordercolorlight="#c0c0c0" id="Table2" align="center" border="1">
<tr>
<td><b>Keyword(s)</b></td>
<td><b>Number of positions found</b></td>
</tr>
<tr>
<td>Java</td>
<td>3,414</td>
</tr>
<tr>
<td>".NET" or "dot net"</td>
<td>2,744</td>
</tr>
<tr>
<td>"c#" or "c sharp"</td>
<td>1,722</td>
</tr>
<tr>
<td>ruby</td>
<td>100</td>
</tr>
</table>
<p>As an aside, I remember doing a search on Seek for "ruby" about 6 months ago, and getting under 20 jobs mentioning it.</p>
<p><span style="font-weight: bold;">Search Engine Number of Hits</span></p>
<p>Extract from the <a href="http://www.tiobe.com/tiobe_index/index.htm">TIOBE Programming Community Index for June 2007</a>:</p>
<table width="80%" class="ttable" bordercolordark="#003366" bordercolorlight="#c0c0c0" id="Table2" align="center" border="1">
<tbody>
<tr>
<th align="center"> Position<br />
Jun 2007</th>
<th align="center" >Position<br />
Jun 2006</th>
<th align="center" >Delta in Position</th>
<th align="center" >Programming Language</th>
<th align="center" >Ratings<br />
Jun 2007</th>
<th align="center" >Delta<br />
Jun 2006</th>
<th align="center" >Status</th>
</tr>
<tr>
<td align="center">1</td>
<td align="center">1</td>
<td align="center"><img src="http://www.tiobe.com/tiobe_index/images/Same.gif" border="0" /></td>
<td><a href="http://www.tiobe.com/tiobe_index/Java.html">Java</a></td>
<td align="center">20.025%</td>
<td align="center">-1.10%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">2</td>
<td align="center">2</td>
<td align="center"><img src="http://www.tiobe.com/tiobe_index/images/Same.gif" border="0" /></td>
<td><a href="http://www.tiobe.com/tiobe_index/C.html">C</a></td>
<td align="center">15.967%</td>
<td align="center">-2.29%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">3</td>
<td align="center">3</td>
<td align="center"><img src="http://www.tiobe.com/tiobe_index/images/Same.gif" border="0" /></td>
<td><a href="http://www.tiobe.com/tiobe_index/C__.html">C++</a></td>
<td align="center">11.118%</td>
<td align="center">+0.45%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">4</td>
<td align="center">4</td>
<td align="center"><img src="http://www.tiobe.com/tiobe_index/images/Same.gif" border="0" /></td>
<td><a href="http://www.tiobe.com/tiobe_index/%28Visual%29_Basic.html">(Visual) Basic</a></td>
<td align="center">9.332%</td>
<td align="center">-0.85%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">5</td>
<td align="center">5</td>
<td align="center"><img src="http://www.tiobe.com/tiobe_index/images/Same.gif" border="0" /></td>
<td><a href="http://www.tiobe.com/tiobe_index/PHP.html">PHP</a></td>
<td align="center">8.871%</td>
<td align="center">-0.72%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">6</td>
<td align="center">6</td>
<td align="center"><img src="http://www.tiobe.com/tiobe_index/images/Same.gif" border="0" /></td>
<td><a href="http://www.tiobe.com/tiobe_index/Perl.html">Perl</a></td>
<td align="center">6.177%</td>
<td align="center">+0.17%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">7</td>
<td align="center">8</td>
<td align="center"> <img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /> </td>
<td><a href="http://www.tiobe.com/tiobe_index/C_.html">C#</a></td>
<td align="center">3.483%</td>
<td align="center">+0.25%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">8</td>
<td align="center">7</td>
<td align="center"> <img src="http://www.tiobe.com/tiobe_index/images/Down.gif" border="0" /> </td>
<td><a href="http://www.tiobe.com/tiobe_index/Python.html">Python</a></td>
<td align="center">3.161%</td>
<td align="center">-0.30%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">9</td>
<td align="center">10</td>
<td align="center"> <img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /> </td>
<td><a href="http://www.tiobe.com/tiobe_index/JavaScript.html">JavaScript</a></td>
<td align="center">2.616%</td>
<td align="center">+1.16%</td>
<td align="left">  A</td>
</tr>
<tr height="25">
<td align="center">10</td>
<td align="center">19</td>
<td align="center"> <img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /><img src="http://www.tiobe.com/tiobe_index/images/Up.gif" border="0" /> </td>
<td><a href="http://www.tiobe.com/tiobe_index/Ruby.html">Ruby</a></td>
<td align="center">2.132%</td>
<td align="center">+1.65%</td>
<td align="left">  A</td>
</tr>
</tbody>
</table>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_TlhwVaDeyBE/RmTxsLuuu2I/AAAAAAAAAXM/Klu2QZtQmEw/s1600-h/tpci_trends.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_TlhwVaDeyBE/RmTxsLuuu2I/AAAAAAAAAXM/Klu2QZtQmEw/s400/tpci_trends.png" alt="" id="BLOGGER_PHOTO_ID_5072444821691349858" border="0" /></a><br />
I think this gives a good idea of web buzz, but suggest that most non-IT companies do not publish information about their projects and chosen technologies and languages on the web.</p>
<p><span style="font-weight: bold;">Conclusion</span><br />
The data collected suggests that:</p>
<ul>
<li>Both .NET and Java are major players in the job market with thousands of positions advertised, implying wide industry adoption of both.</li>
<li>Neither .NET nor Java seem to be undergoing any significant decline in jobs.
</li>
<li>Java has much more information about it on the internet, although .NET is slowing gaining ground and Java slowly losing it.
</li>
<li>Ruby is comparatively tiny but growing rapidly in terms of jobs and information on the internet.
</li>
</ul>
<p><span style="font-weight:bold;">Thanks</span><br />
Thanks to <a href="http://jchyip.blogspot.com/">Jason Yip</a> and <a href="http://binkysilhouette.blogspot.com/">Suzi Edwards</a> for their help finding/sourcing information.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/06/05/is-net-or-java-dying/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using floating point variables to represent money =&gt; not a good idea!</title>
		<link>http://jamescrisp.org/2007/02/25/using-floating-point-variables-to-represent-money-not-a-good-idea/</link>
		<comments>http://jamescrisp.org/2007/02/25/using-floating-point-variables-to-represent-money-not-a-good-idea/#comments</comments>
		<pubDate>Sun, 25 Feb 2007 10:59:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby / Rails]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/wordpress/?p=42</guid>
		<description><![CDATA[I was reading through some code the other day and was surprised to find that it was using doubles to represent dollar amounts. Reason for the alarm bells is that doubles and floats cannot accurately represent many decimal fractions (eg, 0.1), since doubles and floats internally work with powers of 2 rather than powers of [...]]]></description>
				<content:encoded><![CDATA[<p>I was reading through some code the other day and was surprised to find that it was using doubles to represent  dollar amounts. Reason for the alarm bells is that doubles and floats cannot accurately represent many decimal fractions (<span class="blsp-spelling-error" id="SPELLING_ERROR_0">eg</span>, 0.1), since doubles and floats internally work with powers of 2 rather than powers of 10. These inaccuracies are likely to lead to significant errors, especially when performing arithmetic (<span class="blsp-spelling-error" id="SPELLING_ERROR_1">eg</span>, adding up a table of dollar amounts). See this <a href="http://www2.hursley.ibm.com/decimal/decifaq1.html#inexact">IBM article</a> for a more <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">in depth</span> explanation and examples. The solution is to use types that work with powers of ten internally. In C#, you can use 'decimal' and in Java or Ruby, '<span class="blsp-spelling-error" id="SPELLING_ERROR_3">BigDecimal</span>', to avoid these problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/02/25/using-floating-point-variables-to-represent-money-not-a-good-idea/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AntiPattern: BusinessObjects in the driving seat</title>
		<link>http://jamescrisp.org/2007/01/11/antipattern-businessobjects-in-the-driving-seat/</link>
		<comments>http://jamescrisp.org/2007/01/11/antipattern-businessobjects-in-the-driving-seat/#comments</comments>
		<pubDate>Fri, 12 Jan 2007 00:51:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design / Architecture]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://jamescrisp.org/wordpress/?p=37</guid>
		<description><![CDATA[When you have a rich domain model with a business object centric design, and a Windows forms GUI, it can be very tempting to start putting significant process logic in the business objects. After continuing along this path a little further, you may realise that the process needs some sort of user input, and you [...]]]></description>
				<content:encoded><![CDATA[<p>When you have a rich domain model with a business object centric design, and a Windows forms GUI, it can be very tempting to start putting significant process logic in the business objects. After continuing along this path a little further, you may realise that the process needs some sort of user input, and you use events or some sort of notifier pattern to gain user input required by the process, while still maintaining layering in terms of referencing. Then additionally you may need to access some sort of external service.</p>
<p>Here is an example:</p>
<pre>class Order : BusinessObject
{
  public void SendOrder(INotifier notifier)
  {
    if (ReadyForDelivery ||
        notifier.Confirm("Are you sure you want to send order lines? They are not ready for delivery."))
    {
      OrderLine[] orders = GetLinesToSend();
      foreach(OrderLine line in Lines)
      {
        SendLine(line); // send line using a web service?
      }

      Notify("Lines sent successfully.");
    }
  }
}

interface INotifier
{
  void Notify(string msg);
  bool Confirm(string msg);
  OrderLine[] GetLinesToSend();
}</pre>
<p>I would like to suggest that this is an anti-pattern and a trap. Although there is no direct reference from the Business Layer to the GUI layer (INotifier is implemented in GUI and passed down), the Business Layer now requires the ability to stay instantiated, pause while waiting for responses from the notifier, and then continue execution. This will work for rich client applications, but not in a stateless web environment. The ideal of being able to swap in/out the GUI layers on top of the Business layer is now compromised.</p>
<p>Instead, it would be possible to drive form the GUI layer, and call a service to send the Order Lines. In pseudo code below:</p>
<pre>void SendMenu_Click(...)
{
  if (Order.ReadyForDelivery ||
      MessageBox.Show(...) == DialogResult.Yes)
  {
    using (ChooseLineForm chooseLineForm = new ChooseLineForm(Order))
    {
      chooseLineForm.ShowDialog()
    }
    SendingSevice.SendLines(chooseLineForm.selectedLines);
    ...
  }
}</pre>
<p>If the logic in the GUI layer became much more complex, it may be a good idea to pull it out into its own class (eg, LineSender). This class would be a type of GUI level controller, responsible for orchestrating the send process.</p>
<p>Using this approach, there are a number of benefits:</p>
<ul>
<li>BusinessObjects have no reliance on GUI implementation, so can be used for Rich Client and Web Client indiscriminately.</li>
<li>Web developers are free to implement the user input process in stateless way more appropriate to their platform.</li>
<li>Functionality for sending Order lines (some sort of integration with a web service?) is pulled out into a service class which can be reused elsewhere (potentially sending other types of objects?) and unclutters the Order business object and removes its dependency  on  an external service.</li>
<li>Code is simpler and easier to follow.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jamescrisp.org/2007/01/11/antipattern-businessobjects-in-the-driving-seat/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
