try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

Getting Started with NHibernate 3 and SQL Compact

There are many posts on the web about how easy it is to get started with Microsoft’s Entity Framework and SQL Server Compact Edition (SQL CE).  This combination seems to be all the rage thanks to EF’s new “Code First” approach introduced in version 4.1.  While I am impressed with the latest version of Entity Framework, I still prefer NHibernate for a lot of reasons, and it’s actually just as easy (maybe even easier) to get up and running with NHibernate+SQL CE as Entity Framework+SQL CE.  In this post, I’ll walk you through the simple steps to... [More]

Test-Driven Development Is Not Slower

Hello, my name is Matt Honeycutt, and I am addicted to Test Driven Development.  I’ve been “using” for about 5 years now.  It started out with a little innocent unit testing and Test Later Development, but I quickly found that the increased productivity caused by TDD to be too alluring, and I succumbed.  Now I’m using all the time.  I use at work.  I use at home.  I just can’t stop.  People don’t really understand the risks.  There’s this myth that TDD is slower, that it makes you less productive, but that’s so not true.  Read on, and I’ll help you ... [More]

Cleaning up POSTs in ASP.NET MVC, the Fail Tracker Way

Those who have worked with ASP.NET MVC for more than a day have no doubt found themselves repeating common patterns when handling POSTs.  Jimmy Bogard recently blogged one way to simplify your actions.  I handled the same problem in Fail Tracker by implementing a very simple convention (one-model-in, one-model-out) and pushing some responsibility into the application framework.  With this in place, cross-cutting POST handling logic can be pushed out of the action methods, and a common “doh” error (forgetting to perform server-side validation) can be eliminated.  Read on to ... [More]

Building Nice Display Names From Pascal-Case View Model Names in ASP.NET MVC 3

One of my goals with Fail Tracker is to push the “Convention over Configuration” idea as far as you possibly can within the confines of ASP.NET MVC.  I’m obviously biased, but so far I think I’ve been quite successful, and Fail Tracker is probably the most enjoyable codebase I’ve ever worked with.  One convention I recently implemented eliminates the need to decorate view model properties with the DisplayNameAttribute.  The convention says “Pascal cased property names will be intelligently split into strings with spaces.”  Thanks to the infrastructure and pluggable model me... [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 how easy it is to start doing continuous deployment today. More...