Aggressive domain model fluent interface – take #1

So, I’m currently writing some infrastructure/backend code for Aggressive – a new lightweight time management I’m putting up on CodePlex.

The idea is to us it to practice something that I’m not really good at; TDD – and also try to apply DDD from “top to bottom”.

I’ve taken an interest in internal DSLs and fluent interfaces, so I started to mock up a simple interface for manipulating the Aggressive model.

Take #1:

Aggressive Fluent Interface - Take #1

I tried two different models in the fixtures; the first one where the navigation starts from the user object – and ends up in the task – and the other going the opposite way.

Aaarrrgh.. Grrrr… xUnit 1.0.3 used for testing :-)

I’m open for input & comments.


  • torresdal

    I like the last one best. Though I personally prefer even more fluency in the “sentences”.

    I first tried to mod your second suggestion, but ended up using the Project object as start:

    .Project(“Agressive”)
    .Add(2.Hours())
    .On.Activity(Developing”)
    .On.Task(“Creating a fluent interface.”)
    .ForUser(“Lars”);

    Just my two cents… :-)