About the Reviewer
Meera Subbarao has a Bachelors degree in Electronics and Communication Engineering and seventeen years of software programming experience around the globe, from Bangalore,India to Dubai,United Arab Emirates, to the United States. She has spent the past six years at DataSource, Inc. in Maryland and has been working on J2EE technologies exclusively for the last six years.  She is a Sun Certified Java Programmer as well as a Sun Certified Web Component Developer. Meera is also the Team Leader for the Javalobby/dzone book review team.
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.

Wicked Cool Java



Author(s) Brian D. Eubanks
Publisher No Starch Press
PubDate 2005
Reviewer Meera Subbarao



One Minute Review



Positives
  • Examples of key features of Java 5
  • Excellent coverage of open source tools
  • Fun to read
Negatives
  • Unable to find any negative points.


Sections

Intent & Audience

Before I begin this review let me give a brief background of how I got hold of this book. Being the team leader for Javalobby/dzone book review team, on a weekly basis I receive several emails from publishers for books which have been released. In most cases, I try to assign them to my reviewers and in this one particular case, none signed up for the book, so I decided to review instead. I wondered if it might be due to the title "Wicked Cool Java". 

Why would anyone use Wicked in their title, looked up in the dictionary and  to my surprise found the slang for Wicked as wonderful; great; masterful; deeply satisfying. Having reviewed several books from the past 2 years, this book was something completely different; Wicked Cool Java was indeed wonderful, great, and everything I had looked up in the dictionary.

Okay, now back to the review, this book is not supposed to be used as a reference or a basic tutorial. This book is for experienced Java developers who wish to learn and use open source libraries and also if you want to find some neat tricks. You will find interesting and useful APIs in this book.

Relevance of material

The author assumes that the reader already has exposure to Java and is familiar with its API. The book also has a companion website, named again wickedcooljava.com that has links to all of the libraries and projects mentioned in the book.

I did contact Brian about the source code and he promptly replied to me saying "Some of the APIs have slightly changed since the book was published. If you have any problems, dropping back a version or two might help. For example, the Jena API no longer supports RDQL as in chapter 4, but instead uses another query language (SPARQL)."  Thanks Brian.

Chapter highlights

This book is organized into eight chapters with numerous examples in each one, and each chapter covering a particular area of Java. You can read the chapters in no particular order, e.g. you can read chapter 8 first and later read chapter 6. At the end, the book also has an excellent glossary of terms.

Chapter 1 Java Language and Core API

In the first chapter, the author discusses some of the core API features; the new for loop, enums, generics, anonymous classes, and assertions. If you are already familiar with Java 5 you can as well skip this chapter. But it is fun going over the examples as well as the heading for each of the paragraphs; just to quote 2 from the book "There is No for in Java: using the for Loop Enhancements" and "Generally generic: Writing methods with Generic Parameters". Amusing aren't they?

Chapter 2 String Utilities

Next comes String processing techniques. The author starts with regular expressions, and discusses random text, arrays, binary strings, and message formatting. Regular Expressions can be used for searching, splitting, and substituting text. It has been around since Java 1.4, and you must learn a specific syntax to create regular expressions. 

In the first few paragraphs the author shows how to use regular expression patterns to search text, using the String.split method, finding substring patterns, and perform substitutions. In the next few sections, the author explains with examples about the new feature added in Java 5 java.util.Scanner class. Next the author explains about generating random text using the open-source Jakarata Commons Lang project and to convert between binary data and hexadecimal using open-source Jakarta Commons-Codec project. In the final section, the author explains about yet another new feature added in Java 5 and to quote the author" The Reincarnation of printf: Formatting Strings with Formatter".

Chapter 3 Processing XML and HTML

I am quite sure that knowledge of XML and HTML has become a must; and this chapter provides some useful techniques for processing XML, generate a parser for a non-XML grammar, and convert an arbitrary grammar into an XML document.

The chapter begins with a quick XML refresher. Java 5 which supports JDBC version 3.0 has a new addition called the javax.sql.rowset.WebRowSetwhich allows easy transformation of data from database to XML files and vice versa. The author explains about this interface and provides a code snippet showing how to populate a WebRowSet.

The author in the next section shows you how to use the SAX parser which was added in JDK 1.4 to the Java Core. Next the author shows with examples how to use the open-source DOM4J API for XML processing.

JavaCC being one of the most popular parser generator for use with Java applications, is covered very well with clear examples in the next few sections.

In the last section, the author gives a few examples of how to use Apache Lucene, which is a high performance, full-featured text search engine library written entirely in Java.

Chapter 4 Crawling the Semantic Web

The chapter begins with a short introduction to Notation 3 or N3 as it is more commonly known and Jena (A Semantic Web Framework for Java). In the next section the author illustrates how to build upon existing RDF vocabularies for your organization and finally using RDFhierarchies in Jenaand making queries with Jena RDQL.

If you want more traffic and an easy way to distribute your news, then you definitely need RSS. The author shows how you can use the open source API called Informa, in which you learn publishing RSS newsfeeds, aggregating newsfeeds, polling RSS feeds and finally filtering RSS feeds. It was an interesting chapter to me since all these terms were completely alien to me. If you're a webmaster, this chapter will definitely be of enormous interest to you.

Chapter 5 Scientific and Mathematical Applications

The author in this chapter explores scientific and mathematical applications in Java. Numerous examples are given which are really interesting; functors, truth tables, graph theory, physical quantities, neural networks, genetic algorithms, and intelligent agents. Having a degree in "Electronics and Communication Engineering" I should mention that this was one of the chapters which in itself was worth taking the time to review this book. Clearly I had no idea we could use Java for writing math and science applications.

Other than Java5, the open-source API's which are covered in this chapter are JGA, COLT, JScience, JGraphT, JOONE, JGAP, JADE and finally JWordNet. I bet you haven't heard about many of these tools, neither did I. Isn't this book getting interesting by now?

Chapter 6 Graphics and Data Visualization

Back in the old days, people didn't expect much from applications and user interface didn't matter much at all. On the other hand, in this age we have many applications that have complex user interfaces, right? I completely agree with the author where he says "Most users will look at a program's user interface first and, regardless of its capabilities, will not use a program that lacks an advanced graphical interface. If you are indeed a GUI programmer, this is the chapter for you.

This chapter covers various APIs for visualizing data and creating graphical applications in Java. The various tools which are covered in this chapter are SwiXML for defining Java GUIs in XML, how to display an SVG document using Batik, JGraph which offers a complete MVC graph framework for Swing and creating charts using JFreeChart.

Most of today's applications do have some type of reporting requirements. The author has examples to show us how to create reports in Java using a combination of iReport and JasperReports.

Finally in the last sections, the author covers simple 2D Data Visualization using BufferedImage class from the JDK, and lastly using the PICCOLO open-source API for building 2D structured graphics.

Chapter 7 Multimedia and Synchronization

This is also the age of Audio and Video, and in this chapter the author discusses some of the APIs related to sound, music, speech, and thread synchronization.
Whether we played a musical instrument or not, we all learned the song "Mary Had a Little Lamb". I bet you had no clue how to play this song in Java, but the author does indeed know how and he has a sample code for us in this book using the JFugueAPI.
A few more interesting tools the author covers are JMusic for synthesizing sounds, working with low-level Java sound using Java Sound API, and adding speech capabilities to your application using Java Speech API and FreeTTS.  Finally the author discusses about garbage collection and synchronizing threads using CyclicBarrier.

Chapter 8 Fun, Integration and Project Ideas

This is the final chapter of this book, and I guarantee, you will be wondering why the book finished so soon. The first 2 sections focus on using Java to control a LEGO robot using LEJOS and java.awt.Robot class in the core library.
Then the author shows using an open source component for graphically picking dates from a calendar called JCalendar. I should mention that I had used JCalendar(version 1.1) in one of my swing projects in early 2002. 
In the next few sections the author covers very interesting topics. If you haven't yet used these open source tools, go ahead and try it. The open source tools which are covered are

    1. Jakarta Commons: using HttpClient to post forms to HTTP servers
    2. Apache Ant (One of my favorite bugs): Running applications using Ant
    3. BeanShell : how to use it
    4. JUnit: Testing using JUnit
    5. JXTA : for Peer-to-Peer applications
    6. And many many more tools (if I mention all of them, then there will be no more suspense to buy the book.)

The author concludes this chapter with a short paragraph which explains how to use SourceForge for your projects. I should mention that I haven't tried this and am not sure will be doing so. But I do know that if I decide to do use it in the near future, I have a place to start with.

Rating

As I mentioned earlier in the review, this book is not supposed to be used as a reference for all the open source tools mentioned or as a Java tutorial. This a book which you will enjoy reading if you would like to know more about the various open source tools available to us and also what Java programming language has to offer. I don't think there is any other book out in the market which covers all the open source tools mentioned in this book. 
Most of the tools which are explained in this book have a brief description and also have short code examples for their usage. You should definitely look at the author's web site which has links for the various tools as well.

Relevance
Readability
Overall

Resources

Authors web site.