London Alt.Net beers night 5 - 12th January 2009

The Alt.Net beers night kicked off again in 2009 with a great topic - SOLID principles.

The person proposing the topic wanted to know if anyone was aware of the principles and more importantly did the group thing it was a good thing to take on board?
The group proceeded to describe each principle briefly and discuss why these principles were important. The discussion was very productive and I'm sure everyone took something away with them that night.

I've previously come across the SOLID principles through blogs and podcasts of which the most recent was Uncle Bob's podcast with Scott Hanselman - a great talk with the author of the princples himself - Robert C. Martin

Rather than regurgitate the princples myself, here are a couple of links to the resources I've found the most useful recently:
Principles of OOD
(note, there was no acronym to begin with, otherwise it was SOLDI)
Why Solid? Gimme an S!
Why Solid? Gimme an O!
Why Solid? Gimme an L!
(erm, stops here unfortunately)
OO Design Principles
(a wealth of links on this one)

Posted at at 5:15 PM on Monday, January 19, 2009 by Posted by Justin Davies | 0 comments Links to this post   | Filed under:

Little API gem for legacy methods

Daniel Cazzulino posted a little gem about evolving an API without breaking client code.

This is a simple, yet very elegant idea - moving "old" methods out into a legacy dll and use extension methods to attach them to the original class. That way new users of the API are not automatically exposed to legacy implementations and existing client code can simply reference the new legacy dll to obtain the legacy functionality.

To make this available simply by referencing you would need to ensure the namespace within the legacy dll matches the original namespace (e.g. Something.MyProduct and not Something.MyProduct.Legacy).

But, I hear you R#ers cry, Resharper would continually complain that namespace does not match the location!

Never fear, if you look at the properties window of a folder in visual studio with resharper installed, you will see a "Namespace Provider" property. When you set this to false, an entry is placed in the Something.MyProduct.csproj.resharper file that will stop those namespace/location warnings: e.g.

<Configuration>
  <NamespaceFolders>
    <SkipFolder>E73F41D0-727C-4243-8BAA-21321E922934/d:something/d:folder</SkipFolder>
  </NamespaceFolders>
</Configuration>

This file can also be checked into source control as it is a project specific config and not a user one. Happy coding!

Posted at at 2:51 PM on Friday, January 9, 2009 by Posted by Justin Davies | 1 comments Links to this post   | Filed under: