Wednesday, January 24, 2007
MSAjax.jpgIn case you missed it, MS AJAX 1.0 is now released. Now you can play for real :) Check out Scott Guthrie's blog for details. Or if you want to go strait for the download, you'll find it at ajax.asp.net.

Ajax | Microsoft | Web
Wednesday, January 24, 2007 10:50:31 PM (W. Europe Standard Time, UTC+01:00)
MsdnLive.jpgDon't forget to register for MSDN Live in Bergen 13. February! It's no surprise that Ajax and IIS 7 attract a lot of people to this event, so register now before it's full. You don't want to become the guy, who wasn't there, would you? ;) You can even pick up some Tips & Tricks for VS 2005. If this Tips & Tricks session is the same as at TechEd, you'll have to see it!
Wednesday, January 24, 2007 12:37:07 AM (W. Europe Standard Time, UTC+01:00)
 Monday, January 22, 2007
The guys at Microsoft Patterns & Practices have created a new site for upcoming releases. Nice to see what’s going on release wise. Take a look at Tom Hollanders blog to get the complete story.
Monday, January 22, 2007 3:15:26 PM (W. Europe Standard Time, UTC+01:00)
 Wednesday, January 17, 2007
NNUG.jpgJust wanted to let you know that we have put out the agenda for the january meeting at NNUG in Bergen. You'll find it here: http://www.nnug.no/Avdelinger/Bergen/Moter/Brukergruppemote-Januar/. Don't forget to register so we know how much food to order. See you there.

Wednesday, January 17, 2007 12:33:45 AM (W. Europe Standard Time, UTC+01:00)

Last year I was in Stavanger speaking for NNUG. After the meeting some of the guys went out to have a beer and invited me with them. While we were sitting there and talking about stuff we’re only aloud to in circumstances like these, joined by fellow .Net mates (as appose to when we’re out with <normal/> people), we came across the subject of Scrum. I mentioned we were going to adopt Scrum, and in next sentence started talking about how we had grouped our office landscape. Not using cubicles but having all tables in the centre of the room, all looking in. One of the guys interrupted me and said: “You’re not suggesting that Scrum has anything to do with how you organize your landscape do you?” I responded; “Of course not!” and continued.

office.jpg
In this room we are 12 developers sitting around this “table”.
We love it! (Thanks Torbjørn for the picture)
After doing some more studying on Scrum and having practiced it for a few weeks, this somehow came back to me. If I had that same conversation today I would have answered; “I sure do. Don’t you?“

Scrum is all about Team communication. Letting a team being a team, performing as a team, talking as a team, making decisions as a team and so on. Very often Scrum starts out as a desperate solution for a team that keeps failing. They adopt Scrum and the team starts having success again, together, as a team. Why is that? I think it’s mainly because scrum (if properly adopted) focus on team communication. How do you communicate best with your team mate? If you turn your head and talk to him or if you have to climb over a wall (or maybe two, three…) to make contact?

This is a topic that has been widely discussed by many. I know one guy in particular who disagree with me on this; Joel Spolsky (Joel on Software). I must admit that he has done a great job getting me to doubt if we’re doing the “right” thing. Joel says that if you get interrupted in your work, you lose concentration and focus. It will then take you about 15 minutes before you’re back on track.

I think this has a lot to do with who you are as a person, if you’re working on the same functionality (same problem domain) or actually in which country you live. Some people communicate well, others don’t. Some like talking, some don’t. If you’re working on the same problem as the guy next to you I think that could be really beneficial. If you live in Norway (like I do) we usually don’t sit in cubicles. We usually sit in an open landscape communicating freely. It might be a European thing, I don’t know…

Anyway, I am a strong believer of Scrum and I think it’s easier to adopt if your team is sitting in a landscape. Do you?

Agile | Scrum | Work
Wednesday, January 17, 2007 12:26:17 AM (W. Europe Standard Time, UTC+01:00)
 Friday, January 12, 2007
