Dr. Dobb's Journal October, 2004
Java Open Source Programming
Joe Walnes, Ara Abrahamian, Mike Cannon-Brookes, and Pat Lightbody
Wiley, 2004
459 pp., $45.00
ISBN 0471463620
Coder to Developer: Tools and Strategies for Delivering Your Software
Mike Gunderloy
Sybex, 2004
297 pp., $29.99
ISBN 078214327X
Effective Software Test Automation: Developing an Automated Software Testing Tool
Kanglin Li and Mengqi Wu
Sybex, 2004
408 pp., $44.99
ISBN 0782143202
For programmers of my generation, the Standard Model of programming consisted of C, Emacs, Make, UNIX command-line tools such as cat and grep, CVS, and character streams. Now, 25 years later, a replacement is taking shape. Its main elements are Java, the Eclipse IDE, Ant (for building), JUnit (for testing), Subversion (for version control), reflection (for extensibility), and XML (as a universal data-storage format).
So much of this New Standard Model is open source that most of the books describing itincluding Java Open Source Programming by Joe Walnes and companyhave the phrase in their titles. The first half of JOSP shows you how to build yet another online pet store. Instead of starting with servlets, however, the authors begin by explaining how they will test the application with JUnit and dynamically generated mock objects, and how they will use Hibernate to handle database persistence.
The application itself is then built using WebWork (a Model-View-Controller framework) and SiteMesh (for layout). Search is added using Lucene, XDoclet is used to generate configuration files from metadata embedded in the Java source, and then the authors pause to describe how they communicate via CVS, wikis, mailing lists, IRC, and so on.
And we're not even at page 200 yet...
The second half of the book goes back over the application, replacing the simple throwaway prototypes of the first half with versions that could carry their weight in the real world. Want to know how experienced developers figure out how to manage object lifecycles and dependencies? That's Chapter 14. Look and feel? Chapter 17. There's even some discussion of security, although this material felt like an afterthought and didn't quite live up to the standard set by the rest of the book, which is quite high. The writing is clean, the examples are explained well, and the authors didn't waste time grinding methodological axes. It's definitely not for beginners, but every professional developer will find something useful in this clear, topical survey.
When I was a young lad, there weren't many books that would teach you how to program. Oh, there were plenty that talked about this language or that algorithm, but if you wanted to learn the mechanics of developing software that worked, there was Brian Kernighan's Software Tools in Pascal, and very little else.
Twenty-two years later, there's still only a handful to choose from. The good news about Mike Gunderloy's Coder to Developer is that it increases the number by one. This practical, readable book is subtitled, "Tools and Strategies for Delivering Your Software," and that's exactly what it's about. Project planning, source-code control, unit testing, logging, and build management are all there. Importantly, so are newer topics, like building plug-ins for your IDE, code generation, and things you can do to protect your intellectual property.
Coder to Developer is a little more nuts and bolts than Andy Hunt and Dave Thomas's Pragmatic Programmer, but just as well written and just as useful. Two thumbs up.
One of the most important features of the "New Standard Model" of programming is its emphasis on unit testing. Just five years after the first version of JUnit was written, an ever-increasing number of programmers actually create and run tests as a matter of course.
But writing tests by hand is still tedious and still requires a fair degree of programming skill. Enter Kanglin Li and Mengqi Wu's Effective Software Test Automation. Over the course of 12 detailed (and sometimes rather intense) chapters, the authors explain how to build a higher level testing tool for .NET programs using reflection (to find and call the methods being tested), CodeDOM (to generate testing code from specifications), and Excel (as a user interface).
Using an application like Excel as a UI may sound strange to UNIX programmers, but thanks to its COM interface, programs can drive it and read data from it with ease. Once QA staff have created a spreadsheet full of tests, the tool described in this book reads in their test cases, generates code to implement those tests, loads the classes to be tested, and runs that code.
The testing tool by itself is interesting and useful, but what I really enjoyed about this book was the authors' explanation of how to build it. Flat text files and handwritten code will always be with us, but structured data and machine-generated code are becoming more important with every passing day. If you'd like a glimpse at how the next generation is going to program, this book is a good place to start.
DDJ