Deferring starts with Castle’s StartableFacility

If you’re using Castle Windsor as your IoC container, the StartableFacility is great simple way to start up services like timers, socket listeners, etc that run for the duration of your application and require two-step initialization — i.e., constructing them then starting them. All you have to do is implement an IStartable interface, with a …

Parallel vs serial javascript async tests

If you’re writing tests for a javascript web application, sooner or later you’ll need to be aware of whether you are using a parallel or serial test runner. Parallel Serial How it works Start all async tests at once and wait until they have all completed. Wait for each test to complete before starting the …

Returning camelCase JSON from ASP.NET Web API

Loving ASP.NET Web API but not loving the .NET-centric PascalCase JSON it produces? Luckily this is quite easy to fix with a custom formatter. I started with Henrik Nielsen’s custom Json.NET formatter and changed it slightly to use a camelCase resolver and also indent the JSON output (just for developers; we would turn this off …

RavenDB Includes – much simpler than you think

Here’s something I’ve been struggling to get my head around over the past few days as I’ve been getting deeper into RavenDB. The example usage from their help page on pre-fetching related documents: That doesn’t look too difficult at first glance – it looks pretty similar to futures in NHibernate, which I’ve used plenty of …