Behavioural Coupling

28 October 2010

When I left work yesterday I had to work through a turnstile. One of those big ones that only one person can go through at any one time, in either direction. So it turns both ways. It is secured so I have to swipe my access card to get in or out. This got me thinking about how that system works. Let’s look at a highly coupled mechanism: Since the turnstile allows either in or out the service the readers needs to know which reader does what. When a request arrives to allow someone access into the building our card...

Read Post

Natural Aggregates vs Synthetic Aggregates

19 August 2010

In databases we have natural keys such as company code, client number, and order number. Then we have synthetic keys that are typically globally unique identifiers (GUID) or auto-incrementing numbers (IDENTITY). It seams to me that we may need to make this same natural and synthetic distinction when it comes to aggregates in domain-driven design (DDD). The whole Aggregate Root (AR) concept makes it extremely difficult to define certain structures; especially when starting out with DDD. I find the reason being that some entities don’t work well as aggregate roots either: because the aggregate root seems to change depending on...

Read Post

Entity vs. Value Object

18 August 2010

This is another question that keeps popping up on Domain-Driven Design. It seems to be a difficult task and some of the answers seem to complicate matters since they come from a technical context. How do you use your object? The same concept may very well be implemented as a value object in one context and as an entity in the next and depending on the type of object this distinction would be more, or less, pronounced. So it is important to understand how you intend using the object. If you are you interested in a very particular instance it...

Read Post

How easy is ORM?

10 August 2010

I subscribe to Code Project newsletters. So this morning I receive one with the following blog post: Mixing Table Per Hierarchy and Entity Splitting And all I can ask myself is how this makes anything easier? Just do your own mapping and be done with it already.

Read Post

Aggregate Roots vs. Single Responsibility (and other issues)

27 July 2010

It is interesting to note how many questions there are around Aggregate Roots. Every-so-often someone will post a question on the Domain-Driven Design Group regarding how to structure the Aggregate Roots. Now, I may be no genius but there are too many questions for my liking. It indicates that something is hard to understand; and when something is hard to understand it probably highlighting a larger problem. Aggregate vs. Aggregate Root “Cluster ENTITIES and VALUE OBJECTS into AGGREGATES and define boundaries around each. Choose one ENTITY to be the root of the AGGREGATE, and control all access to the objects...

Read Post

WCF issues

28 May 2010

I installed a WCF client on a test machine this morning. Since it is using message encryption I installed the relevant certificate in the TrustedPeople store. When the application started I received the following exception: X509InvalidUsageTime Turns out that the machines date was incorrect and fell outside of the certificate’s valid period. A quick date change fixed that. All was still not well as I swiftly moved on to the following exception: MessageSecurityException After some investigation and searching the Net it turned out that the time was way off too and that threw something out of joint. Setting the time...

Read Post

Silo, where are you!

27 May 2010

I just read an interesting article. The reason I say it is interesting is that silos have been denounced for quite some time now, and they should be. Yet, here is someone that appears to be a proponent thereof: “Silos are the only way to manage increasingly complex concepts” I would paraphrase and say: “Bounded Contexts are the only way to manage increasingly complex concepts” But bounded contexts do not solve complexity on their own. You definitely need a sprinkling of communication between them. A lack of communication is what leads to silos. Communication is a broad term but in...

Read Post

There is an aggregate root in my soup!

08 April 2010

So there was yet another discussion around value objects and repositories on the domain driven design yahoo group. In this case it revolves around a the definition of a Country. Firstly, a repository should return an entity; never a value object. Well, so the definition goes. One may want to break that rule but it probably is not necessary. Now the definition of a value object vs. an entity has been rehashed to a point of boredom but another way to look at a value object is a value (albeit a composite value) that _never changes. The date ‘27 April’...

Read Post

Why *I* think software fails

11 February 2010

Since the software industry has now been around for quite some time it is possible to look at the statistics around software failure. Although a great deal has been written and said about software development failure there is probably not too much in the line of anything that can be done about it. There should be. Looking at the history of software development it is quite easy to blame the process or method used to manage the development. Software development is a broad discipline encompassing quite a number of spheres so singling out any particular cause is quite difficult. That...

Read Post

I cannot know what I do not know

07 February 2010

Sounds silly, right? But it is interesting looking at something like the Dreyfus model of skill acquisition and pulling that through to software development and what I have experienced over the years. Now whenever there is a paradigm shift one inevitably goes back to the Novice level. The fact that one has been doing something A for 10 years may not count for much when I move to something B. I say may not because A and B may be related, so I may not end up way back on the Novice level. I think the fact that software development...

Read Post