Dependency Injection - explained

When I first read about Dependency Injection, I of course read the famous article by Martin Fowler… and to you I can say that I didn’t get it. At all. Please don’t tell anyone ;)

But after the presentation at Avega by Nicias Nilsson I finally got it. And the example below is a small rip of the DI-part of the presentation but it works as a reminder for me anyway.

Here we go:

Lets say that we have a class called SalesController that managers the business logic for sales. In order to work it has to get some product information which is stored in a repository called ItemInventory.

Below is a example implementation of SalesController

public class SalesController { ItemInventory item; public SalesController() { //... } //... 

      Read More
    

Spring.NET

I realize, when skimming through my posts on the blog, that this happens from time to time … but I have learned some great programming skills the last week.

At Avega, where I work, we gave a seminar on Spring.NET, Dependency Injection and Aspect Orientation… and once again - I think I am in love.

For the first time I finally understood Dependency injection and then the pieces and beauty of Spring.NET was very obvious.

Here are some links that might be useful:

Read More

Brassband radio

Every monday morning I start the day by listen in to Listen to the band which is a long running radio show in UK, playing brass band music. It is a great opportunity to hear the best band in a more or less live situation.

Now, I found out, there is a contender… World Of Brass also has its radio. It seems to be playing CD’s (that you can buy from World Of Brass, can you imagine? ;)) but there is some very good music to hear.

Read More

Pixar - again

OK - the last post made me think about another time when I was the only one laughing in the cinema. Really embarrassing - especially since all the other people in the saloon were children… max six years old..

Read More

Weekend to an end

After a really busy weekend I have just started a “get-back-into-shape-week”… That happens quite a lot to me - the weekends are more hectic than the weeks. So you need to shape up in the weeks.

This weekend has been mainly colored by the celebration of my Salvation Army Corps 40 years anniversary. This was a major success with a music festival with the band at the Saturday to a capacity audience - that was a very long time ago indeed. So fun, so blessed and a lot of warmth to be shared. The band played to its best even though I wrecked that last note of my duet… Well it happens, but not to often I hope.

The Sunday was also great with a celebration with the whole corps, which include the string band (yes, they still hang around), a youth choir, the band and the great Vasa...

Read More

Loud personal details

I’m sorry but the women at my workspace that talks loud about all (i mean all) details is going on my nerves…

Every morning there is something about her children forgetting keys and sleeping over, or why not something even more personal?

And it’s loud - I could probably tape it and make some kind of diary for her…

Read More

Mum

This week has been a bit upside down in a already hectic period. My mum had a TIA (?) which is hospital-lingo for stopper in the brain (sorry ‘bout the English).

Of course a lot of thoughts runs through your mind when something like that happens and it takes it toll on you mentally and physically.

But it all seems to go well now and there are not lasting problems. Hopefully something good can come out of this and she can reduce the stressing workload that she carries at work.

Read More

VB.NET or C#

In a upcoming project we’ll be using VB.NET. The customer has chosen that language as their company standard and there no use or point to argue about that. … Although I can’t see the advantages with VB.NET over C#.

The last time I started a discussion about this it resulted in ca 30 mails with suggestions about why C# is superior… but at the end of the day it’s only syntax. Since the compiler will translate the code into MSIL (intermediate language) which then will be executed by the runtime there is no performance gain using C# or VB.NET.

C# seems to be the most popular choice though - I tried a Google-search on “vb.net for c# developers” and almost all hits has to do with converting a VB.NET developer into a C#-developer and not the opposite.

A popular point in why to chose VB.NET is that if you...

Read More