--- In [email protected], Todd Biske
<[EMAIL PROTECTED]> wrote:
>
> One point that Anne made which still doesn't get a lot of press is
> the difference between Resource Oriented Architecture and Service
> Oriented Architecture. In a companion article, it was called out
> that REST is about the nouns, where SOA is about the verbs. This is
> part that I think needs some honest debate. Is a resource oriented
> view of the world going to be better than a service oriented view?
> Many people keep associating REST with SOA, but I think that's an
> inaccurate portrayal. The people I've spoken with have been doing
> POX over HTTP, which is not REST, and I'd argue that there are some
> very big differences.
>
> -tb
Todd,
Wasn't the noun-oriented view of the world thoroughly and effectively
ridiculed by Steve Yegge last year (see [1])? Whilst his target is
clearly Java in this case, the same comments could be applied to REST.
But seriously, I agree that this needs further elaboration and debate.
Unfortunately, more than two decades of experience in conceptual
[data] modelling leads me to believe there will be no simple answer.
If you haven't already read the book "Data and Reality" by William
Kent [2], then I urge you to rush out and buy a copy immediately.
The book was first published in 1978 and although some of the
language might now seem old fashioned, the content is still highly
relevant. Read it. If you are not truly humbled and realise how
little you know, about anything, then read it again!
For example, on page 3 Kent asks you to consider the problems of
modelling the simple concept of a "book". For a bibliographic
system, you might wish to record details about an author who has
written two books using two entries (resources) in the database, one
for each book and with attributes of title, author, etc.
But a library system would be different. The library might have five
copies of each of the books and is more interested in the location of
each physical copy. The library database will therefore need to have
five entries (resources) storing information about each copy and
whether the book is out on loan, and if so to whom.
For both systems, how will you then deal with books published in
separate parts (such as the long-awaited Vol.4 of "The Art of
Computer Programming", for example), or a single volume of "collected
works"?
What about a single volume collecting works by different authors? Of
course you can extend your conceptual model to deal with all of these
differences, but it then becomes very complex and probably very
abstract.
What, then is the correct model for a book? If you choose a simple
and elegant one, it is likely to only deal with a certain class of
applications (e.g. just the bibliographic system or just the library
system). If you choose a complex one, you might be able to deal with
multiple applications, but you increase the difficulty of
implementing each one. And you will still never be certain that your
complex model will be able to deal with every future eventuality.
The "right" answer will therefore depend on what you expect to do
with the system, both now and in the foreseeable future.
Without getting too philosophical here, cultural and linguistic
factors also come into play when creating conceptual models (read up
on Weltanschauung [3] and Sapir/Whorf [4], for example). You will
realise this if you have ever tried to gain agreement on models
across a multi-national company, for example.
Kent puts it all rather well on page 19:
"...we are not modelling reality, but the way information about
reality is processed, by people."
This is a hard problem and one that is not going to get simpler.
If you're a developer, I hope you can see that it is never that
obvious what your "resources" should be (for REST) or what operations
you need to perform on them. Whether you need to concentrate on the
nouns or the verbs will not always be clear. And what is "right" for
one application may be entirely wrong for another.
In the past few years, I sense that conceptual modelling has become
rather unfashionable. I find that developers tend to just throw
together a few Java classes (without much thought) and then assume
some magical O/R tool will create an appropriate database for them.
Many years ago, as a solution architect, I always used to resist this
and insisted on defining a proper conceptual database schema up
front.
Sadly, I found generally that developers were poorly skilled at
defining such models, never having been taught the discipline.
If the current debate on SOA/REST raises an awareness of the
importance (and difficulties!) of conceptual modelling and improves
the general level of such skills in the industry, then that at least
would be a "good thing" in my view.
Regards,
-Mike Glendinning.
[1] http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-
nouns.html
[2] http://www.amazon.co.uk/Data-Reality-William-Kent/dp/1585009709
[3] http://en.wikipedia.org/wiki/World_view
[4] http://en.wikipedia.org/wiki/Sapir%E2%80%93Whorf_hypothesis