JavaOne, JUG, Podcast and Self Publishing ...Or The Story Behind "Real World Java EE Patterns--Rethinking Best Practices"

In May 2008 I gave a JUG Hamburg (overcrowded) presentation with the title "Free JUG Session: Pragmatic Java EE 5 Hacking--Rethinking Best Practices".. After the session I got the comment: "Its sounds like a good title for a Book..." and I responded: "...indeed - I'm in the process of thinking about it...".


At JavaOne 2009 I was interviewed by Kevin Farnham during "Community Corner Podcast" about JavaEE and Rethinking Best Practices. I got lots of interesting questions and even briefly chatted with Kevin at this year JavaOne about our nice conversation four years ago.

After JavaOne 2009 I got an offer from a major publisher (I bought approx. > 100 paper and kindle books from this publisher) and started to write a book with the title: "Lightweight Java EE 5--Rethinking Best Practices".

After the submission of the first chapters, things started to become weird. I got feedback from the editor like:

"My experience is that readers REALLY aren't interested in history. They're interested in working with what we have now--but how we got here is next-to irrelevant. Particularly if you start all the way back in the days of applets. And I don't think you're right about some of the details; Sun was working on EJB, and had that in its long term plans, well before Java 1.0."


"...Using JPA outside the container seems *really* far afield here. And there's so much XML configuration that I'd be tempted to think that the book is *about* XML configuration. Yes, the XML stuff is still valid (and I imagine some people use it), but the real takeaway hear is that it's no longer necessary; this is *lightweight*.

After some emails and chapters I eventually got this email:

"We're going to have to make some hard decisions. We're trying to cut back our list for '09, and I'm trying to save this book from being cancelled. One option would be to take a lot more time, make sure we get this right, and plan on 2010. I think there's a *lot* of work to be done in cleaning up the writing. I can't guarantee that we wouldn't cancel when we start worrying about 2010, but it would have a good shot,particularly if the Java book market starts to look better."


"As far as the market itself: Obviously, a lot of people have left J2EE for Rails or one of the Python frameworks. Lately, a lot of people have been getting tired of Rails, but I get no sense at all that they're moving back in the direction of Java. The big beneficiary of dissatisfaction with Rails seems to be Django (and the other Python frameworks)."

my reaction was:

"...if we are going to cancel it, we should do it now..."

And my contract was cancelled without any problems. I had a book, but no publisher. I was actually really happy with this situation knowing that EJBs were introduced first in 1997 and Java about 2 years earlier :-). I submitted the whole book to another publisher I like and got the response:

"...We are open to revisiting your proposal at a later date if you are willing/able to add more pragmatic code examples and practical projects illustrating your patterns and points thereby expanding your 200pp book to 300pp or more."

I could, of course, print out 200 pages of JavaDoc :-) but my intention always was to write as thin book as only possible.

Before my book adventure I bought a great book Desktop Java Live and so I had a account already. Back then "Desktop Java Live" was available from exclusively. I remembered an option on the website to publish an own book. But: I needed an editor....

I hired an editor, submitted the content, approved all the comments and published the book immediately. I was not interested in any organizational work and just wanted to spend as little time as only possible with plumbing. Just "back to the IDE" :-). I never thought the book is going to be any successful, I just needed a pointer to my architectural ideas. Otherwise I would have to explain my thinking over and over again in projects.

The majority of the feedback regarding the technical content was positive, and feedback regarding the layout and typography was shattering. I still get negative comments about the layout and typography in the "orange" edition. The main reason for the really bad layout was the transformation from Windows / Office to Mac / OpenOffice.

With the advent of Java EE 6 and validation of my ideas in additional projects, I begun to write the second edition of the "orange" one. I kept the first two chapters (readers liked the first "foundation" chapters, the editor did not :)) and rewrote almost everything else. The second edition "the green book" became almost as twice as thick. Typography, layout and fonts were completely reworked and another edition created just for the Kindle from scratch.

