Book Reviews

The following book reviews are the copyright of their respective authors and no part should be reproduced without the express permission of the author. Publishers and Authors of the books reviewed may reproduce the whole or extracts of a review for their book. To request copyright permission please email webmaster@birmingham.pm.org.

All the reviews herein are the opinions of the reviewer and are not necessarily the views of Birmingham Perl Mongers and its members. If you feel a review or comment has been made in error, please contact webmaster@birmingham.pm.org to rectify the situation.

Perl Books

Static Link: http://birmingham.grango.org/reviews/19

 
Mastering Perl/Tk
Title:Mastering Perl/Tk
Author(s):Steve Lidie and Nancy Walsh
ISBN:1-56592-716-8
Publisher:O'Reilly Media
Reviewer:Mike Lacey

Mastering Perl/Tk does pretty much what it sets out to do. It will take a Perl/Tk beginner and help him or her learn to be a Perl/Tk expert.

Perl/Tk fills a niche which no other development environment seems to have addressed. Cross platform development of GUI driven programs complete with Menu's Drop Down List Boxes, Text Boxes and Command Buttons. Which sounds, on the face of it, a lot like CGI and The Web. And it is, but with one important difference. The Web is stateless, and that makes it difficult to write some programs.

Perl/Tk drops nicely into this gap. Developers can produce programs that will run in the native windowing environment of whatever MS-Windows or UNIX machine they find themselves.

This book is a follow-on to Nancy Walsh's Learning Perl/Tk and, whilst it's said that the book is for beginners, it's not for Perl beginners; you should feel comfortable with hashes, arrays and subroutines (inc. anonymous hashes, arrays and subroutines) before you buy this book. Also, a familiarity with Perl Object Oriented techniques will be more than slightly helpful.

The Perl/Tk way of working is nicely described, the reader is taken through the advantages of using Perl/Tk as opposed to utilizing the native windows API of whatever target machine you are developing for.

MS-Windows and UNIX users are catered for, which makes a pleasant change after reading some (very well thought of) books that make only passing references to MS-Windows.

MS-Windows programmers used to VB and VB style coordinate addressing schemes will do well to pay close attention to the chapter on Geometry Management. This is something you don't have to think about when programming trivial to medium programs in VB. You simply say - put this control there, and there it goes. Perl/Tk requires you to pay a little more attention to how things are placed on the screen but then rewards you with sizable windows whose contents are sensibly placed no matter the size of the window. The Geometry managers available to Perl/Tk are discussed, even the more recent "form" geometry manager.

The main "widgets" (controls, the PC people) are then described along with some well thought out examples. A nice surprise for the PC people will be the Text widget which is a lot more flexible than the corresponding MS-Windows control.

After the widget discussion there's a brief, but quite adequate, excursion up the Menu System, a discussion of some methods that don't belong to any particular widget, and then it's off into advanced territory with detailed examples of creating your own widgets (in Perl), animation, and interprocess communication, creating your own widgets (in C) and using Perl/Tk and The Web.

This book is well thought out, detailed and quite readable. If I have a criticism it's that there is sometimes too much detail if all you want to do is to "get it going", and that's not much of a criticism.