Lurker News
https://www.manning.com/books/data-oriented-programming-in-j...

This book is a distillation of everything I’ve learned about what effective development looks like in Java (so far!). It's about how to organize programs around data "as plain data" and the surprisingly benefits that emerge when we do. Programs that are built around the data they manage tend to be simpler, smaller, and significantly easier understand.
Java has changed radically over the last several years. It has picked up all kinds of new language features which support data oriented programming (records, pattern matching, `with` expressions, sum and product types). However, this is not a book about tools. No amount of studying a screw-driver will teach you how to build a house. This book focuses on house building. We'll pick out a plot of land, lay a foundation, and build upon it house that can weather any storm.
DoP is based around a very simple idea, and one people have been rediscovering since the dawn of computing, "representation is the essence of programming." When we do a really good job of capturing the data in our domain, the rest of the system tends to fall into place in a way which can feel like it’s writing itself.
That's my elevator pitch! The book is currently in early access. I hope you check it out. I'd love to hear your feedback.
You can get 50% off (thru October 9th) with code `mlkiehl` https://www.manning.com/books/data-oriented-programming-in-j...

Comments (168) 39 threads

Show all comments

Showing thread 8 of 39

necovek1 reply#
First up, congrats on getting over the hump — I struggle to complete a blog post, so I very much appreciate the effort it takes to do this!

A confusing sentence I noticed in the first chapter:
> ...then the only thing cost was some time, if they do it wrong, the cost is usually a bug.
I am guessing you mean "only cost was some time" (without the "thing")?
As for the topic, my hypothesis is slightly different — adopting functional approach to programming — even in imperative languages — leads you to the best patterns (or as you put it, "makes it inevitable") when combined with "evolutionary" architecture, and DoP is certainly one of them.
However, for a majority of software, in my experience, data "attributes" are really "leaf nodes", only to be consumed for display, and types do not really matter much there (eg. I don't mind `firstName` being a simple string). What we want to get right is types we do operations on, and most critically, relations between different data models. Accepting "evolutionary" principles in architecture also means that you welcome change and build for it, so getting any definition of data right from start is not an imperative.
But the topic certainly seems intriguing, so I look forward to learning more from your book and seeing how you apply it in a more imperative/OO way and what language features you found critical to success there.
Congrats again and good luck!

necovek1 reply#
Another typo:

> ...no bad states to defend again.
Defend "against", I guess?

goostavos#
Oof -- embarrassing! At least I know what I'll be thinking about as I try to fall asleep tonight.

Thanks for pointing out the typos and wonky wording! Will fix!