Re: Encapsulation vs separation of concerns
From: Daniel T. (postmaster_at_earthlink.net)
Date: 01/01/05
- Next message: frebe: "Re: Encapsulation vs separation of concerns"
- Previous message: Tammy: "Re: Tammy's Error Counting and Tool Set"
- Maybe in reply to: H. S. Lahman: "Re: Encapsulation vs separation of concerns"
- Next in thread: Mark Nicholls: "Re: Encapsulation vs separation of concerns"
- Reply: Mark Nicholls: "Re: Encapsulation vs separation of concerns"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 01 Jan 2005 06:05:27 GMT
"Mark Nicholls" <nicholls.mark@mtvne.com> wrote:
> "Daniel T." <postmaster@earthlink.net> wrote:
>
> > So you see, there is no tradeoff, one can have fully encapsulated
> > classes *and* a strong separation of concerns.
>
> OK, but in order to seperate concerns (into seperate modules/subsystems) one
> has to formalise interfaces for those concerns to interact. Unfortunately in
> most OO environments this entails exposing those interfaces to the world
> i.e. unencapsulating them. If you keep the concerns entwined within the same
> module, then this interaction is a completely private encapsulated
> interaction.
There seems to be some confusion as to what interfaces are. A class that
implements an interface is fully encapsulated because the interface is
the shell or capsule that contains the implementation.
> Encapsulation (to me) is not an absolute property, but a sliding scale,
> based on the context of it's clients requirements.
I'm happy to agree here, at least to an extent. A class can be
encapsulated or not. If it isn't, then there are degrees of exposure.
> The only 'fully encapsulted class' is the empty class......
>
> module UselessModule
> {
> private class CIAmAlmostFullyEncapsulatedYetICanDoNothing
> {
> private CIAmAlmostFullyEncapsulatedYetICanDoNothing() {}
> }
> }
I think you are wrong here. A fully encapsulated class can still expose
an interface, that's the whole point of the capsule part...
- Next message: frebe: "Re: Encapsulation vs separation of concerns"
- Previous message: Tammy: "Re: Tammy's Error Counting and Tool Set"
- Maybe in reply to: H. S. Lahman: "Re: Encapsulation vs separation of concerns"
- Next in thread: Mark Nicholls: "Re: Encapsulation vs separation of concerns"
- Reply: Mark Nicholls: "Re: Encapsulation vs separation of concerns"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|