Professional Java Server Programming
Wrox Press, ISBN 1-861002-77-7, Price £43.99UK
Danny Ayers, Hans Bergsten, Michael Bogovich, Marc Fleury, Ari Halberstadt, Paul Houle, Piroz Mohseni,
Andrew Patzer, Ron Phillips, Sing Li, Krishna Vedati, Mark Wilcox and Stefan Zeiger
 

27 Chapters, 16 Appendices and Index in 1121 pages
 

Chapter List
1  Web Application Development
2  Introduction to Servlets
3  Error Handling and Event Logging
4  Sessions and Session Tracking
5  Using the Servlet Context
6  Dynamic Content Generation
7  Introduction to JavaServer Pages
8  Connection to Databases
9  Connection Pooling
10  Servlet Chaining
11  Servlet Communications
12  Distributed Computing with Servlets
13  JavaMail and Servlets
14  Introducing XML
15  Weeds of El-Limon 2
16  Bug Tracker Case Study
17  Bug Tracker Case Study: Elaboration, Construction and Transition
18  Moving from CGI to Servlets
19  Internationalizing Websites
20  Smart Servlets
21  Server Programming with JNDI
22  Using LDAP and Java
23  Enterprise and JavaBeans
24  Indexing and Searching
25  JINI and Javaspaces: Servers of the Future
26  Working with JavaSpaces
27  Coding a Jini-based Website
 

Appendices

A   HTTP
B   Java Object Streams and Serialization
C   Cryptography and Servlets
D   The LogWriter Class
E   UML Tutorial
F   JServ Configuration
G   ServletRunner and Java Web Server Configuration
H   JRun Configuration
I    JSDK API Reference
J   JavaServer Pages API Reference
K   JNDI API Reference
L   Core JavaMail/JAF API Reference
M  Core Jini API Reference
N   JavaSpaces API Reference
O   EJB Reference
P   JDBC Reference
 
 

Synopsis

This is definitely a professional's book. This voluminous tome, which weighs in at over 1100 pages, covers every aspect of javaserver technology you could possibly want to know about. It covers Servlet and JavaServer technology, database technology, XML, Java 2 Enterprise, and real-life case studies and examples are shown, including setting up and configuring javaserver technology on popular platforms, such as Apache. To get the most from this book, you will need to be fluent in Java. You'll probably be a developer working on intranet technologies rather than internet, and you'll need to be conversant with all modern web advancements. There are no two ways about this: it's a big book, covering a vast area, but if you need to know everything about java servers, this book has it in. A good buy for the professional, but probably not for the amateur enthusiast.

Review

Why would you want to use Java on servers? What are the benefits? Currently, most people see Java as another way of running applications... only, more slowly. The advantage of a single code-base is obvious, but for most, superfluous. The thought of running Java on a server will probably bring tears to the eyes of most sysadmins, but let me assure you - this book will truly open your eyes. For years, Java technology has been hyped, nay, over-hyped, beyond the point of good manners. This book assures the reader that the hype is not only justified; but an understatement of the facts of the matter.

CGI, PHP and ASP are some of the most popular methods of providing dynamic content to web-users. So why would you want to switch from these to Java? And how? This book takes you through all of this. All questions are answered, and practical case studies of how you can do this are given. Having read about JSP, servlets, etc., you'll soon start to wonder why people use the other systems! Slowly the mists lift, daylight breaks and the one true way (as many Java fans would have us believe) becomes obvious. The book is littered with small examples that do amazing things: accessing a SQL server through Java using JDBC. It becomes clear that this is an easy method of getting stuff done.

Almost the whole of the book is dedicated to doing things in Java that can be done in other systems. So why bother? Never before has so much functionality been available through one tool. Java, for example, offers distributed computing, where tasks can be shared out among servers with ease. CORBA, one of the most promising modern technologies, is covered, and with it the means for java to talk to other applications through a standard interface: powerful stuff indeed. Various other systems are tossed into this heady mix with abandon; JavaMail, for example, is a complete email interface system, and it quickly becomes apparent what strong medecine this is. No longer is the programmer thinking about the interface - you don't care whether the inbox is POP or IMAP, or whether or not SMTP is used - Java takes care of everything as usual, and the application programmer only concerns themselves with the fact that they want to have access to the email system.

You may have gathered by now that not only do I consider this book informative or educational, in some instances it is truly enlightening. Many people consider XML and XSL to be new and novel technologies, and indeed they are. However, in this book they are almost considered a given, something which you should have been using for years already, a means to an end through which more interesting technologies are used. XML is almost considered, dare I say, passe.

Chapter 21 is where the book really takes off and flies with the new ideas: Server programming with JNDI. JNDI, the Java Naming and Directory Interface, is an interface to directories. Nothing special there, then, you might think. You'll need to think again. Like JavaMail, JNDI simplifies everything and the power pours through: the programmer need not consider what type of computer they are communicating with, be it NIS, NDS, Active Directory, etc. By harnessing LDAP (Lightweight Directory Access Protocol), which is now common, you can go back to thinking about the operation rather than the interface. It's a refreshing change.

The real hard-core Java now dominates the book, and Chapter 23 is the start of the heavyweight Java technology: Enterprise JavaBeans. Throughout the book, the idea of the network as the OS is consistently pushed, and here it all starts to make sense. Indeed, the admission towards the end of page 582 speaks volumes:

".. the EJB specification brings system administration to the center of our web puzzle. By and large, with the web we are still in the Jurassic period, where the dominant species is still the developer. Many people claim that open source software is a success because of a close understanding of system administration issues, and in fact the free Unices are where they are today largely thanks to the system administration crowd."

The web we have today is still in the Jurassic Period??? The web, slayer of all evils, through which we are witnessing the modern information revolution? It's sad to say, of course, but it's something that deep down, we all knew all along: what we have now is nothing compared to what we're going to have in ten years time, which is nothing compared to what we'll have in one hundred years time.. etc. Sure, we have an information revolution, but we are at the beginning of the revolution, and in the same way "The Rocket" was considered state-of-the-art steam technology during the industrial revolution, "The Web" is considered state-of-the-art information technology, or at least was not more than a few years ago. And it is this book which contains, partially, at least, a road map for the future. Not the complete future of course, but comparing our web to the technologies described within this book is akin to comparing "The Rocket" to something like "The Mallard", for those who know their rail history. It really is frightening to see just how backwards we are compared to technology we have today, but we know won't be commonplace for a few years yet.

The last chapters of this book are dedicated to Jini and JavaSpaces. Trust me, if you've never heard of Jini before, you will, and very soon indeed. The main heading on the first page of Chapter 25 is "Warning: Imminent Changes Ahead". If I may quote from the book once more:

If you want to change your entire outlook of how a server application should be designed and written under the Java Platform then you should read the next chapter and the next two. What is going to be said will be 'against the grain' of everything you have read so far in this entire book. Beware: resistance is futile; do not read this if you would never want to change your current way of doing things!!

Holy Moley! The past few chapters I've been extolling the virtues and the forward thinking of this book; then they go and pull the carpet right from under my feet!! Don't get me wrong, I'm clued-up on Java technology: heck, I've been programming Java since version 1.0. But these last three chapters are something else: to illustrate this, picture a Java Developer. For years, they've abstained from the sins of platform-dependancy. Then they read this book. Not four pages into Chapter 25, the author announces now "..that the high-level stuff is out of the way, let's turn our attention to writing device drivers.". Device drivers?! Are they kidding? It's time for our Java Developer to go and take a cold shower quickly, and hope that it's the author of this chapter who's gone potty, not those at Sun.

In fact, it's all true. But it's not. It's hard to describe Jini for those who have not read about Jini before, and although the book does a fantastic job I feel unable to convey the true gravity of the situation before us: namely, true network-based computing. Do not think of a "network" as being similar to that 10baseT nonsense you and I have at home, these are networks in a very, very different sense. Networks of temporary unions, called "Feerations". In the Jini world, clients and servers form these federations, creating a distributed Java network called a djinn (distributed Jini network). Not only does Jini allow us to connect devices together in these federations, but we don't even need to tell them what's there, how to access it... the devices go out into the network, and find out what services are available for themselves. So how on earth can a Jini device access a piece of hardware it has only just met? Surely it cannot possibly know of it's existence beforehand? Surely the developers didn't conceive of every device that it was going to meet!?! Well. . . remember I told you about those Java Device Drivers? Yes, it all makes sense now..

I apologise to the reader now for my ham-fisted explanation of Jini, to truly grasp the magnitude of the technology you will need to read this book. If you don't believe in Java right now, read the book: you will be converted, and you will believe. It's that simple. This book makes it that simple - examples and illustrations abound as usual, and it's clear as day. It's like having a light suddenly switched on. And then they talk about JavaSpaces. . .

If my description of Jini was poor, my description of JavaSpaces will be worse. However, I take solace in the fact that I personally feel it would take the vivid description powers of Laurie Lee to make clear the power of this system; let me commend the authors of this book for a particularly good effort. If you're familiar with mqSeries, or any other middleware, you'll be at least a little familiar with JavaSpaces. JavaSpaces is all about queuing and messaging, and yes, that sounds dull. But the power of the system is vast. Of course, this is somewhat theoretical, since there is no implementation of JavaSpaces yet. But try to imagine the power: not only can messages be passed, but Java code, and these don't rely on raw connections: of course, message passing can be done through the djinn. JavaSpaces look like today's queuing systems, but they are completely Java-based, propagate behaviours (i.e. Java code) as well as data, are something like object databases, and resemble lookup service as well. Phew. Of course, since there are no real implementations of this system, the book very much relies on the Sun reference implementation, but still examples exist, and previous examples are reworked with a JavaSpace theme.

Hopefully this has whetted your appetite for the book. I haven't talked much about the appendices, mostly with reason: they are generally reference material: incredibly useful in conjunction with various chapters, but hold not particular interest on their own. I can honestly recommend this book to any serious Java professional: you will get a lot from it. Of course, it covers today's technologies, but it also covers future technologies. From an amateur point of view, it is still an incredibly interesting book, if probably a little bit of overkill for the average Java programmer who has little or no interest in Java as a server rather than client technology. Personally, I feel the chapters on Jini and JavaSpaces are worth their weight in gold, and although you'll need a strong Java and Object-oriented grounding to glean anything worthwhile from them, they're worth persevering with. This is a big book, but truly rewarding for the right reader and I can recommend it wholeheartedly.

Review by   Alex Hudson.