Book Reviews

Book Reviews written by members of the Denver JUG. If you wish to review a book, please e-mail us at denverjug at yahoo dot com to let us know which book you’re interested in reviewing. Although book reviews in 2004 or before have been excluded, a review from 2005 and from 2006 have been included here, as well as recent book reviews.

2009 Book Reviews
Javascript and DOM scripting

Murach's Javascript and DOM Scripting

Authors: Ray Harris
Publisher: Mike Murach & Associates
Publish Date: August 17, 2009
Pages: 760
ISBN-10: 1890774553
ISBN-13: 978-1890774554
Review Date: November 8, 2009
Publisher’s Book Description

REVIEW by Edward Young

I’m an experienced software developer but unfamiliar with Javascript, and this book was an excellent way to learn through example. It’s also a pretty good reference for javascript and DOM scripting, plus has some good introductory info on XHTML and CSS. I’m also a software engineer who appreciates and relies on good software tooling to help make code projects comprehensible, and manageable. The chapter on how to test and debug Javascript, showed how to install and set up firebug, and then how to use it to examine, execute and debug javascript applications. That chapter alone is worth the price. This book is both a good how to manual (Nearly all the chapters start with “How to”), but is a great reference, with a 1 page brief contents and then a 10 page detailed table of contents. This book is also not only a book on learning Javascript and DOM scripting, but also ensures that the reader learns the vital peripheral technologies alike XTHML and CSS, by taking the reader through the development of several interesting and useful applications over its 20 chapters.

Java servlets and JSP
Authors: Andrea SteelmanJoel Murach Publisher: Mike Murach & Associates
Pages: 642
ISBN-10: 1890774189
ISBN-13: 978-1890774189
Review Date: October 15, 2009
Publisher’s Book Description
REVIEW by David Madouros

I’m torn after reading Murach’s Java Servlets & JSP book, 2nd Ed. I read the first version when I was making the transition from mainframe programming to Java programming and found the information to be extremely helpful for getting up and running very quickly. With the authors’ assistance I had a database server, a servlet container, and a ‘hello world’ web app running within a couple of hours. On the other hand, reading the second edition as an experienced Java developer made me cringe. Ultimately, I have to side with the my experienced side. Especially when I consider how well the format of Murach books tends to make them canonical references and how easy it would have been for the authors to teach better practices. The cover of the book makes at least three claims:

  • Get off to a quick start
  • Build professional web sites
  • Handle databases like a pro

Get Off to a Quick Start
The authors get off to a great start by helping the reader to download, install, some basic tools including a servlet container, a database server, and an IDE. They guide the reader with step by step instructions for installing both Tomcat and MySQL — bonus points for recommending the latest versions of each. However, I’m stumped by their choice of IDE — NetBeans — and their claims that it is a top notch IDE. Technically, I suppose it is third, but in my experience it’s a distant third well behind Eclipse and IntelliJ.

Build Professional Web Sites
I take issue with much of the material presented in the book and how it lends itself to creating ‘professional’ web sites. For starters, the authors provide an excellent introduction to HTML. Too bad XHTML is the current standard. The authors state that they’d rather discuss HTML than XHTML because they feel that XHTML is too difficult to teach in a single chapter. I thought this was ridiculous, but assumed they would at least promote well-formed HTML — boy, was I wrong. They consistently use of malformed HTML in their examples and go as far as mentioning the lack of unquoted attributes as a good thing! This is bad, but it gets worse because a couple of chapters later they have to discuss well-formed HTML before they can teach the reader how to use JSTL. The authors discuss both JSP and Servlet technologies in separate chapters and demonstrate how to create ‘complete’ websites with each technology. I suppose this is necessary to teach the underlying technologies, but I wish that the authors had down played their use a little more. They do eventually discuss MVC (model 2) and state that it is a better solution, but they take the easy way out by saying that sometimes straight JSP and straight Servlet implementations are except- able. My final grumble about creating professional websites has to do with the chapter on custom tags. While using the classic tag mechanism was a pleasure (not!), the simple tag mechanism is exactly what it claims to be — simpler — and much more straight forward. However, the authors only mention the classic mechanism — no mention of SimpleTagSupport and no mention of tag files. Long live SKIP_BODY! Now for the good stuff… My favorite chapter in the entire book has to be chapter 9 because they give a high-level summary of JavaBeans and JSP tags stating that they are outdated and rarely used anymore — replaced by JSTL. The only reason the authors even mention them is that the reader may need to know about them to support legacy applications. I wish the rest of the book gave more of these disclaimers. Finally, the authors really do a good job of describing the technologies. I just wish that they’d promote best practices and shun bad ones more often.

