Using Unity as dependency resolver in ASP.NET MVC 3

There have been a lot of improvements and additions to dependency resolving in ASP.NET MVC 3. Even in areas that you first didn’t think about (dependency injection in views) at first.

OK – after my last post, in which I’m using Ninject (with the cool website) I got the questions if it can be done with Unity. Of course it does. This post shows how.

I’m using Ninject because of the super-slick integration with ASP.NET MVC 3 via NuGet. It gives my a “correct” and easy to start with solution. The main part in this found in this App_Start static file, that is run before any other code with the Web Activator mechanism:

Read More

How to apply a pull request on GitHub with TortoiseGit

I am loving GitHub! Especially the social collaboration that occur around the projects and code. If you never committed code to a OSS project try it – it’s a exhilarating feeling. And just imaging the other side of the coin – to get suggestions and improvements from other people sent to you! That’s the good news – the bad news (for me at least) is the Git is something else. It’s great but it takes some getting used to. I’m not there yet. For example the preferred way seems to be command line, and I haven’t got used to that yet. There are some GUIs available that help people like me to overcome the abyss, the most well known is TortoiseGit. That was the tool finally got me to understand, use and love GitHub. But when I got a pull request sent to me...

Read More

Kanbanboards III–putting on the web

After my latest post-of-admitting-failures I got some really nice feedback from a lot of people. Apparently there are others out there who think that a failure is great learning opportunity. OK – I will most certainly continue down that path.

I actually write these post as I code along. It’s forward only mode in other words… Almost.

Comments

One of the nicest things that happened as a result from the last post was that Darren Cauthon gave me some insightful comments and patches to go with them. This “social coding” that is going on, on www.github.com (a.k.a. programmers Facebook) is really, really cool.

Darren has done a lot of stuff in and around the SpecFlow project, for example the SpecFlow Assist (table helpers) that is really great. So I value his opinions a lot. He gave me 4...

Read More

TDD and Scaffolding

During my ventures in to new Microsoft land I’ve stumbled on the concept of scaffolding (in the form of the excellent MvcScaffolding). The concept is well known in other frameworks and one of the eye-opener features of for example Ruby on Rails.

But as I started to use scaffolding I had to stop and think for a while on other values that I have come to hold in high respect such as TDD for example. The whole concept of driving out my code guided by test has completely changed the way I code. And my code!.

I don’t feel very good about myself, nowadays, if I have to write code without tests. But this scaffolded code is not code I have written. Should I write test for it? Before the code is generated or afterwards.

Since I couldn’t...

Read More

The power of Visualization used in my current project

I’ve been involved and coached a project with several teams during the last year. The project aims to convert a big (and important) core business system from VB6 to the .NET platform.

It’s quite a big project with about 25-40 member (depending on which phase it’s in) and so we have several different teams working in parallel during the whole project. But it’s not until lately we’ve created an board to show the status for the whole project. Mainly due to high load in other areas of work, I have to admit.

This post will be a long one. But with lot of pictures so I hope you wont be boredWinking smile

Project status board

In order to easily and effortless communicate the status of the complete project we have created a board on the project...

Read More

KanbanBoards part II–two step forward and one back

Disclaimers and introduction

I am now the father of three kids. They are my 1 priority. This project will come second.  I’m doing the project for myself mostly, but am very humbled by the fact that several people already have shown interest in my undertakings.

Up to now I’ve also have time to look at the project half-an-hour at the time. With several hours of back-in-my-head-thinking in between. That might be good.

I have no master plan. I will make mistake as you sure will notice in this post… I do not intend to document just the result but also my sidesteps and mistakes. I am a firm believer that it’s true our mistakes that we learn the most.

OK – on with the show.

In the first part of this series I simply wrote the first specification. So it’s no time to, Read More

Developing in .Net–a new era has begun

News

The other day I just realized how much have changed in the way we develop code nowadays. Well it might just be me but it’s certainly some major changes that has taken place in the .NET development arena.

I don’t claim this to be in the right chronological order but here are some major milestones for me:

Read More

Specification by example with SpecFlow in TFS and the question of traceability

This is the second post talking about how to integrate the use of Team Foundation Server (TFS) in a Specification by example (BDD, ATDD call it what you want) workflow. You can read the first post here for some background, but I will include some background here too, as I have thought about it some more.

Background

Specification by example is not only a way to write executable specifications (red. those words still gives me the chills) but in the way it’s used in projects lies some kind of agile methodology hidden. The early and frequent communication and documentation (in a commonly understood format, Gherkin) it fosters really get the way you work in a very agile way. More on that later. Cucumber is a very well known tool in the Ruby world, where projects often create web applications. I think...

Read More

Managing BDD features in our project (using TFS)

From time to time I find myself in the position where I ask “stupid” questions. I’ve found that it’s often the case that the question is not that “stupid” after all and if it is you get to learn a lot in the process. I have never been verbally abused, flamed or laughed at for my questions – which often are the reasons that people don’t want to ask to “stupid” questions. So recently I’ve been asking “stupid” (final time I use that word in this post, promise) questions surrounding the management of features (.feature-files for us Cucumber freaks). And at the same time I’ve searching high and low on the net for best practices on how to managing your features through the course of a project. I didn’t find much due a couple of reason:

  • the Ruby/ cucumber inheritance of .net tools such as SpecFlow is great...
Read More

Know where you step–generate a step definition report with SpecFlow

In my recent ventures into DOS-country and the SpecFlow.exe I noticed one last flag or subcommand that the SpecFlow.exe accepts; stepdefinitionreport. This subcommand will go through all your features and see which step definitions are called, how many times they are called and also if there is any step definitions that isn’t called at all. OK – that sounds real good, but for the life for me I couldn’t get it to work.

But since the source is open and available from gitHub.com I simply pulled a version down and tried to debug the code. And before long I found the solution. SpecFlow (now 2010-12-16) uses .NET framework 3.5, but my specifications were written using .NET 4.0. There are some reflection going on inside the step definition report code and that doesn’t work very well (loading assemblies from different framework versions).

OK – I simply change...

Read More