Objects are the central concept of languages like Java, Python, C#. Applying best practices for object design means that your code will be easy to read, write, and maintain. Object Design Style Guide captures dozens of techniques for creating pro-quality OO code that can stand the test of time. Examples are in an instantly-familiar pseudocode, teaching techniques you can apply to any OO language, from C++ to PHP.
I strongly believe, when you start to hate something, it's mean you need to learn more about that thing. As we know there is a debate between functional and OOP paradigms. A lot of people are saying functional is good because of no state. In OOP mostly we face the issue due to wrong state value. After reading this book I am convinced OOP and FP both are amazing, only the problem is in the developer's knowledge. If a developer is not abusing the language concepts then he can achieve very good software with fewer bugs. In this book, he mentioned first the problems and then he gave his ideas on how to resolve those.
If I had this book 20 years ago, I would have avoided hundreds and hundreds of hours spent on the trial-and-error approach of finding how to apply programming principles.
But wait... that was my learning, my own experience. I appreciate the way I got it ;)
Anyway, if I had this book, I'd have become a senior developer much faster.
The book starts with the basics of object design and goes deeper and deeper into architectural styles and recommendations for effective testing.
Like in the "Advanced Web Application Architecture" it ends up with ideas of decoupled architectures and gives hints to Ports and Adapters and DDD.
Again, there are some ideas that I don't fully accept, e.g. accumulation of events in entities, that I've seen in the other books of Noback but, in general, I practice most of the principles described in the book in my work.
Good
- Very good explanation of concepts like value objects, DTOs, read/write models etc. - Nice "Plot structure": from simple to complex things. No gaps. - Good code examples with comments that support explanations in the text.
Not so good
- Some exercises were difficult to follow. - Code examples are written in a "fiction language" which is admittedly PHP with dots as object operators but methods like `isset`, `json_decode` etc clearly speak for PHP. So, effectively, it is the book with examples in PHP.
Recommendations
Thus, I recommend this excellent style guide
- to junior developers so that they could learn object design quick and efficiently, - to middle-level developers to fill gaps in their knowledge of object design .
Senior developers can also find some new ideas and sources of inspiration but most of the things would be not very surprising to them.
This is the contemporary version of “Clean Code” for Object Oriented Programming.
If you look close enough, then, you will figure out the foundation of many best practices mentioned here are coming from Domain Driven Design, CQRS, OO principles and Effective Java worlds. The huge difference is - this book shows how they can be applied at the everyday coding.
Very well curated best practices and they are pragmatic. I really enjoyed reading this book as much as I enjoyed clean code.
After a few dozen pages my thought was "I like what Matthias posting in the blog but this is OOP extremism". Now that I've finished it I can say that this is very balanced set of advice.
The proposed architecture and style is solid for creating enterprise (web-)applications. The proposed architecture is an hexagonal architecture inspired by domain driven design concepts such as entities and value objects. Some of the proposed rules are highly opinionated. These highly opinionated rules form, in my view, the best part of the book. These rules show you how somebody else tackles the problems encountered by most enterprise application developers. What I also like about the book is the many code examples it offers.
What I don’t like about the book is that the book sometimes lacks a good explanation of why the author prefers a certain rule over other possible solutions. In addition, I don’t like the way in which some concepts are introduced. In some cases the author uses certain concepts before defining them. Furthermore, certain areas recoup ideas introduced earlier. The author could have combined the different sections in which a certain idea is discussed.
In conclusion, I think the ideas put forward in this book are solid. Hence, I would advice any junior and (early) senior developer to read it. In addition, this book would be the perfect starting point for a team working that starts to work on a new project and is in need of a style guide/architecture.
The design strategies in the book are heavily influenced by PHP / Java syntax and a lot of the tips are really just ways of getting runtime constness and strong typing, which most other OO languages inherently includes.
Another aspect that influences this book is web development, which is clear that Mr. Noback uses and is influenced by.
Still, some good practices and reminders of when to use interfaces / abstractions and when to apply immutability.
Some of the tips does not translate well to high performance code (and of course does not aim to), like making a copy of an object that is than changed, instead of making a copy of the object itself. This almost feel like a way to imitate Functional Programming, which of course comes with a lot of its own benefits.
This book is a fairly short read, so try to pick it up and skim through to pick up on interesting ideas - mostly recommended to Web developers.
Either if you are a beginner or a seasoned developer, you should read this book. Not only to fully understand the ins-and-outs of OOP, but also to improve in software architecture, DDD, and application testability.
Great example of condensed style guide which could be applied for different programming languages that implements object oriented paradigm. Even seasoned developers will find this book interesting.
I liked parts of it, and the information seems correct and useful, but it was a bit boring. There were dozens of concepts covered, but I'm having trouble remembering any of them.