Behavior and Data Centricity

As I look back at applications and systems that I have been involved with over the years, what strikes me is how data-centric those applications were. In fact, the driving force behind most of those applications was the data. The behavior of an application was looked at as merely if statements and for loops. It was inconsequential. The other thing that strikes me about all of these applications is that, because they were all about the data, they were incredibly dumb. Literally. The applications didn't "think" for themselves. The "logic" governing new data was a purely technical consequence littered with database queries and web service calls, etc.

In the real world, this would be similar to viewing a human as an inanimate object—like a rock. In a data-centric mindset, it's all about the properties of the thing you're dealing with, e.g., the name, size, weight, color, shape, etc. In the case of the rock and human, you get the data you want and continue. This is why a data-centric view is flawed when complexity merits a behavioral view.

In the case of the rock, it just sits there and doesn't do anything, just like the dumb, data container that it is. You do everything to it. But when you interact with a person in real life, the person can understand and work out problems on their own in a behavioral fashion. You can't see their thought processes, you simply feed in sensory information (messages to be consumed through the senses) and the person behaves and interacts with his/her environment (publishes messages). The person has no getters/setters. You simply provide a command and the person decides if he/she wants to respond. (As an aside, I think we should refer to all behavior objects as females.)

How does this apply in DDDD? Simple. You give an object new information to consider. It internalizes the information and when it receives a "command" (a request to perform some action), it decides how it wants to respond based upon the sum total of the object's experience during its lifetime. In other words, all of the data that you have ever provided to the object constitutes the object's experience and understanding and it behaves and makes decisions (publishes a message) based upon that collective experience.

In a nutshell, that's the power behind behavioral programming. It's a very Tell, Don't Ask style in which your objects get the job done, rather than you doing everything. And if you don't like what an particular object is doing? Send it out to pasture and put something else in its place.