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

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 feels 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...

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.

This great document provides an example and some very good explanations on what the difference between an Entity (has an ID), a Value Object (doesn’t have an ID in the model), and Aggregates (things that consist 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 am test-driving it forward, of course.

After a while…

Oh yeah – I love the way TDD is leading me forward. Really nice code is emerging.

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 shocked by coming second in their 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 were marvelous, especially on the Extreme Makeover.

But the thing that impressed me most was that the whole event was taped for Norwegian television. You can see every performance afterwards here.

Read More

Sprint Planner Helper – Session 5

OK – this was a really short session and it also marks 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 a great help… BUT they have changed 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, 

      Read More
    

Snippet for creating testmethod in C#

Here is a short snippet that saves me a lot of time. It simply creates a test method with the correct attributes and stuff. Simply but useful – and now you don’t have to write it. <?xml version=”1.0” encoding=”utf-8” ?> <Header> TestMethod tm Code snippet for creating a testmethod Marcusoft (www.marcusoft.net) Expansion SurroundsWith </Header> methodName The name of the test methodName <![CDATA[<TestMethod()> _ public void should_$methodName$() { // Arrange // Act // Assert Assert.Fail("Implement test"); }]]>

Read More

Together in transformation – An agile Salvation Army

Today I did a presentation for the Salvation Army at a Hearing day that our Territoral Commander, Victor Poke has assembled. I was a bit confused at first but then I felt quite at easy with the whole thing since my topic suited me perfect. It was Together in Transformation.

Of course I couldn’t resist to preach the Agile gospel even for the Salvation Army. We are often quite rigid in our structures so that could be needed from time to time.

It was well recieved with a very rewarding discussion afterwards. It also felt very good for me to be able to put some quotes form the bible on a PowerPoint slide. Haven’t done that before.

Read More

Sprint Planner Helper – Session 4

OK – I have been doing some thinking and model crunching and found out that still is chewing of to much. There was no really good starting point for me. Finally it struck me: The product manages one or more product each with exactly one product backlog.

So the Product Owner need to be able to create a “Product” and see a list of all products that he manages. I added that requirement to my product backlog and started with that…

Also this introduces the need for roles in my application … but I think that the ASP.NET MVC RC1 has taken care of that for me. At least some of the test tells that story with the possibility to add users. I hope to use the membership and roles in ASP.NET. But that is a later story.

I found out one thing about TDD – make your test run...

Read More