Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: (Software Engr) Encapsulate! No,no,no! Decouple! by bikeNomad
in thread (Software Engr) Encapsulate! No,no,no! Decouple! by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-08-15 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?