Get Vista to go faster

I know that some people will mock this and say “Uninstall it!” but I am pretty much stuck with my computer (Dell Precision M 70) and my installation of Vista. Here is some suggestions and by only doing the first point I got it up to a working condition in no time! It’s now much uglier but workable – I’ll take that anyday.
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 we are reluctant...
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> where T : IBaseEntity { protected readonly...
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. 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… 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 to cry.
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 and take the...
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 repository. Then the controller actions are...
Read More

Sprint Planner Helper – Session 6

OK – I did some reading about repositories and they basically constitute a way for the domain model to perform CRUD operations – in a language needed by the domain model. In this great document is a example and some very good explanations on what the difference between an Entity (has an ID), Value object (doesn’t have an ID in the model) and Aggregates (things that consists of other things) are. So today I’ll back up and create a repository that can retrieve the products for a product owner – the IProductRepository. I test drive it forward – of course. After a while …. Oh yeah – I love the way TDD is leading me forward. Really nice code emerge. I didn’t get quite as far as I hoped. I was hoping to be able to code a bit of controller-action (hehe…) today. Well – tomorrow maybe.
Read More

Norwegian Championships – the aftermath

OK – my guess wasn’t completely off (got the first right, didn’t I). Oslo brass band chocked by coming second on the first year in the championship section. Since I have played with a few of the bandsmen (and women) in that band I was really proud. Well done – Tone, Mattias and Clare! Also Eikanger has my favorite euphonium player – Patrik Randefalk – and he and the rest of the band was marvelous, especially on the Extreme Makeover. But the thing that impressed me most was that the whole thing was taped for Norwegian television. And you can see every performance afterwards here.
Read More

Sprint Planner Helper – Session 5

OK – this was a really short session and it also mark the end of the first week of the project. Five hours a week – I’d love to work with this all the time… I managed to get around the understanding of controllers. This article was great help… BUT they have change some stuff. So in order to get hold of the actual model in a view you now (ASP.NET MVC RC 1) need to go: [TestMethod] public void indexViewModelIsAProductListWithOneElementsForTheTestUser() { var c = new ProductOwnerController(); var view = c.Index() as ViewResult; var model = (List<Product>) view.ViewData.Model; Assert.AreEqual(1, model.Count); } Small stuff – but quite tricky to find… To summarize the first week I must say I am quite happy. I am getting a hang of TDD. The test-first principle has learned me a lot about the model and it keeps me from doing to much. Extreme OOP is...
Read More