Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Java network programming books: A comparative review

Laurence sifts through another batch of Java books, trying to separate the nuggets from fool's gold

  • Print
  • Feedback
Five Java network programming titles landed on my doorstep for this review:
  • Java Network Programming, by Elliotte Rusty Harold (O'Reilly)

  • Java Network Programming, by Merlin and Conrad Hughes, Michael Shoffner, and Maria Winslow (Manning, an imprint of Prentice-Hall)

  • Advanced Java Networking, by Prashant Sridharan (Prentice-Hall)

  • Java Networking and Communications, by Todd Courtois (Prentice-Hall)

  • Java Networking and AWT API SuperBible, by Nataraj Nagaratnam, Brian Maso, and Arvind Srinivasan (Waite)


Before I review the books in detail, let's quickly look at each book's main attributes:

Table 1: Java network programming books overview



Java Network Programming (O'Reilly) Java Network Programming (Manning) Advanced Java Networking Java Networking and Communications Java Networking and AWT API SuperBible


Price 4.95 4.95 9.95 9.95 9.99


Pages, Chapters (Appendices) 422, 15 (0) 519, 29 (4) 366, 12 (2) 317, 8 (1) 930, 13 (6)


Index Very Good Poor Very Poor Poor Very Good


Glossary No No Very Poor No Good


CD-ROM No (but source on FTP site) Yes Yes Yes Yes


Authors 1 4 1 1 3


Object-
Orientation
Average Very Good Average Average Average


TCP/IP Average Poor Poor Poor Poor


Multithreading Poor Very Good Average Average Good


Streams Poor Very Good Average Average Poor


Serialization Average Average Poor Very Poor None


RMI Very Good Average Very Good None None


Servlets Good None Good None None


The last few attributes require some explanation:

The Object-Orientation attribute indicates to what extent the author(s) of the respective book used Java the way it is meant to be used: in an object-oriented way. Good Java books, whatever their focus, enforce good object-oriented practices. Inferior books use Java as if it were C or Pascal; that is, in a procedural way. Networking applications are very good candidate applications that benefit from being designed and implemented using object-orientation, so a good Java network programming book requires a strong emphasis on object-oriented analysis, design, and programming (OOA, OOD, and OOP).

The TCP/IP attribute indicates to what extent the book gives you a thorough TCP/IP primer. Personally, I would expect such a primer in any Java networking book; yet none of the books in this review dwell much on the internals of TCP/IP. But don't let this particular oversight worry you; the whole point of Internet programming using Java is that the API lifts you to such heights of abstraction that much of the IP, UDP, and TCP protocol details disappear. If you're like me, and you still want to know how the Internet works "under the hood," then you should invest in the classic (and excellent) TCP/IP bible TCP/IP Illustrated, Volume 1 - The Protocols by W. Richard Stevens (Addison-Wesley).

The Multithreading attribute indicates to what extent the book uses and/or explains multithreading. Multithreading is a key ingredient in any non-trivial networking applications (especially for server-side programs).

The Streams attribute indicates to what extent the book uses and/or explains Java's java.io classes. Making heavy use of stream classes in networking applications can simplify a design and make it more flexible.

  • Print
  • Feedback

Resources
  • JavaSoft's Java Tutorial is always a good source for officially sanctioned code examples, although it usually takes a while for the tutorial to reflect the latest APIs. The tutorial includes sections on the networking APIs. http://www.javasoft.com/doc/tutorial.html
  • This Web page is the home of a mailing list devoted to Java network programming discussions. It also contains a link to the complete archive for this list (unfortunately as a single 3Mb text file!). http://www.cdt.luth.se/~peppar/java/java-networking-list/
  • A Q&A page from San Diego State University's CS596 Client-Server Programming course (rather dated, from early 1996). http://saturn.sdsu.edu:8080/~whitney/courses/spring96/cs596/notes/java/javaNetworkQA.html