alkampfer on January 30th, 2012

I’ve more to say about the Traffic Light example I explained in a previous post, if you look at that post, you can notice that the Domain is composed by properties that have only getter and not setters. This needs is explained in this post, where I explain why you should protect the status of [...]

kick it on DotNetKicks.com

Continue reading about Traffic light, say goodbye to public properties

alkampfer on January 23rd, 2012

I’m reading the exceptional Object Thinking book, full of interesting considerations about thinking with an Object Oriented mind. One of the main concept of the book is that quite often we are using objects in a procedural way so we are still in the realm of procedural programming even using inheritance, constructor, etc etc. As [...]

kick it on DotNetKicks.com

Continue reading about Is my Domain Model really anemic?

Fluent interfaces are great for a various amount of situations because they permit to create a simple DSL using only the base capabilities of your language of choice. I like very much Fluent Interfaces especially to create Factories to avoid messing with several constructors when your classes are complex to create. The model Suppose you [...]

kick it on DotNetKicks.com

Continue reading about Fluent interface for factory to create hierarchy of objects

alkampfer on November 8th, 2011

If you read my last post, I explain how I solved a really stupid problem of managing a Traffic Light using OOP principles and the concept of Domain Events, now I want to emphasize some of the advantages you have using this approach. One benefit is in unit testing, suppose you want to test that [...]

kick it on DotNetKicks.com

Continue reading about Advantage of DDD approach to problem

alkampfer on November 7th, 2011

Suppose you need to implement a traffic light manager for a crossroad and you decide to approach with a DDD style to experiment some patterns and techniques. Going with DDD-Like approach in such a simple scenario is probably not the best idea, but the aim of this little experiment is trying to approach a problem [...]

kick it on DotNetKicks.com

Continue reading about Traffic Light Experiment