Prasad provides a clear, concise guide to writing Java code for web servers.
Java Server Side Programming, by Mukesh Prasad, is a welcome addition to contemporary computer science literature. Prasad’s objective is to present an integrated approach to the Java programming necessary to write the underlying code for a static web server. In such a short book, he does an admirable job.
Prasad acknowledges that his volume minimizes the number of topics and concentrates on providing depth—this is not an introductory text, and he notes readers should be experienced Java programmers. In the first chapter, he writes that it is necessary to study and understand Java multi-threading before proceeding further.
Prasad’s prose is clear and concise, two virtues uncommon in technical writing. His explanations and analogies are understandable, and within two chapters, he provides the bare bones for building a server. His comparison of a Java socket to an electrical house socket is quite apropos. This approach offers readers a sense of accomplishment. Depending on their level of expertise, they can simply copy the code, expand it, or adapt it in a personal style. Rather than study the theory of web servers, Prasad gives his readers the opportunity to learn by doing.
The text continues with an examination of some of the necessary elements that must be addressed by a web server. One is the handling of cookies, those text messages generated by the server to identify which particular browser is accessing the server. A problem with web programming is the tedious task of writing HTML code. To mitigate this issue, Prasad provides several small examples of how Java code can be embedded in HTML. This is one example of how the reader can easily augment the code.
The middle portion of the text expands the static server into a dynamic server and discusses a variety of topics, like sessions and form processing. The latter part is a more pragmatic discussion about writing code for server pages.
Like the succinct code, the book is only text: no graphs, charts, or illustrations. Prasad’s reliance on only the clarity of his prose and the conciseness of his code is well suited to his purpose. While the entire length of the code is about one thousand lines, most examples are quite short, making them manageable and understandable. Prasad wisely warns the reader to be certain the code works and provides some practical suggestions for correcting it. Throughout, Prasad offers excellent commentary but also includes explanatory notes within the code itself, a virtue highly praised among programmers.
As might be expected, the audience for this technical work is limited. Experienced Java programmers who are not familiar with writing code for web servers will appreciate the succinct discussion. A computer science major enrolled in a course in web design and development might use the book for a project on writing a simple web server.