Storming the Castle

I've been learning about so many development strategies in the last few months that my head is spinning! My journey has taken me in two main directions:

  1. Learning about concepts like object-oriented programming (OOP), design patterns, test-driven development, and agile development.
  2. Learning about tools that support #1.

This article makes no attempt to be comprehensive about either point; it's mostly just a list of resources that I'm using and may need to refer to again.


New books on my bookshelf:

Relevant articles and blogs:

  • Billy McCafferty's NHibernate Best Practices with ASP.NET. According to reader rankings, this is the #1 article in the CodePlex Design and Architecture section. I didn't learn much about NHibernate in this article, but I learned a lot about architecting web applications. He goes into great detail about separation of concerns, keeping the data layer from depending on the domain (business) layer, etc. Downloadable files include a basic sample and an enterprise sample. It's rare to come across someone who knows his stuff and knows how to explain it in writing. McCafferty has both. Tons of links to other resources, as well as over 700 follow-up comments with lots of helpful answers.
  • Billy McCafferty's blog. Maybe I should have started here. It sounds like McCafferty's group has decided to abandon the (somewhat complex) techniques laid out in the preceding article and convert their current development to Castle MonoRail. I've been considering MonoRail; I must say that McCafferty's enthusiastic endorsement after several months of use is encouraging.


As usual, Microsoft is doing a great job of promoting upcoming technologies like LINQ and Silverlight, and I've spent some time researching those. But I need something I can work with now, not something in beta. So my attention has turned towards more established technologies, even though they are not from Microsoft.

Object-Relational Mapping (ORM)

It didn't take me long to realize that I did not want to hand-code all the data access logic for my program. It turns out that linking classes to database objects has developed into quite an industry. There are dozens of Object-Relational Mappers (ORMs) out there (Wilson's O/R Mapper and Entity Spaces, for example), but the one I heard about most often was NHibernate. NHibernate is the .NET version of Hibernate, a “persistence engine” for Java. Unlike many free open-source tools, this one seems to have a wide following and to have proven itself in many large, real-world applications.

Built on NHibernate is Castle ActiveRecord, which hides a lot of the complexity of NHibernate but supposedly lets you get to it if you need it.

Web Development Frameworks

Visual Web GUI is a really fascinating framework that lets you build a web app that looks almost exactly like a WinForms app. It's tempting to go down this road, as I would like to do something of a Rich Internet Application (RIA). However, this is a fairly new framework, and seems to be lacking integration experience with ActiveRecord, for example, so I'm currently leaning towards the more established MonoRail.

Castle MonoRail is a .NET approach to Rails(TM) development, popularized by the Linux-based Ruby on Rails. The main benefit here seems to be a pre-built framework that simplifies developing with the Model-View-Controller (MVC) design pattern. It integrates with Castle ActiveRecord, and it supports test-driven development. And, well, Bill McAfferty thinks that the Castle Project is cooler than Jerry Springer

The Castle

So in short, it's starting to look like the Castle Project is my new best friend…unless of course I come across the next great thing tomorrow!  

1 thought on “Storming the Castle

  1. Eric Kaufman

    Hey Mark!

    That’s pretty darn well written, and I hope you’re not in one of my object modeling lectures, because you’re going to give me a run for my money! When I started peeling back the covers of Hibernate, I started seeing the Castle framework, and how much Hibernate depends on it.

    I’m glad that I’m not the only one that’s giving LINQ-TO-SQL a passing glance at this point; maybe it will mature into something solid, but for now it’s miles away from the big time ORM tools.

    See you up in Fullerton if you’re going there!


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

This site uses Akismet to reduce spam. Learn how your comment data is processed.