![]() |
|
Returning to Java after a few years of not watching closely what's going on in the Java world is unsettling. Sure, my friend co-runs a startup and talks knowledgeably about embedding Java in phones, handheld devices, PIMs written in Java, wireless database access, and something called the J2ME. But I never really got the drift.
Not just for applets anymore, Java has a new home, and that home is the server. Or the cell-phone. It depends on whom you talk to. Ted Neward's Server-Based Java Programming enters the Java fray by, in addition to being focused on the server, discussing changes in Java and how certain features of Java (such as ClassLoaders) will benefit people developing "enterprise applications." Neward defines "enterprise applications" as in-house applications having a number of unique requirements that differ from those in the skrink-wrapped world.
Server-Based Java Programming is not an introductory Java text, and Neward maintains an intermediate to advanced tone very well. You will benefit most from this book if you have knowledge of Java 1.1 (Neward is careful to emphasize the new Java 1.2 (Java 2) features).
One interesting feature is the book's lack of material on Enterprise JavaBeans (EJB). Neward says he wants to build his own server system, which he does (called "GJAS"), to demonstrate how features of Java are uniquely suited to a flexible server environment. There are chapters on: ClassLoaders, creating custom class loaders, extensions, threads, sockets, servlets, business objects, middleware and JNI.
Manning seems to publish thoughtful books. This one, and the one other I've seen from this publisher (Practical Software Requirements, by Ben Kovitz) gets pretty dense on exposition. Manning authors are allowed to think aloud, develop arguments, and often seem to know what they are talking about. This is unusual in a world numbed by the dummies approach.
For instance, with Server-Based Java Programming, Manning has produced a nicely-edited book with very few illustrations: That means a 592-page book with a lot of actual text. This would not be surprising were the author merely rambling or happy-talking. But it turns out Neward has something to say, has background research to back up his claims, and supplies footnotes.
What kind of topics are developed? In the thread chapter, for example, he revisits the Thread API, and presents the argument that implemention-based inheritance requires knowledge of the base-class semantics, and that it breaks encapsulation, one of the high doctrines of object-orientation. Then he shows template code demonstrating the ritual ways in which threads are coded, some of which he uses later in the book.
Neward uses "Gang of Four" design patterns throughout the book as shorthand to explain Java design decisions (his own, or Sun's); another topic you may need to be familiar with before reading this book.
One thing is odd. If you've grown up with the premise that compile time type-checking and tightly-bound code make for stable software development, the book's emphasis on dynamic linking seems ironic. The object-oriented world now emphasizes the benefits of loading and instantiating at run time objects that you don't know much about.
Of course, opinions about software development change, and Neward does a good job arguing that dynamic linking is a case of a different approach meeting a different need.
Computer books are best when they bring a bit of the author's experience to the industry-provided documentation. When an author has lived with the topic, the book gains value. This book rates fairly well on that score. For example, Neward's biography shows he has taught courses for DevelopMentor, and one gets the feeling that the logic of his presentation has been honed by teaching experience.
The clarity of Neward's writing is above average, though not immune to the marketing hype that infects Java books. Neward keeps the Java praise to introductory passages and the first 10 percent of the book, where many authors are prone to fall a bit deeper into Sun's Java marketing trap.
In fact, some of this book gave me a feeling of Deja vu from my own Java-book-writing experience. Consider the poor Java author, trying to keep up with changes in the language. (C++ authors have had similar problems.) Witness the "fixing" of the Java event model between the Java 1.02 and Java 1.1 release.
It's difficult to write about such a topic without relying heavily upon the industry documentation, and the industry documentation usually presents the new approach as the best in history.
The thing that's glossed over in all this hyperbole is the iterative nature of design -- it's always likely that later versions of a language or operating system fix previous sins and omissions. It's when the fixes are presented as a sort of visit to Mount Sinai that computer books become truly peculiar. But of that crime, this book is largely not guilty.
-- Doug Nickerson (dougnickerson@yahoo.com)