Which came first... the domain model or the human?
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

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 Model

The 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.






'mat roberts' on Fri, 16 Jan 2009 11:24:19 GMT, sez:

When I first started programming I was a believer in starting in the business layer. If you got that right then the UI and the database would just 'drop out' naturally.

I worked with a guy called Rob, and he loved thinking about the UI and doing mock-ups of what it would look like. The thing is he got lots of feedback from the users this way.

At the same time I worked with a guy called Simon, and he loved the data layer. What he was very good at extracting was "What makes this thing unique".

Each model brings different things to the party. Like you say, start anywhere. But make sure you cover all 3 models, at least a bit, or you'll miss something obvious.




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Who reads this legal bit anyhow?

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

TimeSnapper won last year's Developer Competition at Larkware.com, and is used by over 10,000 people.

Articles

DOS on Dope: The last MVC web framework you'll ever need DOS on Dope: The last MVC web framework you'll ever need
JSON Query Languages: 5 special purpose editors JSON Query Languages: 5 special purpose editors
What then, is b? What then, is b?
SQLike: A simple editor SQLike: A simple editor
Yet Another BizPlan Generator. Yet Another BizPlan Generator.
HOT GUIDS: A hot or not site for guids HOT GUIDS: A hot or not site for guids
How does life get better? One tiny hack at a time. How does life get better? One tiny hack at a time.
24 things to do, and 100 things *not* to do (yet) for building a MicroISV 24 things to do, and 100 things *not* to do (yet) for building a MicroISV
Venture capital won't kill Jeff Atwood, it will only make him Jeffer. Venture capital won't kill Jeff Atwood, it will only make him Jeffer.
A handy workflow image for newbie mercurial users A handy workflow image for newbie mercurial users
Fractal Feedback, a diversion into recreational programming Fractal Feedback, a diversion into recreational programming
Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe. Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe.
Suggested User Experience Improvements for DiffMerge Suggested User Experience Improvements for DiffMerge
SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

World's Simplest Code Generator (html edition) World's Simplest Code Generator

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading

The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink

Aggregated Links

proggit
dzone
hacker news
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
weekly link post

LinkedIn profile
LogEnvy - event logs made sexy
ShuffleText - fuzzy search for .net
PC Smart Buys - Computer Hardware in Australia
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy