Author: Tim
-
Rake Breathing New Life to Building Old Projects
I’ve seen lots of examples of rake (the ruby make replacement) being used as a build tool in non-ruby projects. Many of these are still modern platforms, like .Net. For example, StructureMap builds with rake. But I’ve found that even on older platforms, the power of having a full programming language in your build tool…
-
Developing for Open Source Languages on Windows the Better Way
When working with php, rails, python, etc, windows is sufficient, but definitely leaves something to be desired. The ports of these languages are definitely second class. With Microsoft’s backing php support with IIS is improving, but it’s not the same. And usually you are going to deploy those apps on a linux/bsd web server, so…
-
Datalayer Decisions (Repository, DAO, Services) in Domain-Driven-Design Applications
I have been working several applications lately at work that use Domain-Driven Design. I had a couple of questions about design choices I saw made in the applications I’m working with. I recently talked to an architect who uses DDD a lot (Model first), and had the chance to pick his brain. Here’s what I…
-
NHibernate and Auto Properties
I’ve been working through the NHibernate with ASP.NET ProblemDesignSolution (Wrox Blox), with some small changes. I’m writing my sample in C# using the .Net framework 3.5. I prefer to use auto-properties. It’s common that fields have private setters and only nhibernate can map using the backing field (set via reflection). public String City { get;…
-
Equals, ==, and MSTest
public class SampleClass { public int X { get; set; } public override bool Equals(object obj) { if (obj == null) return false; if (obj.GetType() != typeof(SampleClass)) return false; var s = obj as SampleClass; return this.X == s.X; } } Tests: [TestMethod()] public void EqualsTest() { var sc = new SampleClass { X =…