Sprint Planner Helper – Session 12

Today I started off with some refactoring of the things I did yesterday. It was some pretty ugly code in the aspx-page which now is improved with some properties in the domain model.

I also started the actual adding functionality of the Product and the product backlog. This immediately got me into trouble since I need a list of product owners in order to fill out the form… More test data and repositories.

TDD is great – but it doesn’t solve the problem with testdata. It’s hard work – even with the great repository pattern. I hope (and guess) that this pays off.

Since I am alone and Abbe is sound asleep I’ll break the 1 hour rule and continue a bit further.

There are some great help in the way that ASP.NET MVC integrates into Visual Studio 2008. Most notably the way you can generate typed views...

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 did some code on the project. Abbe has been quite sickly and I have not had the time. No worries – it’s all a hobby ;)

OK – what I have done since last time (2 x 15 min I think) is to produce a list of Product on my web page. With this fancy layout…

sprintplannerhelpergui1

That made me realize that I could have added some disclaimer when it comes to the UI. I made a certain css-class for the productlist, so someone can help me out later. I will make it functional now – not pretty.

I also came to realize that my model may be enhanced with some status for the product items and aggregated values for how much that is done for...

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 for the first time could see where this was going. And I (as Product Owner) was not happy… I couldn’t even yell at the team (also me) because it was quite a lousy order.

OK –what was wrong. Firstly – I was not happy about that certain actions was only avaiable to certain roles (“As Product Owner”, “As Scrum master”). I want the Sprint Planner Helper to be open and useful without hindering you with role checking.

Then I was way to detailed in my model. Why do I even bother with the ProductOwnerController. It’s just an attribute on the ProductBacklog, as is the product by the way.

So I sat down in a meeting with the team, designer and the domain experts (in this case me on all three accounts :)) and did some...

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 testdata repository so that I will know the state off 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.

addviewaspnetmvc

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

Oh yeah – my first view is realized…

first

At this point I...

Read More

Sprint Planner Helper – Session 8

This hour almost entirely was reading. I didn’t not feel comfortable yet with terms Repository and Service, or how they relate to each other.

Also I feel that I have looked to much at the architecture of ASP.NET MVC Storefront Starter Kit. I have incorporated stuff that I didn’t thought to much about – stupid, but I did it anyway.

But after a while I found this introduction to DDD and it explained some things for me. Here is how I understand the two fore-mentioned concepts:

  • A Repository are classes and methods that is used to load stuff from a data store. They are often written in a way that is easily mocked or replaced during testing.
  • A Service is used to hold a process or a flow through a business logic that does not fit well on a class in the domain model. They are stateless...
Read More

Sprint Planner Helper – Session 7

I’ve been doing some major reworking of the repository that I am using, from being a product repository to being a ProductOwnerRepository and a ProductBacklogRepository. This took me more than one hour and therefore I did it as a prolonged check-out session.

Halfway through that prolonged session I realized that I still don’t quite get the repository pattern (by the way, here is a great post about the repository pattern) or rather the way it’s being used in the ASP.NET MVC Storefront Starter Kit. The thing that had me confused is the service… It feel like an extra layer on top of the repository that I don’t understand.

But 06:03 into part 8 of the video series I got it… What Rob Conery is doing is to overload the constructor of the controller so that he can send in a fake version of the...

Read More