Handle Databases Like a Pro
The authors give a good overview of SQL and then move on to coding straight JDBC code. However, they choose to close the connection inside of the try block rather than follow the best practice of closing the connection in the finally block. Also, they mention the differences between Statement and PreparedStatement and seem to lean towards Statement unless there is a need to execute the same statement repeatedly, but throughout the entire discussion there is no mention of cross site scripting prevention as one of the benefits of the PreparedStatement (not that PreparedStatement completely eliminates the threat of XSS, but it greatly reduces it).

Summary
In summary, this book is a disappointment. The subject of web development involves many technologies: CSS, HTML/XHTML, Java, Servlets, JSP, JSTL, EL, SQL, Http, and Javascript; and this doesn’t include the various frameworks (Struts, JSF, Spring, Hibernate, GWT, etc.) The authors make a valiant effort to cover all the base technologies, but there’s just too much to cover in a single book and be able to make the claim that the reader will have all the skills necessary to create professional websites. This book barely manages to cover the basics. I give the authors an A for effort, but a D for execution. Having said that, if you don’t understand any of the technologies (other than Java) and read the book with the understanding that this is just the beginning, this might be the book for you.

Modular Java

Modular Java

Authors: Craig Walls
Publisher: Pragmatic Publishers
Publish Date: July 2009
Pages: 260
ISBN: 978-1-93435-640-1
Review Date: October 15, 2009
Publisher’s Book Description

REVIEW by Johnny Wey

“Modular Java: Creating Flexible Applications with OSGi and Spring” provides a great introduction to those either curious about OSGi or wanting to get more out of their existing OSGi workflow using the Spring Framework. Craig Walls, author of “Spring in Action, 2nd Edition”, opens the book explaining why OSGi matters and how it can be used to enhance the modularity and maintainability of those application stacks containing multiple and complex moving parts. He not only serves up a great introduction to the technology, but also directs the reader to several tools that make OSGi development significantly easier.

In the second portion of the book, Craig throws Spring into the mix and demonstrates how the power of Spring Dependency Injection, autowiring, and the Spring MVC web framework can not only run seamlessly in an OSGi container, but also remove a large portion of the burden that OSGi’s API can put on application development.

Finally, Craig spends some time describing how an actual deployment might look in a production environment using both Tomcat and Jetty and provides optimization tips that make the process as painless as possible.

The book itself is logically organized and Craig’s writing style is approachable and easy to follow. All the example source code is available online, and Craig demonstrates how to install OSGi packages using both Eclipse Equinox and Apache Felix, leaving the final OSGi container decision up to the preference and requirements of the project. The sample application Craig uses to demonstrate the concepts in the book is surprisingly fun and useful, and the book contains some wonderful appendices that function as a great reference for current and future development projects. The book is a relatively quick read but surprisingly complete.

For someone looking to get the most out of OSGi or wanting to find out what all the “buzz” is about, Craig Walls’ book is an outstanding choice.

2006 Book Reviews
Google Maps API
Authors: Scott Davis
Publisher: The Pragmatic Programmers Publish
Date: May, 2006
Pages: 83
ISBN: friday
Review Date: February 2005 Publisher’s Book Description
REVIEW by Greg Ostravich

I enjoyed the book because the code samples made it seem very easy to use Google Maps to enhance existing applications that could benefit from Mapping data. It was an easy recipe book to follow. I’m currently out of town for training and I look forward to trying it out when I get home. Everything you need is available through the Google Maps API book, so you don’t have to search for map data or open source tools like you would have to if you were rolling your own GIS application. Although Yahoo! has map features which give you the ability to easily map data, Google Maps gives you a fine-grained control, through JavaScript function calls. Some of these calls require longitude and latitude points. At the end of the book the author describes various GeoCoder services, the secret sauce to finding the longitute/lattitude points based on a city or street address.

This book is a part of The Pragmatic Programmer’s recently announced new line of books called the Pragmatic Bookshelf! Fridays. The Pragmatic Bookshelf describes these books as “short, focused, PDF-only books, written by experts for developers who need information fast.” Scott Davis’ new Google Maps API book is the second book in the series. In just 66 pages the book does a good job explaining and demonstrating how to use Google’s Mapping API to easily add location to your existing application if you have address data or longitude/latitude points. This book includes links to what you need and code samples.

Knowledge of JavaScript will help since all the Google APIs are implemented in JavaScript. Knowledge of server-side Java is a plus if you’re using AJAX with a servlet to proxy a request as the author does.

This book didn’t take a lot of time to read and was a great introduction to the topic. I read it cover to cover in about two and a half hours. It would have been a little longer if I had access to a computer so I could play with the code snippets.

