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

Re^3: Which is best book to start learning Object Oriented Perl?

by Laurent_R (Canon)
on Apr 27, 2018 at 16:56 UTC ( [id://1213693]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Which is best book to start learning Object Oriented Perl?
in thread Which is best book to start learning Object Oriented Perl?

While I agree with both your posts, I would add that chromatic's book explains how to do it the modern way (Moose), but does not say very much about object orientation in general. Damian's book, while somewhat obsolete in terms of the technology used, says much more about object orientation in general, its principles and why. In that sense, Damian's book comes closer to teaching object orientation.
  • Comment on Re^3: Which is best book to start learning Object Oriented Perl?

Replies are listed 'Best First'.
Re^4: Which is best book to start learning Object Oriented Perl?
by chromatic (Archbishop) on Apr 27, 2018 at 20:39 UTC
    chromatic's book explains how to do it the modern way (Moose), but does not say very much about object orientation in general.

    Sure, that's not the point of the chapter. Even so, I like to think that principles such as "favor composition over inheritance", "take advantage of encapsulation", and "define your interfaces well" come across clearly. Then there's the Advanced Perl OO section which goes into LSP, DRY, and even immutability (which is present, though not made explicit, in almost all of the examples in the code and the rest of the book).

    I thought about adding SOLID or at least Open-Closed, but couldn't find the right way to work it in in further detail.

      Hi chromatic,

      I definitely agree with you. I hope you didn't interpret my comment as a critique of your book, which it is definitely not. In fact, I found Modern Perl so useful and good that I bought the paper copy after having read it on-line. I even co-translated it into French (https://perl.developpez.com/tutoriels/perl/modern-perl-2014/) about 3 years ago. And I have learned quite a lot from reading this book, including especially from the OOP chapter. My point was just that your book couldn't cover in just one chapter as much as what Damian is covering in a full book.

        No critique taken! I just wanted to give some context that's not always obvious to readers.

        My goal is to teach good OO programming in Perl without having to focus on the mechanism of making objects; that's why I started with Moose first, went into design principles, returned to core syntax, and then gave pointers to advanced topics.

Re^4: Which is best book to start learning Object Oriented Perl?
by davido (Cardinal) on Apr 27, 2018 at 20:21 UTC

    You are absolutely correct. I really tried to follow-up in my post by adding other resources that were more about the theory and application of Object Oriented design. But unfortunately I couldn't come up with just one or two comprehensive resources. Even as I try now to list out a few that stand out for me I realize that there are simply too many, and although the Design Patterns gang of four book stands out, it is not an intro, or even a comprehensive explanation of OO. Someone newer to the concepts probably has a better recollection of the thing that really flicked the light bulb on.


    Dave

Re^4: Which is best book to start learning Object Oriented Perl?
by LanX (Saint) on Apr 27, 2018 at 17:32 UTC
    I agree, but as far as I remember (my copy is at the office) Damian wasn't explaining mixins aka roles back then.

    So it's not covering all important aspects.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found