Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
design the interface first


I take that one step further. Design the code that will use the class first, and the interface will, for the most part(*), fall out of the use case provided by that design.

(*) Once the interface has been implemented for the specific, real-world use case, it is often possible to see small changes that can be applied to generalise it for a wider set of use cases, without compromising its effectiveness and efficiency for the one real use case. These are then a no-brainer to adopt.

From my observations, the problem is that far to often people set out to define a class without having some real-world use case to satisfy. The result is that they end up trying to write a generic interface to satisfy all (their) conceived use cases, with the result that they become overburdened with configurability and flexibility and end up being over-engineered and heavy. Carrying the weight of generality that is never exercised. Non-optimal for all use cases.

I don't lay this designer problem at the door of tool-sets like Moose, but it certainly does not discourage it.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^4: How Large Does Your Project Have To Be to Justify Using Moose? (modular) by BrowserUk
in thread How Large Does Your Project Have To Be to Justify Using Moose? by jgamble

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 How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-03-25 22:53 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.