I’ve seen examples of the types of “Google Maps Mash-ups” described in this book. Slashdot mentioned the Chicago crime statistics site before ( http://www.chicagocrime.org ) which uses these JavaScripts to display crime data in Chicago. I had no idea how easy it is to create content like this until I read this book. It’s just a matter of calling the right JavaScript function.

The book has five sections: Core Objects, Map Controls, User Data, Events, and Ajax. The author gives you sample code to create your GMap, and any points on the map called a GPoint. Next the book explains various map controls (Large Map, Small Map) that you can easily turn on and off with a function call. You can then add user data that includes markers (push-pins), polylines (line segments you might find on a driving route), and user windows that pop-up when you mouse over a push-pin. The author even shows you how to customize your marker with a different icon than the standard Google marker. The Events section was interesting, but I got a little lost on the code sample when the author was registering an event. I think if I could have played with the code on a computer I might not have had that problem. The author covers AJAX at the end of the book, but it’s only covered by a couple of pages. I would have liked to see more examples, but the author refers the reader to the Pragmatic AJAX book instead. Pragmatic AJAX is available in Beta form as a PDF on the Pragmatic Website and I haven’t read it yet. A couple of the authors have an blog on Ajax called Ajaxian that I subscribe to.

This book was an easy, fun read and I was amazed at how simple it was to implement all of the same features seen in http://maps.google.com without a large amount of JavaScript knowledge or mapping knowledge. I liked that there were lots of code samples and demonstrations on the author’s website. The author also included some JavaScripts for some things that were lacking in the Google Maps API. The explanation and example usage of AJAX is an added benefit. This book is for anyone who has data (addresses, cities, or long/lat points) that they would like to map in their applications. Now anybody can do “Google Maps Mash-Ups”.

I need to provide a caveat. I’m friends with Scott Davis; we are both involved with my local Java User’s Group and I did the technical editing of Scott and Tom Marr’s JBoss at Work.

I would rate this book an 8 out of 10.

REVIEWER

Greg Ostravich is a board member of the Denver Java User’s Group. Greg is a dedicated worker for CDOT. For DJUG, Greg helps to coordinate Sponsorships and Marketing of the DJUG.

2005 Book Reviews
robust Java

robust Java by Stephen Stelting

Authors: Stephen Stelting
Publisher: Prentice Hall
Publish Date: September, 2004
Pages: 304
ISBN: 0-13-100852-8
Review Date: February 2005 Publisher’s Book Description

REVIEW by Linda Meserve

I have designed business systems in several languages. I began hands-on Java development last year as a neophyte developer on an 8-month development project. I was pleased to find Robust Java: Exception Handling, Testing, and Debugging by Stephen Stelting on the Denver JUG’s book review list.

Robust Java is a great resource for beginning to intermediate level Java professionals with a working knowledge of object-oriented concepts. If you have been introduced to the wide world of Jav and used one or two aspects of the language, you will find Robust Java combines a high-level (macro) view of Java architecture with the close up (micro) view of coding and testing Java classes. Reviewing Robust Java helped me integrate the wide range of topics I encountered during my recent development experience.

Robust Java will appeal to all types of learning styles. The table of contents shows a ‘soup to nuts’ list of Java topics Ð primitives, object types, collections, I/O, threading, RMI, JNDI, JDBC, J2EE, patterns, and others. Each chapter presented a focus on handling exceptions and logging and testing issues specific to the topic at hand. Any effective testing strategy requires the tester to understand how a tested feature works and the potential weaknesses to test for. So each topic was covered three ways Ð first as an abstract concept, then as a practical mechanism, and finally from a best practices point of view.

Normally I don’t consider software testing an interesting topic. But Robust Java provides technical information flavored with humorous footnotes and remarks. Stephen Stelting writes from a developerÕs point of view and incorporates a sense of humor which makes it worthwhile to forage through the footnotes. For example:

To get an idea of how vital it [testing software] is, compare it to testing something like an automobileÉIf you have no testing capabilities, you would have to replace the whole car each time something went wrong! [footnote] I have owned a few cars like this…
In summary, Robust Java was a pleasure to read and study. Its clear, concise chapters covering J2EE and JUNIT are well worth the purchase price. I recommend Robust Java to beginning or intermediate Java developers who want to integrate their current knowledge while taking their coding and testing practices to the next level.

REVIEWER

Linda R. Meserve specializes in applying technology to the changing needs of business. She is actively studying for Java developer certification. When Linda is not gathering and implementing software requirements, she enjoys fly-fishing, sightseeing, and live theatre. Contact Linda at countmein@reddesertsoftware.com.

Advertisements
%d bloggers like this: