Why DDD Rocks – The Marcusoft.net Version

Today I had a very interesting conversation with a colleague and friend. He is very accomplished in matters concerning Application Lifecycle Management (ALM). The more we talked about that and the things I am learning with the Sprint Planner Helper (TDD, DDD, and ASP.NET MVC), the more I am convinced that I am on the right track. It’s the way to go – especially if you want to be agile.

Just take my experience with this project. I have now coded for some time (about 15 hours) without having to lock down to a database design and data access strategy. Not even near – I am working out the model. I am even planning to handle the database stuff at the very end.

You could choose to view the data access strategy and database as a “necessary evil.” I know I will need one to persist my data,...

Read More

Abbe in the Pulka-Slopes

Winter has “struck” Stockholm and we have lots of snow. And knowing the Stockholm weather, we expect most of it to be gone in a few days.

So we hurried out and bought Abbe his first pulka (kind of small sledge) and went to the slopes of Kronobergsparken.

We thought that it was loads of fun. Elin and Abbe swished down the slopes. I got a few runs myself (for myself also ;) and the memories all came back. Running up the slope with the pulka in a string behind you. Getting cold after the first run… Ahhh the memories.

Abbe pulka

Apparently, Abbe was not as amused as we were.

Abbe scared

Read More

Sprint Planner Helper – Session 12

Today, I started off with some refactoring of the code from yesterday. The ASPX page had some pretty ugly code that I’ve now cleaned up by adding properties to the domain model.

Progress on Product and Backlog Functionality

I began working on adding functionality for the Product and the product backlog. This immediately led to some trouble as I realized I needed a list of product owners to populate the form. This meant more test data and repositories were needed.

While Test-Driven Development (TDD) is fantastic, it doesn’t solve the problem of test data. Even with a solid repository pattern, it’s still a challenge. I hope that the effort will pay off in the long run.

Since I’m alone and Abbe is sound asleep, I decided to break the 1-hour rule and push on a bit further.

ASP.NET MVC Integration

ASP.NET MVC integrates smoothly with Visual Studio...

Read More

Prayer works – Jesus hears them

I have this last week got two very real answers to my and other peoples prayers.

I am still amazed that I still become amazed that prayers are answered.

But that is how it is – it works. So if you ever find yourself in peril just put your hands together and whisper “Jesus – help me now!”.

He will hear you!

Read More

Sprint Planner Helper – Session 11

It’s been a while since I last worked on the project. Abbe has been quite sickly, and I haven’t had much time. No worries – it’s all a hobby. 😉

Progress Update

Since my last update (which was only 2 x 15-minute sessions), I’ve managed to produce a list of Products on my webpage with a new layout:

This progress made me realize that I should have included some disclaimers regarding the UI. I created a specific CSS class for the product list, which will help later on. My focus now is on functionality, not aesthetics.

Model Enhancements

I also discovered that my model could be improved with additional features such as status for the product items and aggregated values for progress tracking. I used Test-Driven Development (TDD) to implement these changes and integrated them into the GUI. This process was quite time-consuming due to some challenges with...

Read More

DDD – the coin drops for Marcus

I have now tried to grasp the DDD-concept without fully “getting it”. I must confess that I have thought: “What is the deal with this… I have done it before”.

But today we had a most prominent guest at Elevate (the education initiative at Avega) – Jimmy Nilsson.  And what he said got the coin to drop for me.

The heading of his presentation was something like “A new era for data access”. And the things he said that got me to understand was something like this – not a quote but rather his reasoning:

Traditionally we focus on the database design in application development. So very early we want to get the database design in place. “We need it to start to do code”. Since we did that design early in the process we often got it wrong and inherited those error through the process. And...

Read More

Simple but useful generic repository pattern

I have pointed here several times before – but it’s so nice.

It’s an implementation of the Repository Pattern using generics, that will minimize your code in a very nice way. I am sure that the FindAll can be refined into something very nice with LINQ, that allows you to send a specification criteria or so.

Here is my implementation that uses a common interface (IBaseEntity) for all my entities. It basically has an ID, so that the abstract implementation can use it as a key:

namespace Marcusoft.SprintPlannerHelper.Repositories { /// <summary> /// A generic repository interface that dictates all the methods that a repository should map to /// </summary> /// <typeparam name=”T”>the type of the interface</typeparam> public interface IRepository<T>  where T :IBaseEntity { T GetById(Guid id); IList<T> FindAll(); void Add(T entity); void Remove(T entity); } }

 

public abstract class Repository<T> : IRepository<T>...

Read More

Sprint Planner Helper – Session 10

You could call the last session my first “sprint demo.” What happened was that I could finally see where this was going. As the Product Owner, I was not happy – I couldn’t even yell at the team (also me) because the result was quite poor.

What Went Wrong

Firstly, I was not happy that certain actions were only available to specific roles (e.g., “As Product Owner,” “As Scrum Master”). I want the Sprint Planner Helper to be open and useful without hindering you with role checks.

Secondly, I was too detailed in my model. For instance, why bother with a ProductOwnerController when it’s just an attribute on the ProductBacklog? The same applies to the Product attribute.

The Solution

I had a meeting with the team, designer, and domain experts (in this case, me on all three accounts) to do some domain...

Read More

Sprint Planner Helper – Session 9

Today I focused on finally getting the controller for my Product Owner tested and done.

For now, the controller will always use my test data repository so that I will know the state of the data. I really want to create my first view also – which will be that list of products.

Look at this really nice feature that helps you create views with the ASP.NET MVC kit.

This promises great things for the final release. More to read about this in this post by the Gu.

Oh yeah – my first view is realized…

At this point, I also realized two things: I will need to sketch out the GUI and I will be needing to add products, product owner, and backlog. So I will probably rip the generic template for repositories from here.

But … hey – my first view! Me so proud. Me want...

Read More