Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: (Software Engr) Encapsulate! No,no,no! Decouple!

by bikeNomad (Priest)
on Jun 01, 2001 at 05:01 UTC ( #84808=note: print w/replies, xml ) Need Help??


in reply to (Software Engr) Encapsulate! No,no,no! Decouple!

I've found that, in general, encapsulation improves decoupling. I don't think your example is exactly the best example of the desire for either, though; it's more about packaging config information. Most of the discussion in SW engineering circles about encapsulation and decoupling has to do with actual program architecture.

Anyway, encapsulation lets us hide the nasty little details inside our modules (or classes, or whatever other mechanisms for encapsulation we have available). By not exposing the nasty little details (like, for instance, object data or internal methods), nothing outside can depend on them. So the coupling between your module and users of that module can be reduced.

The two principles aren't really at odds with each other.

  • Comment on Re: (Software Engr) Encapsulate! No,no,no! Decouple!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://84808]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2022-08-17 10:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?