Friday, May 27, 2011

Solid (object-oriented design) - Wikipedia, the free encyclopedia

This is a "note-to-self". While mainly overlooked by many official computer science courses and graduations (mine included), Solid is a very important principle to apply to projects.

It should be standard practice to test every software implementation against it.

I'd turn it into a rule-of-thumb, if possible. After designing the domain classes, check for SOLID. After finishing every release of the product, check for SOLID. Nice and smart!

Thursday, May 26, 2011


This should have been clear enough. DTOs and POCO are two different things. If, by some reason, you are as confuse as I have been:

- Data Transfer Objects are objects that only have data (properties, if we are talking about C#) and, sometimes, logic to retrieve that data.
- Plain Old CLR Objects are objects that are simple -- they have simple logic to represent a real world object. They do contain methods and stuff.

I got them both mixed up some time ago (actually, a long time ago) when designing an architecture. It took me at least an year to discover that, while similar (POCOs may look like DTOs), they weren't the same. You see, I decided not to attach any logic to my POCOs, and I thought that it was "compliant" with this design principle.

Now I was reading some stuff over the matter and remembered to post it here. Someone might make the same mistake.