Geeks With Blogs
// ThomasWeller C#/.NET software development, software integrity, life as a freelancer, and all the rest Architecture and Design
Some myths of 'Textbook-TDD', and why they are wrong

During the last months, I was doing software development the 'traditional' way (writing code as accurate as you can, then hoping that it's good enough - HDD, Hope-driven development). When I thereafter reviewed my understanding of Test-driven development, it turned out that there are some concepts that I just don't buy anymore...

Posted On Monday, October 31, 2011 1:44 PM

A way of doing real-world test-driven development (and some thoughts about it)

This post started out to be a reply to another blog post about some detail of the red/green/refactor cycle in TDD. It ended up as a fairly extensive description of my own personal practice of doing TDD in C#, featuring quite some VS add-ins and discussing some (real-world) aspects of test-driven development along the way...

Posted On Saturday, April 17, 2010 6:38 AM

Integrating a LinFu IoC container with your ASP.NET MVC application

This post shows how an application's LinFu Ioc container can be seamlessly integrated with the ASP.NET MVC framework, enabling Dependency injection and the use of interfaces for controller creation and for viewmodels (both in controllers and views)...

Posted On Monday, December 7, 2009 7:25 AM

Validating business objects with AOP (3: UI with ASP.NET MVC + xVal)

This is the third post of a three-part series that discusses the use of the ValidationAspects aspect library for business object validation and its integration in different application layers. This time the (server-side) validation aspects are "translated" to (client-side) validations of ASP.NET MVC application web pages, using the xVal framework to do the mapping...

Posted On Monday, November 23, 2009 4:47 AM

Validating business objects with AOP (2: persistence with NHibernate)

Validation is one of the most important objectives when crafting a domain. Domain objects must be sheltered from invalid property and method arguments. Moreover, it is sometimes necessary to explicitly validate an object's state, for example to enforce business rules. This is the second post of a three-part series that discusses the use of the ValidationAspects aspect library in different application layers to do this, this time looking at NHibernate integration...

Posted On Wednesday, November 18, 2009 7:33 AM

Validating business objects with AOP (1: the domain)

Validation is one of the most important objectives when crafting a domain. Domain objects must be sheltered from invalid property and method argument values. Moreover, it is sometimes necessary to explicitly validate an object's state, for example to enforce business rules. This is the first post of a three-part series that discusses the use of the ValidationAspects aspect library in different application layers to do this...

Posted On Sunday, November 15, 2009 1:57 PM

Lazy loading, Inheritance, and Persistence ignorance (part 3)

NHibernate uses lazy loading by default, which is generally a good thing. But when applied to polymorphic objects, this can lead to unexpected behaviour and serious problems - the first two parts of this series talked about that. This post - together with its predecessor - demonstrates a technique to make NH create lazy-loading proxies for a concrete subclass instead of for an abstract superclass, thus avoiding some quite nasty, hard-to-debug and hard-to-understand pitfalls...

Posted On Saturday, October 3, 2009 5:57 AM

Duct Tape Programming? - Certainly not THAT way...

Lately, there was a blog post by Joel Spolsky called "The Duct Tape Programmer", which is very opinionated and caused quite a lot of responses and discussions in the blogosphere. Basically, this post contrasted the duct tape worldview of developing software to the astronaut architect's, forcing programmers to decide between quick-and-dirty solutions on the one side and analysis paralysis on the other. While all objective arguments against that are already made, here are some additional thoughts.

Posted On Wednesday, September 30, 2009 8:25 AM

Lazy loading, Inheritance, and Persistence ignorance (part 2)

Previously, I described a problem with O/R-mappers like NHibernate that could possibly break domain code which is relying on type information (this is not only relevant for casting issues!). The problem occurs when NH creates a lazy loading proxy for a polymorphic object, not knowing the exact type of the proxy at creation time. This post presents the first part of a possible way to circumvent these problems and to be truly persistent ignorant - not just physically, but also logically...

Posted On Sunday, September 20, 2009 7:28 AM

AOP can save you tons of repetitive code

Lately I played around a bit with Aspect Oriented Programming, especially with PostSharp and the ValidationAspects library that sits on top of it. I wanted to see how I could reduce the amount of infrastructural code like e.g. value-checking, which is highly repetitive and error-prone. I must say, I was impressed of what can be achieved...

Posted On Tuesday, September 15, 2009 6:41 AM

Lazy loading, Inheritance, and Persistence ignorance (part 1.5)

A few days ago, I talked about a problem, that using an ORM like NHibernate could bring, when there's inheritance and lazy loading around. Unfortunately, the example in this post turned out to be somewhat unclear, giving the impression that type casting issues are relevant in some way. This is a short follow-up with another example, that hopefully underpins my arguments a bit more precisely.

Posted On Thursday, September 10, 2009 7:53 AM

Lazy loading, Inheritance, and Persistence ignorance (part 1)

Recently, I came across a problem with NHibernate (and ORMs in general), lazy loading, and polymorphism. Initially I thought it to be just another one of these fancy technical details that one has to deal with all the time. But now I consider it to be a 'real' problem that can question our entire approach to architectural layering.

Posted On Sunday, September 6, 2009 8:07 PM

The silver bullet of software architecture ?
Stumbled across a funny video this morning: An Introduction to the Lego Software Process from Thomas Hansen on Vimeo. This video is taken from the website The Lego Software Process, which states further: "For far too long Software Developers have been living in the stone age. The Lego Process proposes a Modular design. This makes you 20 times as productive. In addition it also makes maintenance a breeze, bugs vanish and security a commodity. Imagine; 20x Productivity No Maintenance Problems And Zero ......

Posted On Monday, August 24, 2009 12:58 PM

Copyright © Thomas Weller | Powered by: GeeksWithBlogs.net | Join free