Which came first... the domain model or the human?
I found this article on dzone (and other places) recently... and just wanted to state my counter counter argument argument. The summary at dzone said: "Never Start With the Data ModelThe best systems start with a domain model and work through the various layers of the system down to the database, not the other way around..."
I have a big distaste for thinking of models (Data or Domain models) as something special, or truthful. Models are just models... shadows, reflections, abstract thought stuff... they aren't the real thing: Model makers are liars, simplifiers, beautifiers.
Do you want clothes that only fit models? Software also shouldn't be built just to suit models. 'Models' are a modern spin on that ridiculous old notion of plato's cave. The folly of which is that you end up bending the people to suit the model. Build on top of models, sure. But expect the model to need many corrections... factor that into your process. (Breaking news on this subject: Microsoft's SOA vision: 'The model is the application', found via LosTechies, via Interesting Finds) My preference says -- start anywhere. In fact, you start outside the software. With, you know... real people. The actual software aspect can start anywhere. User interface is a great place to start. So is the business logic layer. So is the database. Everything is open to change.
'Michael' on Thu, 01 Nov 2007 12:57:31 GMT, sez: I've been working on a Model Driven Architecture project as described in the article for the past 3 years and my conclusion is that MDA is a ruse.
There are a lot of problems with MDA, some of which Microsoft might be able to fix (namely the lack of good tools) but some of which are paradigm problems.
"The Model is the Code" throws out over 30 years of software engineering common sense. Requirements? Specs? Design? We don't need 'em: "The Model is the Code!" All you have to do is write code and you get the rest of it "for free!" In my experience, the system code/design thrashes horribly...for years.
Also, The Model must still interact with external interfaces which can't be modeled. Modeling business logic is one thing but modeling keyboard input or a graphical display will still be done the "old" way. This detail is often overlooked by MDA proponents.
A lot of folks are going to tout this as the next big thing but you should see it for what it really is: a Silver Bullet. Critically evaluate Model Driven Architecture before blindly accepting it as bigger and better for software development.
And I'm not dumping on you, lb, that article you linked to on Microsoft SOA just prompted a knee jerk reaction from me.
'lb' on Thu, 01 Nov 2007 13:01:42 GMT, sez: >And I'm not dumping on you, lb
not at all -- i think we're in complete agreement.
As soon as someone decides that 'the model is the code' they have to start bending things to try and fit... it's a gruesome mistake.
like you say:
>the system code/design thrashes
>horribly...for years.
great tooling will only help a team to thrash faster, and more vigorously.
'Oran' on Thu, 01 Nov 2007 17:39:49 GMT, sez: So to summarize,
Fact: Models aren't reality, therefore all models are inaccurate.
Fallacious conclusion #1: Since all models are inaccurate, any type of model will do.
Fact: Software needs to start with real people.
Fallacious conclusion #2: Since step 1 is real people, step 2 which involves software can start anywhere.
This sort of "it's all good" attitude is a cop-out for real thinking and forming a well-founded opinion. One of the motivations behind the argument you're criticizing is that the model includes behavior, not just data. Starting from the database tends to neglect the behavior aspect of the model. Starting from the UI tends to focus on behavior at the expense of data. You can start from these points and still be successful, but only if you're consciously compensating for the biases your starting point introduces.
'lb' on Thu, 01 Nov 2007 21:30:29 GMT, sez: @Oran: niiice response.
100% agreement with these two points:
>Starting from the UI tends to focus on
>behavior at the expense of data
>Starting from the database tends to neglect >the behavior aspect of the model
But I'd add a third point:
>Starting from a model lets you neglect
>both behaviour and data equally.
i'd say you have to 'consciously compensate' no matter what technique you use.
my attitiude is definitely not "it's all good" -- but rather "it's all intensely difficult"
In the end you have to go right into each tier in depth, getting nothing for free, regardless of where you start.
|