NNUG.jpgI’m now officially the new leader of Norwegian .Net User Group in Bergen. I’d like to give Jon Andreas Bygstad great thanks for his excellent work and making NNUG in Bergen possible. And also for retire from his position to make room for me. Just kidding.

Even though Jon Andreas decided not to have the main responsibility anymore, he will still be on the board participating like before. I have a lot to learn and will depend on his experience to be able to make NNUG in Bergen even better than it is today. I think NNUG’s future looks very promising and I hope you as a developer, architect, student or whatever position you have know how to take advantage of NNUG. We work hard to give you free updates on technology, speakers and pizza every month. So if you’re not a member of NNUG yet, go register now! Did I say it was FREE?!!

If you'd like to participate, that being demo something you think is cool or try how it feels to be a speaker, we will be glad to hear from you. Our main goal is to make our .Net community in Bergen learn from each other by participating with subjects that is of interest to others. Also if you have any suggestions to how NNUG can be better, tell us about it! Go here to send us an email
.Net | NNUG
Friday, January 12, 2007 6:03:20 PM (W. Europe Standard Time, UTC+01:00)
 Wednesday, January 10, 2007
Everyone who knows me knows that I have a special interest for memory leaks in .Net. At the company where I work we have solved a lot of these issues and I’ve also had talks about this at Norwegian .Net User Group (NNUG) in Bergen and Stavanger. One of our biggest problems was memory leaks related to events. Rico Mariani (MS performance guru) has set focus on this in his blog today by this blog post, so go check it out!

He focuses on the issue related to event generators, but there are other areas where you can get into trouble as well. I’ll try to explain our scenario:
  1. We have a graphical engine responsible for creating graphical components (user controls) dynamically by using reflection.
  2. All of these user controls inherit from the same class which exposes a lot of events.
  3. When our graphical engine creates new instances of these user controls it hooks up these events.
This model is created to have loose coupling between the user controls, the engine and other components we have in our app. The engine has a lot of knowledge about other components and services in our app, which sometimes our user controls wants to communicate with. This communication is done through these events. Here’s an example:
I have a user control that wants to tell a service that he have made some changes the service should know about. For this we have created a special event on the user control that the engine listens to. So I trigger this event on the user control, the engine receives it and tells the service about it.
com.png

These event hookups caused us a lot of pain at some point. Our solution was the first that Rico mentioned in his blog post (IDisposable), which I personally would prefer. In addition to this we added some reflection code which found events and removed them. You’ll find more info about this here: http://channel9vip.orcsweb.com/ShowPost.aspx?PostID=180985

Before I end I want to recommend two tools you can use to find memory leaks in .net. The first one which we use is called .Net Memory Profiler. The other one which I’ve not personally used but I’ve heard others are using is the ANTS Profiler. So go find your leaks. Happy hunting!
.Net | MemoryLeaks | Microsoft | NNUG | Work
Wednesday, January 10, 2007 1:02:22 AM (W. Europe Standard Time, UTC+01:00)
 Tuesday, January 09, 2007
During the last month I’ve seen every living blogger in my rss reader getting tagged. Since I’m quite new to the blogging world I guess I’ll have to start this off myself if it’s ever going to happen. So here it goes; five things you didn’t know about me:

  1. I used to have very long hair. On a late Saturday night in a nightclub I was standing in a (dark) corner talking to some of my mates when this guy came over and asked me if I wanted to dance! There was total silence for about 5 seconds before he realized I was a guy. The next day I cut my hair short!
  2. I served in the army in north of Norway (Bardufoss) for 2.5 year. One year was mandatory (by law), but I got a job offer after I finished my service, so I stayed. I was an officer driving around in one of these.
  3. I didn’t finish my university degree. I hadn’t much left, but the job offers where just too tempting. I even took 6 months off work to study at UTS (University of Technology Sydney), getting a nice tan down under and traveling all of the east coast of Australia. Coming home after that trip, working was much more tempting than studying and my work experience exceeded my education anyway, at least that’s what I’m telling myself.
  4. From when I was 5-6 years old to I was about 14 I played football (soccer) almost every day. I also played regularly for our local football team. The only problem was that I sucked! I never got any good, not even remotely good, so I gave it all up. The funny thing though is that it took me 9 years to figure it out!
  5. My first computer was a Sharp MZ 700 at the age of 9. I remember I got a magazine with some BASIC code and that was my first experience with software development. After that it was C64, Amiga 500, 600, 1200 and quite late in life a PC (300 MHz).