In spring this year I got a surprising email of an "Associate Editorial Director" (the same person asked me to write 300pp more:-)) with the content:

"...Nice to meet you... I'd like to gauge your interest in updating and publishing your book(s) with..."

...and my answer was...

"I think we met at JavaOne 2008. I asked you about writing the "Real World Java EE Patterns" book for [....] (is a best seller right now), but you were not interested in Java EE books at all :-) Sorry, I'm just overloaded with work right now..."

I enjoy self-publishing because I do not have argue with anyone whether EJBs were invented before Java, or not :-). I have the full control and I'm responsible for everything. With power comes work: you have to hire editor, layout the book, format it for different platforms etc. But: I learned a lot and widened my horizon. I'm really glad I cancelled the contract.

I'm already thinking about a next project---but keep it secret :-).

See you at Java EE Workshops at MUC Airport, ask an offensive / heretical or interesting question and you could get the "green edition" Real World Java EE Patterns--Rethinking Best Practices!



great post :)

A good book is also largely due to the technical reviewers (errors, advices...).

In this case, how do you handle this "technical reviewers" part ?


Posted by Maxime Gréau on October 25, 2013 at 01:18 PM CEST #

"My experience is that readers REALLY aren't interested in history ...".

That could explain clearly why some pieces of crap code are usually called applications. What is called "history" is important to understand how the technology evolved and to understand the new ways proposed to do the same old things. Great post Adam. Regards

Posted by Gerson Zaragocín on October 25, 2013 at 07:05 PM CEST #


in this, special case, the code was more important than the code. I open sourced pieces of the code step by step and wrote a posts about that. I got lots of comments. This was my technical review.

I planned to review the first iteration asap, then incorporate possible fixes / changes in the second. However, there were no significant changes needed.

However, formatting and layout were terrible. I fix that in the second (the current) edition and really enjoyed the work.

Btw. the "Night Hacks" good was reviewed by James Gosling :-)



Posted by Adam Bien on October 25, 2013 at 10:46 PM CEST #



One of the reasons why JavaEE is sometimes considered to be complex, is that developers forgot how server side development looked like before J2EE. It was the "wild wild west" of software development. You had 0 chance to port the application between the servers. The first chapter describes exactly that.

If you forget the history, it will repeat and wheels are going to be reinvented.

thanks for the nice comment!,


Posted by Adam Bien on October 25, 2013 at 10:50 PM CEST #

Hi Adam,

thank you for this interesting post!

I have also self-published my books. The difference is that I have never even tried to publish it with any publisher. From the very beginning I wanted very much the book to be "mine", so I can put there anything I want, and also, that after it is published I can do whatever I want with it.

Regarding the editor/corrections I have learned that the community can do wonders. When I publicly announced my plans to write a book, few people offered they will read it and send comments. And they accompanied me all the time during the writing of the book, and corrected every single chapter, and added so many valuable comments! Really, I am still amazed at how much help I got!

Adam, good luck with your next "secret" project! :)

P.S. I have to admit that the contract the publishers offer (roughly 10-12% to the author) doesn't seem fair to me. "You do the work, we take the money" - no, thank you. :)

Posted by Tomek Kaczanowski on October 28, 2013 at 10:41 AM CET #


1. You did not mentioned your book. It looks great and I ordered it right now "Practical Unit Testing with TestNG and Mockito":

Btw. I'm using Mockito in all my projects. It helped me to delete millions of superfluous interfaces already:-)

2. You are wrong with 10-12%. Usually you get 10-12% from the earnings the publisher gets not the sell price :-)

thanks for your comment!,

good luck with your book,


Posted by Adam Bien on October 28, 2013 at 07:16 PM CET #

I host a web-based radio show where I interview self published authors and I am requesting permission to air some of your podcasts on publishing on my show.

Posted by Marilyn Silverman on October 19, 2016 at 10:18 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments