Category: Uncategorized

SpecsFor 2.4 Released

I just published a new version of SpecsFor to NuGet.  This version includes a couple of minor enhancements: parameterized context classes and a new Should extension method. [more] Parameterized Context SpecsFor has long had the ability to specify context (ie: the Given step of BDD) in a compositional way using separate context classes.  Prior to…

Read More

Yet Another Approach to NHibernate Session-Per-Method-Call Using StructureMap

There are several documented approaches you can follow to implement the session-per-method-call pattern with NHibernate and StructureMap.  The majority of these approaches fail to leverage the full capabilities of StrurctureMap and are therefore more complex than they need to be.  In this short post, I’ll show you how you can implement a simpler solution by…

Read More

Continuous Deployment Using TeamCity 6, MSDeploy, and psake

Some might call continuous deployment the holy grail of agile practices.  The idea that any code change will be live in production within minutes of being committed is both terrifying and powerful.  In this post I will give you some background on what continuous deployment is and why you should care, and I’ll show you…

Read More

Building And Publishing NuGet Packages With psake

I’m a big fan of psake for build and deployment automation.  I know there are a ton of tools for this sort of thing out there, but as an avid user of Powershell, writing build and deploy scripts with psake feels more natural than the alternatives.  In this post, I’ll show you how you can…

Read More

Friday Programming Challenge

It’s the first (and probably only) Friday Programming Challenge!  Today’s task is simple.  How can we pass a generic Func<T,object> to a method that only accepts a Func<object,object>?  Specifically, how can we make this code compile? internal interface ISerializationConfig { … void SerializePropertyAsElementUsing(Type target, PropertyInfo property, string elementName, Func<object, object> converter); } … ITypeSerializationSpec<T> IInitialPropertySerializationSpec<T>.Using(Func<T,…

Read More

Handling Authorization Failures for AJAX Requests in ASP.NET MVC Applications

Authorization failures in ASP.NET MVC applications are usually not something you worry about.  The ASP.NET pipeline has solid support for this scenario and will redirect the user to your application’s login page for you automagically.  Unfortunately, things become more complicated once you introduce AJAX requests into the mix.  Without doing some extra work, you can…

Read More

Asynchronous Event Processing With The Application Bus

I’ve shown you how to use an Application Bus to dispatch events in your application, making it easier to craft code that is loosely coupled and more maintainable.  One of the enhancements I briefly mentioned was to make the event handlers execute asynchronously, thereby enabling your event handlers to run in parallel.  This is quite…

Read More

Test-Driven Development Videos – Now on YouTube!

I uploaded my Test-Driven Development videos to YouTube.  You can check them out here.  Unfortunately I had to manually recapture the video from ScreenToaster, so the audio and video quality took a hit.  However, unlike ScreenToaster, YouTube will allow you to skip around.  In the future, I’ll be sure to capture screencasts in a format…

Read More

Maintaining the expected type in fluent chains

There is a annoying bug in the code I posted for building FusionCharts from ASP.NET MVC.  If you use one of the fluent methods from the abstract builder class, you lose access to the fluent methods on the concrete.  Why is that?  Because the fluent methods on the base class all return the base type:…

Read MoreView 4 Comments

I love ReSharper…

If you are a .NET developer and not using ReSharper, you are behind the curve.  You could be working a lot more efficiently.  You owe it to yourself to go download the 30 day trial right now.  That is all.

Read More