Seminar summary: .NET Software Development Best Practices

2/11/2011 12:40:26 AM

Cornerstone arranged one day seminar focusing on several aspects of software development. Continuous Integration, Aspect Oriented Programming, Maintainable Code, Behavior Driven Design, Dependency Injection patterns, Unit Testing and Test Doubles (inc mocking).

The heureka of today was realising that TDD isn't areally bout achieving automation of tests for your code and automated regression tests for old code in a changing system.

TDD is something else. TDD is an agile way of explore and define what pieces of functionality needs to be set up in a software project. A test isn't a test. It's a set of functional requirements. Naming your tests in a way that booth the customer and the developers agree on will create an understandable spec in code and also make an proper naming as the domain model entities emerges during the "writing tests / functional requirements gathering"-process. aka Ubiquitous Language on an Domain Model mapping to an elaborated set of Functional Requirements.

Thanks a million Hadi Hariri for your two hours on BDD, Behavior Driven Design, or "TDD as it should be used".

Jonathan Worthington continous integration demo with GIT source control and Tore Nestenius on build automation with FinalBuilder was the funny ones, and a bit interesting as well.

Aspect Oriented Programming is a way to apply cross cutting concerns in a way that does not clutter your core functionality code with those things. Ie get rid of Logger.Log() stuff from your business rules. Jonathan demo on a way to do this with PostSharp wasn't that clear but definetly something to explore.

Dependency Injection with Mark Seeman was very clear and a basic, "do it like this" session with very clear demonstrations. Constructor Injection and Composition Root is the way to go. Talking with Mark in the pause got me the recommendations not to use XML-configurations for IoC containers but to code the resolution mappings, unless live deployment of components are required, because we want the compiletime checking and getting most out of IDE refactoring/renaming capabilities etc.

Test Doubles session with demos on creating Dynamic Mocks with Moq was also a good session and I'm curious to explore if that could be used together with BDD and then to populate domain model entities through dynamic mocked domain interfaces and use that to create a UI prototype.

To sum it up, its been a fantastic day and special thanks to Mark and Hari whos clear  clarifications on their subjects really enlightened at least one developer.