Ok, now I’ll tag Torbjørn Marø, Bård Strøm, Trond Aarø, Per-Ove Joakimsen and Sondre Bjellås.
Tuesday, January 09, 2007 9:44:37 PM (W. Europe Standard Time, UTC+01:00)
 Thursday, January 04, 2007
feed-icon-32x32.gif I was looking for some new rss feeds at MSDN and found this page : http://msdn2.microsoft.com/en-us/aboutmsdn/aa973533.aspx

This might have been here for ages for what I know, but I just found it. Just wanted to let you know in case you didn’t ;)
Thursday, January 04, 2007 2:38:03 PM (W. Europe Standard Time, UTC+01:00)
At work at the moment I’m trying to calculate the migration complexity of our software from .net framework 1.1 to 3.0, with main focus on WCF. Specifically I’ve been doing some test migration of web services to WCF and regenerating our DTO’s to support data contracts. During this test migration an interesting issue came up. With our “old” web services we did our own serialization of DTO’s. Several reasons for that, which I’m not going into now, but this was a bit problematic in WCF at first. I’ll show you a quick example of a typical web service at my company:

[WebMethod]
public XmlNode GetSomeData() {
    return StaticBusiness.GetSomeData().Serialize2XmlNode();
}

In the example I just do a call to a static business method called GetSomeData. The return value from this method (which is one of our DTO’s) is then serialized to an XmlNode by calling Serialize2XmlNode().

In WCF we do not want to handle serialization by our self, so we want WCF to take care of this for us and choose the best serialization mechanism available. So our service in WCF would look something like this:

[ServiceContract()]
public interface IMyService {
    [OperationContract]
    SomeDataObject GetSomeData();
}

public SomeDataObject GetSomeData() {
    return StaticBusiness.GetSomeData();
}

One of the reasons why we did our own serialization in 1.1 was lack of xml serialization support for circular references, but in WCF this is no longer an issue.

So as long as my SomeDataObject  has a data contract it will be serialized and returned to the caller. As you probably have guessed we also de-serialized our DTO’s on the client side (since we returned an XmlNode), but that is now of course handled by WCF. Since we did our own serialization we were not dependent on proxy generation of our DTO’s and we could just reuse the dll on the client side. In our case we had .net on both sides so this was ok. In 1.1 we did it like this:

return SomeDataObject.DeSerialize(MyWebService.GetSomeData());

So I was trying to find a simple way of doing this in WCF. The solution was much simpler than I’d ever expected. By manually generating the proxy and using the /r parameter I was able to bypass proxy serialization of DTO’s. Fantastic!

So a typical call to svcutil would look like this:

svcutil /nologo /out:Proxy.cs /r:C:\Test\DTOs.dll /config:App.config /namespace:*,MyProxies net.tcp://localhost:9000/MyService/tcpmex


This gives me a proxy called Proxy.cs and with my method looking like this:

public DTOs.SomeDataObject GetSomeData
{
    return base.Channel.GetSomeData();
}


This solved a great challenge for us. My next task at hand is to do some performance testing and see if we get the desired performance improvements by using NetTcp as appose to POWS (Plain Old Web Service).

Thanks to Rick Strahl for his great blogpost on this subject.
.Net | WCF
Thursday, January 04, 2007 12:34:29 AM (W. Europe Standard Time, UTC+01:00)
 
Aggregate Me!
Feed your aggregator (RSS 2.0)  Rss
Locations of visitors to this page