Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: How Large Does Your Project Have To Be to Justify Using Moose? (modular)

by BrowserUk (Pope)
on Oct 22, 2011 at 22:04 UTC ( #933108=note: print w/ replies, xml ) Need Help??


in reply to Re^3: How Large Does Your Project Have To Be to Justify Using Moose? (modular)
in thread How Large Does Your Project Have To Be to Justify Using Moose?

design the interface first

Bravo!

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.


Comment on Re^4: How Large Does Your Project Have To Be to Justify Using Moose? (modular)
Re^5: How Large Does Your Project Have To Be to Justify Using Moose? (modular)
by Anonymous Monk on Oct 22, 2011 at 22:16 UTC
    So, the one true book(s) to teach you how to design is? :)
      the one true book(s) to teach you how to design

      I acknowledge your smiley. But ...

      I don't think there is such a book. Or a course. Or a language. Or even a fool proof plan for acquisition of the requisite knowledge. As with any skill, practice is key. An initial aptitude helps, but without practice on a good range of practical applications, the aptitude can be stilted or still born. And some will never get it no matter how hard they try.

      There are several books that I would heartily recommend, because I feel I benefitted from them, but they may leave others cold, confused or just outright dissatisfied. The book is only half of the equation and different readers need different things from their books in order to arrive at the same place.

      My recommendations include:


      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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-08-31 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls