Java Open Source Programming book biled

Well I knew eventually the book would be biled.

While I usually find negative feedback very helpful (thanks Werner!), I feel that Hani’s review has unfortunately missed the point of the book.

The book is based around the theme of improving development productivity and the quality of real world systems through simplifying code. Whereas many other books on the shelves at the moment are ‘bibles’ that provide a comprehensive in-depth guide to specific technologies, this book tries to do something different by illustrating how using some simple tools and design techniques you can stay on top of development. Admittedly, the title of the book doesn’t convey this – I hope that really isn’t a reason to read the book.

The simplicity expressed in the JUnit and mock objects chapters was exactly what we were trying to get across to the reader. Rather than providing a brute-force approach to testing complicated applications by using tools equally as complicated, we advocate simplifying the design of applications.

Through using techniques such as test driven development (though not exclusively), you are driven towards this simpler design. Rather than show how you can use mock objects to test complicated things like environment, resources and complicated dependencies, we show how you can alter the design of your code so these complexities are encapsulated behind simpler abstractions. The examples used in many of the chapters are not much simpler than those used in my real applications at work – and I don’t write pet stores for a living ;).

There are also books that go into the theory behind simpler design, we try and make it more concrete by showing how you can make these kind of abstractions with technologies that are common in the Java development community. We often promote the use of one technology over the other (for example WebWork over Struts or Hibernate over CMP) because these are more geared towards simplicity and abstraction. In these cases we often summarise the key differences between these technologies. That’s not to say that this book is useless to you if you are not using these technologies as the simplicity we illustrate is beneficial in many kinds of application development.

Even if you are familiar with (or choose not to use) the technologies explained in first half of this book, the second half really captures what we are trying to get across. It illustrates by example how the technologies and techniques come together in many small steps, creating a system that can evolve, scale and has a high quality of design.

One of the most challenging tasks of writing a book is putting yourself in the mind of the reader audience. Some content may be obvious to some people. Some people may find none of it useful. Our aim is for most people to find most of it useful, which as Hani has made clear, unfortunately means most people find some of it completely useless.

If Hani’s review has put you off from reading the book, please take time to look at some other reviews (positive and negative) and remember that Hani’s view more-often-than-not skips over the positive aspects of something he is critiquing.

XStream 0.2 released

See this.

Java Open Source Programming book reviewed on TheServerSide

Dion Almaer has reviewed our book:

* Full review
* Discuss the review

I’m glad he picked up on many of the points we tried to emphasise to make the book stand out from the crowd.

XStream is nearing a release

XStream is a simple object -> xml -> object serialization tool. There are many other tools that do similar things out there. Here are some of the features that distinguish it from the others:

* Very fast.
* Requires no custom mappings to be created.
* Can serialize objects that have private fields and non-default constructors.
* Handles arbitary objects and collections.
* Produces very clean XML; the kind a human would write.
* Does not duplicate any information in the XML that can be obtained via reflection.
* Decoupled from XML implementations. Use it with DOM, JDOM, DOM4J, or even non-XML streams (such as custom configuration objects, YAML or properties files).
* Open source, BSD license.

Here’s an example chunk of XML produced by XStream:

Joe
Walnes

123
1234-456


123
9999-999

New Book: Java Open Source Programming

Our new book, (With the snappy title, Java Open Source Programming : with XDoclet, JUnit, WebWork and Hibernate) hits the shelves this months. A joint effort between Pat Lightbody, Ara Abrahamian, Mike Cannon-Brookes and myself.

This book :

* Highlights many of the complexities of J2EE and shows how to leverage best of breed open-source tool to reduce or even eliminate these.
* Introduces you to some of the coolest open-source projects in the history of mankind.
* Demonstrates the test-driven-development to drive design (and even some tests).
* And most importantly of all… shows how to combine these tools and techniques to deliver an end-application.

Go pre-order!

Tutorial: Using mock objects to drive top-down development

Tim Mackinnon and Nat Pryce and Steve Freeman and I are presenting a session on how mock objects can be used to drive code from the top (requirements first, infrastructure last) to produce high quality, clean and decoupled object designs that allow for business change.

Come see us at:
* XPDay Benelux – Fri 21st Nov 2003, Breda, Netherlands
* XPDay London – Tue 2nd Dec 2003, London, UK.
* OT2004 – Tue 30 Mar 2004, Cambridge, UK.

Excerpt:

Mock objects are usually regarded as a programming technique that merely supports existing methods of unit testing. But this does not exploit the full potential of mock objects. Fundamentally, mock objects enable an iterative, top-down development process that drives the creation of well designed object-oriented software.

This tutorial will demonstrate the mock object development process in action. We will show how using mock objects to guide your design results in a more effective form of test driven development and more flexible code; how mock objects allow you to concentrate more on end-user requirements than on infrastructure; and how the objects in the resultant code are small and oosely coupled, with well-defined responsibilities.

Includes:
* Brief introduction to mock objects and the dynamic mock API.
* The mock object design process explained.
* Top down vs. bottom up design.
* What to mock. And what not.

More…

Test Driven Development is not about testing

Dan writes:

bq. “Writing the test before you write the code focuses the mind – and the development process – on delivering only what is absolutely necessary. In the large, this means that the system you develop does exactly what it needs to do and no more. This in turn means that it is easy to modify to make it do more things in the future as they are driven out by more tests. ”

Read the rest here.