I was holding out moving over to AppHarbor until they added support for RavenDB which they recently addded (http://blog.appharbor.com/2012/02/17/hosted-ravendb-on-appharbor). My current vps hosting which is massively underused was about to expire so I decided to make the switch.
Deployment
Deploying to AppHarbor is very easy, I opted to push to AppHarbor from my local git repo rather than integrating with BitBucket (http://support.appharbor.com/kb/getting-started/deploying-your-first-application-using-git).
Problems
I had a few initial deployment issues, such as having more than one sln file in my codebase. Then the fun started, the main problem I encountered was with Simple.Data and it proved quite difficult for me to solve, the first issue was the lack of error output from AppHarbor which I eventually solved with this class
1: public class LogEvent: WebRequestErrorEvent
2: { 3: public LogEvent( string message )
4: : base( null, null, 100001, new Exception( message ) ) {} 5: }
When this is called with
1: new LogEvent( e.Message ).Raise();
An error is recorded in the AppHarbor error viewer. I did get this code from somewhere on the web but I can’t remember where.
Once I had this in place I worked out that Simple.Data for some reason wasn’t working and also wasn’t reporting any errors. So I upgraded it and redid all the references to make sure there were no references to incorrect version. This however still didn’t work. I kept getting the exception “No ADO Provider found”, which isn’t the best error message. Simple.Data it seems doesn’t work if you don’t reference the Simple.Data dlls in projects that reference other projects using Simple.Data
So basically I have grhughes.com.Core which uses Simple.Data for database access and grhughes.com.Web which references grhughes.com.Core and for Simple.Data to work it needs to be referenced by both of these projects. I believe this is because it dynamically loads providers at start up and it can’t find them if they’re not referenced in the web project.
Now that’s all sorted the app is fully deployed and working.
Nancy is a Micro .NET framework inspired by Sinatra and is available on Nuget. I decided that it was time to rewrite this site. The previous version of this site was made using ASP.NET MVC, NHibernate and Castle Windsor. The new version uses Nancy, Simple.Data and TinyIoC.
Rather than using controllers Nancy applications are made from modules with routes and action. The first example in the docs is:
public class HelloModule : NancyModule
{
public HelloModule()
{
Get["/"] = parameters => "Hello World";
}
}
It's a typical Hello World example but you can use Razor or Spark with this and the routing can be any regular expression mapped to parameters which get passed through to the action as a dynamic object. The actions are of type Func<dynamic, Response>.
You can also specify a condition which is type Func<NancyContext, bool>.
You can do more complex routes such as the following to match an id which is a digit and a slug which are then passed to BlogPage. CheckBlogExists does logic to make sure that the blog exists before it loads.
Get[ @"/(?<id>[\d]+)/{slug}", CheckBlogExists ] = p => BlogPage( p );
Nancy currently doesn't pass the params through to the condition, my fork of Nancy has been patched to do that because it suited my needs more. I've raised it as an issue with the Nancy devs but it's currently by design for performance.
Technophobia has its own version of Fedex days which basically consists of teams of people trying to deliver something in one day. Towards the end of last year I volunteered to work on a charity website to try and give them a better looking, more modern and functional website than their existing one which was quite dated. It was a great opportunity to work on something that we would never usually get the chance to do and do something for a good cause.
This is the previous website.

Trying to deliver a website in a day is not something we usually do and is generally quite ambitious so we needed to chose the right tools. So we got ourselves into a meeting room with our computers, using Wordpress and fuelled on donuts and coke we set about trying to deliver the new site.
This is what we managed to come up with in our day and about a month later it has been put live after a few tweaks.

You can visit the new site here.
A summary of the day can be seen here.
Decided to take up Ice Skating. Then I decided the rental boots hurt too much so I bought my own and went Ice Skating:

Then this happened:

:(
So I felt like I wanted to have a play around with some new tech and I decided that would be Raven DB. I had an idea what I wanted to do, collect all my social feeds, Twitter, Facebook, Flickr, Diigo and something for gaming and show them on the side of this page.
APIs are available for Twitter/Facebook/Diigo/Flickr and these were relatively easy to work with. Some of the JSON returned was aimed at JSONP rather than server side consumption but I worked around it.
The gaming feed was slightly more of an issue. There are a few sites which collect data from Steam, Xbox live and PSN etc. The most notable being Playfire and Raptr, however neither site have any public API available though which is a huge shame. Steam also has really quite pathetic Web APIs available which are very little use.
The best solution I found was using Raptr. Raptr at least lets you auto tweet activities so I set up a Twitter account just for Raptr to tweet to and used that.
Technical Solution
Using Quartz.NET and a bit of reflection I created a Job for each feed that I want to collect and have them running every 10 minutes. I then use Newtonsoft Json to parse the results and throw them at Raven DB which is what I’m using for the data store for this feed.
Each job uses a WebClient and then calls DownloadStringAsync to download the result. A simple solution really.
And when loading the page I load the last 20 updates and throw them out on the page.