Re: Separation of concerns
- From: "topmind" <topmind@xxxxxxxxxxxxxxxx>
- Date: 29 Mar 2007 14:58:26 -0700
throatslasher wrote:
On Mar 29, 11:13 am, "topmind" <topm...@xxxxxxxxxxxxxxxx> wrote:
Daniel T. wrote:
"Thomas Kowalski" <t...@xxxxxx> wrote:
It means to keep variables, functions, objects, abstractions as
focused as possible.
And how do you trade off with cohesion?
There is no trade off. Separating concerns means that an abstraction
should do no more than one thing, cohesion means that an abstraction
should do no less than one thing.
That is a precedural-oriented definition because objects are not
necessarily about tasks and task divisions.
-T-
You're so emotionally invested in proving the inferiority of OO that
you are incapable of parsing a simple message without prejudice. You
read the verb "do" and you extrapolate some crazy meaning from the
guy's post. An object that simply holds data still "does" something,
and that has nothing to do with tasks nor procedual programming, so
your post is absurd.
Why would someone treat programming styles like sports teams? Who are
these weird people who actually waste their time pumping up their pet
programming languages or styles and putting down others'?
No, objects *as generally described* are NOT units of "do-ness" (for
lack of a better term). Objects are generally considered as little
state machines that carry behaviors (note plural) related to
themselves. An Employee object may have Hire, Fire, giveRaise, Pay,
Describe, etc. methods. Thus, Employee objects are an "abstraction
that does more than one thing", violating your rule it appears.
Sometimes they are also described as "units of responsibility", not
units of task. I did NOT invent these common interpretation of
objects.
If there is an alternative interpretation of "do...thing", then may I
request more precise wording.
-T-
.
- Follow-Ups:
- Re: Separation of concerns
- From: throatslasher
- Re: Separation of concerns
- From: Daniel T.
- Re: Separation of concerns
- References:
- Separation of concerns
- From: Thomas Kowalski
- Re: Separation of concerns
- From: Daniel T.
- Re: Separation of concerns
- From: Thomas Kowalski
- Re: Separation of concerns
- From: Daniel T.
- Re: Separation of concerns
- From: topmind
- Re: Separation of concerns
- From: throatslasher
- Separation of concerns
- Prev by Date: Re: Separation of concerns
- Next by Date: Re: Separation of concerns
- Previous by thread: Re: Separation of concerns
- Next by thread: Re: Separation of concerns
- Index(es):
Relevant Pages
|