Produktinformation
|
The most notable thing about Object Oriented Perl is Conway's excellent perspective on object-oriented concepts and how they are implemented in Perl. This book does a remarkable job of cutting through traditional jargon and illustrating how basic object-oriented design techniques are handled in Perl. (A useful appendix attests to the author's wide-ranging knowledge, with a comparison of Smalltalk, Eiffel, C++, and Java with Perl, including a summary of object-oriented syntax for each.) This book also features a truly excellent review of basic Perl syntax.
Throughout this text, the author shows you the basics of solid object design (illustrated using classes that model music CDs). Basic concepts like inheritance and polymorphism get thorough and clear coverage. The book also points out common mistakes and provides many tips for navigating the powerful and flexible (yet sometimes tricky) nuances of using Perl objects. For instance, Conway shows how to achieve true data encapsulation in Perl (which generally allows calls across modules) as well as its natural support for generic programming techniques.
He also pays special attention to popular object modules available from CPAN (like Class::MethodmakerK, which simplifies declaring classes) and discusses performance issues and the tradeoff between programming convenience and speed often faced by today's Perl developer. Advanced chapters cover a number of techniques for adding persistence and invoking methods using multiple dispatching.
Filled with syntactic tips and tricks, Object Oriented Perl is a sure bet for any programmer who wants to learn how to use Perl objects effectively. --Richard Dragan
Topics covered: Perl language review, CPAN, Perl objects, 'blessing' and inheritance, polymorphism, Class::Struct and Class::Methodmaker modules, Perl ties and closures, operator overloading, encapsulation, multiple dispatch, Class::Multimethods, coarse-grained and fine-grained object persistence techniques, performance issues.
Conway beschreibt nicht nur OO Programmierung mit Perl sondern zusätzlich auch die folgenden Themen, die sich an die OO Programmierung anlehnen:
- Automatische Methoden Generierung (Kapitel 8)
- Ties (Kapitel 9)
- Überladen von Operatoren (Kapitel 10)
- Objekt Persistenz (Kapitel 14)
Besonders gefallen haben mir die Kapitel 2 mit einer tollen Einführung in Perl (werde ich noch ein paar mal lesen), die wirklich viele wichtige Details sehr gut erklärt (z.B.Closures, Typeglobs usw.) und Anhang B mit einem Vergleich von Perl mit C++, Smalltalk, Java und Eiffel für die Leute, die von einer anderen Sprache kommen (ich komme von C++).
Der Aufbau des Buches ist sehr gut gelungen, wobei man nicht alle Kapitel in der Reihenfolge des Buches lesen muss. Die einzelnen Kapitel werden jeweils zum Ende komplizierter, nachdem am Anfang die Grundlagen zu einem Thema erklärt wurden. Immer wieder gut sind die im Text eingestreuten Vergleiche mit anderen Programmiersprachen bzw. Sprachstilen. Man merkt, dass sich der Autor intensiv mit OO Programmierung beschäftigt hat. Der Stil das Autors ist gut zu lesen und nicht sehr schwierig.
Leider fehlen mir Kapitel über Testen von Classen, POD und der Aufbereitung von Modulen für CPAN, aber diese Informationen kann man in anderen Büchern finden.
Ich habe " Object Oriented Perl" nach Randal Schwartz's neuem Buch "Learning Perl Objects" gelesen und ich kann diese Reihenfolge sehr empfehlen. Conway's Buch geht noch weiter ins Detail als Schwatz's Buch (mehr als doppelte Anzahl von Seiten). Schwartz's Buch ist ein wenig leichter zu lesen und danach habe ich Conway noch besser verstanden. Für mich ist Conways Buch "Advanced Object Oriented Perl".
Ich denke, dass Damian Conway mit diesem Buch ein Perl Klassiker gelungen ist, den ich jedem Perlprogrammierer empfehlen kann, der sich weiterentwickeln will.
Although the book is perfect, besides the typoos (, but there is an errata page on the www), one wonders, whether perl is the ideal language for object oriented programming. It becomes once more clear, that perl is the most powerful language, but also the most complicated one. If one would apply the "tie()" function regularely, then nobody could read the code any more. Despite that, the book is needed, because perl is now everywhere, and it can only be good to master it.
The chapters of the book are: 1.) What you need to know first (an object-orientation primer), 2.) What you need to know second (a Perl refresher), 3.) Getting started, 4.) Blessing arrays and scalars, 5.) Inheritance, 7.) Polymorphism, 8.) Automating class creation, 9.) Ties, 10.) Operator overloading, 11.) Encapsulation, 12.) Genericity, 13.) Multiple dispatch, 14.) Persistent objects, A.) Quick reference guide, B.) What you might know instead [about other OO languages].
Conway also gives a very thorough coverage of implementating true data encapsulation in Perl and presents several methods for doing so.
Another thing that struck me about this book is Conway's attention to detail. In his code samples, he carefully explains why each line was written a certain way. He even notes which version of Perl a certain feature or module first appeared in.
All in all, a wonderful book. Even if you have been developing in Perl for a while this book has something to offer.
|
Das Forum zu diesem Produkt
Fragen stellen, Meinungen austauschen, Einblicke gewinnen Aktive Diskussionen in ähnlichen Foren
Kundendiskussionen durchsuchen
|
Ähnliche Foren
|
||||||||||||||||||||||||||||||||||
|
|
|