I don't agree - imho a good design is art - so I indeed confirm with
Don Knuth: The art of programming ...
Using nouns and verbs is a good way of introducing
Object Oriented Programming (OOP). I think it is effective in breaking
the mindset of procedural programming and changing the direction of thinking.
It is also very effective in explaining some key concepts.
However, it is effective only as a way of thinking. There can be problems
when we start using it as a design philosophy.
As Buko Obele says, programming is not art.
He goes on to show where nouns and verbs can create problems:
The word ‘person’ in a sentence isn’t dependent upon
any notion of a particular verb, it always exists prior and apart from the
sentence. In practice we would never say that a person who can’t, for
example, ‘run’ isn’t a person because ‘person’
is its own word.
But in object oriented design precisely the opposite is true: the person
type (concept) is defined by its ability to ‘run’ and objects that
don’t know to run are strictly not persons. In object oriented design
concepts do not exist separately and apart from their methods at all —
instead, the whole point is that they are strictly constituted by their
methods. So all the talk of subjects and verbs may be a decent way to explain
object oriented design but it’s self-evidently the wrong approach to
doing object oriented design.
I remember Joshua Porter’s quote, which I think is valid about all
designs:
Art is about personal expression, Design is about use.
But a design is useful only within its scope, anywhere outside it goes
completely invalid.
The biggest problem is in using the nouns and verbs to map the two
languages, that is, the natural language and the programming language.
As Buko says, the natural language is full of metaphors and ambiguity and
many times without any defined scope, which is of little help in designing
software systems. There are lesser bindings, lesser dependencies and
capabilities can vary a lot. However, we start tightening bolts when we
start to define the scope for our software system. That is the time when
we actually redefine, or you can say choose a subset of, the nouns and verbs
for our convenience and understanding. We create associations, define
capabilities, lifecycles and identify dependencies.
In my opinion nouns and verbs are very effective in identifying in what
to do, who does it and catching
improper assignment of responsibilities
early in the design, but only if the scope is defined. Otherwise it ends up
cycles of discussions and redesigns and then frustrations.
[ Datum/Zeit: ]
Tue, 30 Oct 2007 12:25:22 +0000
[ Quelle: ]
Abhijit Nadgouda
http://feeds.feedburner.com/ifacethoughts/entries
[ Verweis - Eintrag ]
http://feeds.feedburner.com/~r/Ifacethoughts/entries/~3/177158404/
[ Verweis - Eintrag ]