So many J2EE books, so little time

Find the best J2EE book for your purposes

When it comes to J2EE (Java 2 Platform, Enterprise Edition), you don't know a hill of Enterprise JavaBeans (EJBs). Don't worry, you'll find plenty of reading material to give you a hand. In fact, you may find too much! I'm here to help you narrow the choices to a single book you can carry from the bookstore without getting a hernia.

J2EE is a multifarious collection of server-side technologies that together forms the basis of powerful enterprise applications. I won't bore you with yet another J2EE overview; chances are you've already read one or more. On top of that, any one of the four J2EE books I review here will give you such an overview.

In this article, I review the following four J2EE books:

Beyond each book's merits, I also delve into their bonus resources such as Websites or CDs. Finally, I summarize my comparisons and give you a definitive answer regarding which is the best.

When I read a book review, especially a comparative book review, I want unequivocal answers. For this review, then, I answer the question, "On my four-day backpacking trip in the Emigrant Wilderness next week, which one book will I bring?"

J2EE books at a glance
 CodeNotes for J2EE: EJB, JDBC, JSP, and ServletsJava for the Web with Servlets, JSP, and EJBProfessional Java Server Programming, J2EE 1.3 EditionSams Teach Yourself J2EE in 21 Days
Price (US$)9.959.994.999.99
Pages2229531,2481,094
Weight9.25 oz.3 lbs., 5 oz.4 lbs., 1 oz.4 lbs., 1.5 oz.
IndexBasicGoodGoodGood
GlossaryNoNoNoYes
CD-ROMNoYes—basicNoYes—good
Authors31135
J2EE version covered1.2.11.3*1.31.3

* Not explicitly stated; I inferred this from the fact that he covers Servlet 2.3, JSP 1.2, and EJB 2.0.

CodeNotes for J2EE: EJB, JDBC, JSP, and Servlets

At 222 pages, CodeNotes for J2EE: EJB, JDBC, JSP, and Servlets runs considerably shorter than its brethren (or did you think that was a typo?). The CodeNotes series strives to teach any technical subject in fewer than 200 pages—a laudable concept.

The Website

While I favored CodeNotes for J2EE: EJB, JDBC, JSP, and Servlets from the start, I was chagrined to learn how the writing team achieved some of the sleekness: They periodically relegate various subjects to the CodeNotes Website (the book does not include a CD).

I consider that somewhat of a cheat, but in practice I didn't find it that painful. Moreover, I could discriminate a little more about what I needed to read. Normally when I read a book, I read through unnecessary parts, unless they are really long and clearly irrelevant. In this case, if a particular reference is not pertinent, I won't bother to read it on the Website.

Unfortunately, when I did want to look up a subject on the CodeNotes Website, I found the site slow and unreliable. The last several times I tried to access it, I received a "Could not connect to JRun Server" message—not a stimulating application of J2EE technologies. Let's give them the benefit of the doubt and chalk it up to a hardware problem; hopefully by the time you read this, the site is back online.

The book

As for the book itself, ironically, the authors spend too much time (or too many pages, as it were) on subjects best relegated to the Website. In particular, the introductory JDBC (Java Database Connectivity) material seems altogether unnecessary, as numerous other books cover JDBC alone.

Likewise, the basic servlet and JSP (JavaServer Pages) coverage could be scaled back (or moved to the Website) in a book of this type. Being a thin book (a good thing), it should skim quickly over those J2EE aspects well covered in the literature. My guess is that anyone embarking on serious J2EE work probably already possesses a bountiful bookshelf, including books on Java itself, Swing, JDBC, servlets, SQL, and JavaScript, among others.

CodeNotes for J2EE: EJB, JDBC, JSP, and Servlets has a sparse index, and the table of contents' vague headings—such as "Neat Tricks" and "Core Concepts"—didn't help me find specific topics. If I didn't know for sure the book covered a particular topic, I would have assumed the book didn't cover it and given up.

CodeNotes for J2EE: EJB, JDBC, JSP, and Servlets's small size proves handy for learning on the go, reading a page or two while waiting at the dentist or while sipping a double shot, no-whip, nonfat mocha Valencia at the local coffee shop. The book's biggest problem: it simply is not up to date with J2EE 1.3. The book covers J2EE 1.2.1, but has not (yet) been updated. For example, the book mentions message-driven beans as a coming feature, but does not explain further.

To sum up

Despite all my griping, I did like CodeNotes for J2EE, generally speaking. I like a book that zips through the material and doesn't blather on or repeat points made earlier. Indeed, I wish more publishers would favor this style. So, CodeNotes folks, please quit wasting time writing .Net material and update your J2EE book!

Java for the Web with Servlets, JSP, and EJB

I found Java for the Web with Servlets, JSP, and EJB a generally lucid, mostly well-written text, but it is not without the occasional literary hiccup.

Budi Kurniawan takes a pragmatic approach to solving a few specific problems, such as programmable file downloading (file downloading with authentication) and file uploading, an online e-book, and a simple shopping cart example. Some of these examples seem a bit rough on the edges, though. For instance, the "XML-Based E-Book," example seems a bit unconvincing. While Kurniawan extols the e-book's advantages over paper-based books, he belies his argument by not having published any material in the e-book format. Examining the e-book project reveals the reasons: he designed it such that each topic is a separate HTML file and the contents tree is an XML file. Managing a book in that form would be an absolute nightmare. In spite of that, the e-book represents a starting point that could be refined into something more manageable (left, naturally, as an exercise for the reader).

The JavaScript debacle

