Try our RSS feed

Unix Review > Archives > 2003 > September 2003
Print-Friendly Version

September 2003

A Comparison of Tcl/Tk Titles

by Cameron Laird

Tcl/Tk: A Developer's Guide
Clif Flynt
Morgan Kaufmann, May 2003
ISBN: 1558608028

Practical Programming in Tcl and Tk, 4th ed
Brent Welch, Ken Jones, and Jeff Hobbs
Prentice Hall PTR, 2003
ISBN: 0130385603

Is there a point to reading Tcl/Tk: A Developer's Guide? As harsh as that question sounds, it's appropriate in a world that already offers Practical Programming in Tcl and Tk. Tcl/Tk: A Developer's Guide is an interesting, intelligent, and accurate book. Its organization and editing make it easy to read, yet it successfully tackles deep and challenging ideas. But Practical Programming in Tcl and Tk, 4th ed has most of the same characteristics. Practical Programming in Tcl and Tk, moreover, is the recognized market leader, and boasts unique coverage of such specific important topics as the use of Tk with other languages, internationalization, 40 pages on the features and changes associated with specific releases of Tcl, and unrivaled attention to Tcl's ability to be extended and embedded. It's comparably current, with full coverage of release 8.4 as the most recent production distribution.

Is Tcl/Tk: A Developer's Guide left with any advantages, then? Are there any prospective readers who will prefer it to Practical Programming in Tcl and Tk, 4th ed? Yes.

Good reading

Tcl/Tk: A Developer's Guide is particularly valuable for those who want to learn Tcl, and all they can do with it. Author Clif Flynt also wrote and maintains the popular TclTutor application, and his engagement with newcomers to Tcl is evident. Practical Programming in Tcl and Tk makes the better reference, in most details, but is less inviting for a programmer who doesn't yet know what he needs to learn. While the most recent edition of Practical Programming in Tcl and Tk has a superb index and smoothes out the occasional abruptness of the earlier editions, it still demands more background of its readers.

Tcl/Tk: A Developer's Guide is "self-contained", in that regard. Carefully study Chapter 11, for example, and you'll not only know how the text widget works, but you'll have practiced thinking about its limits, how to apply text to the most common development requirements, and how to spot and correct common errors. Practical Programming in Tcl and Tk has essentially all the same material — it simply doesn't go to the same lengths to keep the reader on course.

There are specific topics that Tcl/Tk: A Developer's Guide handles more completely than Practical Programming in Tcl and Tk. It's typical that, although both dispatch tk_chooseColor in only a single paragraph, Practical Programming in Tcl and Tk specifies its return value merely as a "color", while Tcl/Tk: A Developer's Guide invests the few extra words to make clear that it's a RGB value such as #90909e. Tcl/Tk: A Developer's Guide, moreover, takes the trouble to reproduce the platform-specific tk_chooseColor displays for Unix, Windows, and Macintosh.

The same Chapter 12 of Tcl/Tk: A Developer's Guide includes a subject no other book more than mentions — production-quality construction of namespace-based "megawidgets". Professional programmers intending to use Tk for complex graphical user interfaces (GUIs) need this information, which corresponds closely to "subclassing" with other GUI toolkits.

Another strength of Tcl/Tk: A Developer's Guide is its explanation of "the Tcl way" in regard to data structures. Tcl has a degenerately simple syntax that, at base, treats all values as strings. This confuses and frustrates programmers coming from C, for example, who are accustomed to thinking in terms of arrays, structures, statically-typed variables, and so on. Chapter 6 on "Building Data Structures with Lists and Arrays" shows off what Tcl can do in the hands of an expert.

Happy combinations

Tcl/Tk: A Developer's Guide's first edition was titled Tcl/Tk for Real Programmers. Tcl/Tk: A Developer's Guide reveals that heritage in its unusual concluding three chapters and appendixes, which are mostly not about Tcl itself, but about other things that make Tcl more valuable, or other things that Tcl makes more valuable. Chapter 14, for instance, is "Extensions and Packages", about the "third-party" software that enhances Tcl for development in such specific domains as systems administration, database management, and complex GUIs.

A final Tcl/Tk: A Developer's Guide feature that merits recognition are the hundred-plus "Problems" that appear at the ends of most chapters. They cleverly focus a reader's attention on important details beyond the scope of the main text.

So, yes, there is a niche for Tcl/Tk: A Developer's Guide. Neither as encyclopedic as Practical Programming in Tcl and Tk, nor as deeply detailed as the books on a single specialized Tcl topic, it does the most for a working programmer focused on delivering commercially acceptable GUIfied applications coded in Tcl/Tk.

Vice President of Phaseit, Inc., Cameron Laird frequently reviews books for UnixReview, and co-authors the monthly "Regular Expressions" column. Many of the applications he develops for Phaseit are written at least in part in Tcl, and he's contributed code and documentation back to the Tcl project since the mid-'90s.

Sys Admin Spotlight

Scyld ClusterWare
Scyld ClusterWare: An Innovative Architecture For Maximizing Return On Investment In Linux Clustering

CMP DevNet Spotlight

Regular Expressions: Two Easy Steps Better Than One Hard One
Complicated regular expressions and yacc are powerful parsing tools, but they can cause trouble in inexperienced hands. One helpful alternative is "partial evaluation" (PE) or "active data" parsing

In the News

Newsletter

Subscribe to the UnixReview Newsletter

Subscribe to Sys Admin

Subscribe to THE journal for UNIX systems administrators. Receive 45% off your subscription by following the link below:

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 11.0

Version 11.0 delivers every issue of Sys Admin from 1992 through 2005 and every issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!




MarketPlace

Pixenate: Safe Secure Photo editing
Pixenate is a web-based photo editor that's safe, secure and easy to deploy across an entire campus or organization. Pixenate requires no client downloads and can be rebranded to suit your organization's identity. Pixenate is ideal for Universities !

Free Embedded Linux Development Resources
Latest components for Freescale, Intel, Atmel, ARM and MIPS processors. Complete cross-development environment, reference Linux distribution, 500+ cross-compiled packages, developer documentation, online help and more. Browse forum/packages for free.

UNIX and Linux Performance Tuning Simplified
SarCheck is a UNIX performance analysis and tuning tool for most UNIX and Linux systems. It produces recommendations and explanations, complete with supporting graphs and tables. Get the most from your hardware by keeping your systems tuned.

We BUY Technology Hardware!
We'll buy your Technology Hardware even if you don't buy ours. Get an offer today!

Wanna see your ad here?