I wrote couple of books before I wrote Getting started with Spring Framework. Portlets in Action (by Manning Publications) was the first book which helped me transitioned from a developer to an author. I was quite passionate about Spring Framework, and that prompted me to write Getting started with Spring Framework.
I learnt that if you treat a subject well, the book is well received even if it is self-published This was one of the main drivers when we wrote a book on Java - we focused on covering topics that help transition a newbie to someone who is all set for writing sophisticated programs using Java. The book uses Eclipse IDE and not a simple text editor, and the primary focus is on object-oriented thinking than on just writing Java programs.