For some reason, Kurniawan spends more than 100 pages discussing JavaScript; doubly confusing because his JavaScript knowledge seems limited and his examples are horrendous. He makes patently false assertions about JavaScript features—"When you work with objects in JavaScript, the array object is basically your only choice" (p. 621)—and uses a poor programming style. He also claims that JavaScript should be used for browser independence (p. 485), but that conflicts with several whole chapters on the vagaries of JavaScript coding ("Checking Whether JavaScript is Enabled," "Handling JavaScript-Unaware Browsers," "Handling Different Versions of JavaScript," and so on), not to mention reality. Rightly or wrongly, that casts a long, dark shadow over the book's credibility.

Java for the Web with Servlets, JSP, and EJB includes 76 pages of J2EE reference material—a subset of the Javadocs that comes free with J2EE—which I consider a waste of trees (the kind that grow in the forest, not the kind made with object-disoriented JavaScript). Who looks up API calls in a book? The Javadocs are quicker and more likely to be up to date. A bit of a liposuction on the JavaScript and the reference material, plus a scaling back of the reams of out.println("<br>"); lines in some servlet examples would slim this book down by more than 20 percent.

The CD

Java for the Web with Servlets, JSP, and EJB includes a CD whose sparsely populated code samples surely would be better posted on a Website. Perhaps the CD increases the book's perceived value, giving it a little edge over CD-less books on the bookstore shelf? The CD contains Kurniawan's file upload and download beans, but he fails to include their Javadocs.

Strangely, the CD's code listings reside in chapter-section.txt-named text files that you'd have to rename to be of any use. For example, you'd have to copy and rename the first code example, named 01-01.txt, to TestingServlet.java before you could use it.

Websites

Neither the New Riders site nor the BrainySoftware site includes any information not also found in the book or the CD.

To sum up

Perhaps publishers feel it necessary to have a thick book on the shelf for a formidable subject like J2EE. I think the JavaScript chapters could be profitably replaced by a simple reference to any JavaScript-specific book. With my backpack already weighing in at more than 40 lbs., all those non-J2EE pages look pretty heavy.

Professional Java Server Programming

Going into this review, I must concede my initial bias against the gang-of-thirteen Professional Java Server Programming. I thought so many cooks would produce a scattered and disorganized menu. I am pleased to report, however, that my bias proved wrong. Maybe a large and diverse subject like J2EE lends itself to gang writing? Professional Java Server Programming both broadly and deeply covers J2EE (not surprising, since it has the most pages and smallest print of the four I reviewed).

Professional Java Server Programming thoroughly covers JNDI (Java Naming and Directory Interface), various aspects of servlets, JSP and tag libraries, JavaMail, the various EJB types, JMS (Java Message Service), J2EE Connector Architecture (JCA), Web services, and deployment.

On the down side, I must mention the book's two physical shortcomings: First, with numerous attractive book covers offered by publishers such as Manning, New Riders, and O'Reilly & Associates, you'd think Wrox Press could produce a cover more interesting than a collage of 13 nerds. What were they thinking? Additionally, on a slightly less tongue-in-cheek note, the book's low-quality binding resulted in pages coming loose and fluttering out (and no, this was not because I tried to tear the cover off!).

The Website

While Professional Java Server Programming doesn't include a CD, its Website includes downloadable source code and a thankfully short errata list. I had some trouble locating the book's Website (you can use the handy link below). The book itself refers you to the Wrox Press homepage; once there, searching by ISBN 1861005377 will save you the most trouble.

To sum up

Professional Java Server Programming thoroughly covers J2EE. You'll find it a good desktop reference and a solid J2EE introduction. If you are diligent enough to read it from cover to cover, you will probably be at it for a while (in fact you better hurry if you want to finish it before J2EE 1.4 is finalized!), but by the time you finish, you will certainly have built a solid J2EE foundation.

Sams Teach Yourself J2EE in 21 Days

The hefty Sams Teach Yourself J2EE in 21 Days also traverses vast J2EE territory. Like Professional Java Server Programming, it covers all the salient J2EE points, as well as design patterns and refactoring.

However, from the outset, I found the authors' writing style irksome. Word selection like "utilize" (the three-syllable version of "use") and ubiquitous overloading of the word "against" to mean "to," "with," or "for" ("...uses a connection factory registered against the default JNDI name..." (p. 406)) really annoyed me after a while.

The book's Naming and Directory Services description included (invented?) a reverse mixed metaphor: First the authors equated a phone book to a naming service, then they equated yellow pages to a directory service (because yellow pages allow you to search on additional attributes, not just a name). Subsequently, the text says that a phone book is called a directory because it is in fact a directory service (so what are the yellow pages now?) and finishes with this amusing summary: "The phone directory service lets you look up a person or company's phone book using their name as key." (p. 83) Hmm. I can only guess that the editors were so befuddled, they let this one alone. While such things grate against my sensibilities, I am probably in the minority on this issue and you are free to ignore these criticisms.

Seasoned programmers may find annoying some of the introductory material. Furthermore, the authors' offhand (and incorrect) remarks equating monolithic code with spaghetti code and the assertion that all nonobject oriented programming (OOP) code is, by definition, poorly designed (as well as the silly insinuation that simply switching to OOP transforms poorly designed code into well designed code) doesn't help.

The CD

I found the book's CD useful and professionally done. Appropriately named files and an introductory HTML page helps you navigate the CD. The CD also contains the book in PDF format, which can be handy for searching purposes.

Finally, the authors make use of the CD's extra space by including useful tools, including the Ant 1.4.1 build tool, the Forte 3.0 Java IDE, the JBoss 2.4.4 EJB server, and more. Sure, you could download them individually, but this is a nice touch.

The Website

While the book includes a Website, it doesn't serve much purpose as everything you need is on the CD.

1 2 Page
Join the discussion
Be the first to comment on this article. Our Commenting Policies
See more