Archive for November, 2007

An Alternative to the C# Generic new() Constraint

Monday, November 12th, 2007

Here's something I came up with other the weekend while playing with some code... I wanted to write a method that ensured that some object of type T was always available. ModelElement element = EnsureElementExists<ModelElement>(_store); Unfortunately in this case the ModelElement class does not have ...

TDD anti-pattern “inherited or hidden test”

Friday, November 9th, 2007

This post actually started out as my TDD and DSLs post but I got sidetracked into trying to describe an anti-pattern I'd noticed in a some of the unit tests we wrote as part of Service Factory: Modeling Edition. I came across James Carr's excellent TDD anti-patterns post which got me ...

Developing a model centric software factory

Friday, November 9th, 2007

Time to look back on the last eight or so months of building and (finally) shipping Service Factory: Modeling Edition. I thought it might be interesting to think back to some of the things that caught us unawares when building a model centric factory using DSLs on top of GAT/GAX. Bob (Dev) ...

Service Factory model validation

Thursday, November 8th, 2007

Now Service Factory: Modeling Edition has finally shipped I felt obligated to write some stuff about it. As Dev Lead I didn't actually get to write a lot of code but one place I did get my hands grubby was the validation framework. In the process of putting together our presentation ...

Adding a new validation rule to the Service Factory

Thursday, November 8th, 2007

Even if you're not in the factory authoring game you might want to add additional validation to the Service Factory so that you can ensure that additional business rules are followed. For example all your services are using the correct namespace for your organization. We've made this sufficiently simple that anyone can add new ...