Today Manning released my latest book! It's called "Object Design Style Guide".
In November 2018 I started working on this book. The idea for it came from a conversation I had with the friendly folks at Akeneo (Nantes) earlier that year. It turned out that, after days of high level training on web application architecture and Domain-Driven Design, there was a need for some kind of manual for low level object-oriented programming. Not as low level as the kind of programming advice people usually refer to as clean code, but general programming rules for different kinds of objects. For instance:
- A service gets its dependencies and configuration values injected as constructor arguments.
- A service is an immutable object.
- An entity always has a named constructor.
- An entity is the only type of mutable object in an application.
And so on...
While exploring the subject area I realized there would be a lot to write about, and a lot to declare as out-of-scope too. I thought it would be very important to make it a practical book, with short and clear rules for object design.
Soon enough I was able to publish a couple of chapters on Leanpub. For me publishing through Leanpub has always worked well, maybe because my writing process usually turns out to be more or less linear. This allows me to publish the first chapters, and then keep publishing new chapters over the course of several months. I absolutely love how early supporters bought this book when they could only read a few chapters. I've said it before, but this is an important encouragement to keep going.
Re-publishing an existing book
In January of this year I was approached by Manning. They asked if I would like to work on a book about Domain-Driven Design. I suggested working on a new edition of the Style Guide instead, and they were happy about that from the start. Manning has a rather extensive process for onboarding, and although I thought it wouldn't be worth it because the book already existed, they still pushed me to write a profile of the "Minimum Qualified Reader" (MQR) and to create a "Weighted Table of Contents" (WTC). I'm glad they did, because it definitely improved the quality of the learning experience for readers of this book. The MQR is a description of the reader: what do I expect from them in terms of experience, knowledge, interests, etc. This helped me write the most useful book for the imagined reader, and also allowed me to skip certain basic concepts that I could assume the reader to already know about.
The WTC shows for each chapter how hard it is to read and understand. Ideally a book would start simple, with some introductory chapters, and build up towards the more complicated chapters. I think I've actually achieved this. The book starts with some basic concepts, building up towards an explanation about changing behavior without changing code, and separating write from read models. The final two chapters provide an overview of different types of objects and how they work together in a web application, and an overview of related topics and suggestions for further reading.
Overall, the publishing process was well managed by the team at Manning. They provided lots of advice on using diagrams, adding exercises, etc. I can recommend them to anyone who is looking for a serious process leading to a book published by a serious publisher. Just be ready to spend some more time on making everything just right. For comparison: the first edition of the book, as published on Leanpub, took me only 127 hours to write. Working with Manning, processing review suggestions, fixing issues, following the steps in their publishing process, etc. took another 132 hours.
Comparison with the PHP edition
The Manning edition of the style guide is different from the PHP edition published on Leanpub in the following ways:
- It has more words; there are many little additions, like "asides" to answer reader questions. It is now about 290 pages in print.
- It has better words; it has been checked for grammar, spelling and style issues.
- It has exercises; the first chapters have exercises. Some multiple-choice questions and some open questions where you have to write a bit of code. The answers can be found at the end of each chapter. For multiple-choice questions I explain why the correct answer is the only correct answer and why the other possible answers would be wrong. For the code exercises I provide possible solutions.
- It has a new chapter: "Working with objects - a primer". The books starts with this chapter and offers a quick overview of object-oriented programming techniques (including unit testing). This should make the book more accessible for beginning programmers. It also explains the concept of "dynamic arrays", which will be a familiar thing for PHP developers, but not so much for the general OO audience.
So without further ado: get your copy of the book Object Design Style Guide now (digital or print): https://www.manning.com/books/object-design-style-guide. Use the coupon code noback40 to get a 40% discount!
Any plans to make a Coursera course? I am sure my company would be the first one to buy :)
Congrats Matthias for the release of your book! 😊
As usual concise writing that is understandable to wide auditoriums from newbies until veterans of industry.