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

Earlier comments
goostavos#
Will do!
jroseattle#
Congrats on writing and completing a book! I was involved in a few myself long ago, when I had the time available to contribute to those endeavors. In a world that often measures "the juice being worth the squeeze", I'm not sure authoring technical manuals would ever meet the criteria.

One of my personal photos I keep around was taken long ago in what was the biggest bricks/mortar bookseller. I was looking at the selection of books on Java available at the time. O'Reilly was the dominant publisher, and thus had several offerings on the wall. Most of the books were at least 2 inches thick. (If you were ever involved with writing a technical book in the early 2000s, you'll understand the publisher metrics at the time were based on the width of the spine on the shelf.)
Among the many Java manuals of significant girth was a small, THIN book with the title "Java -- the Good Parts". :-{}

TeaVMFan1 reply#
Congratulations! In case people are looking for other modern Java books, here's one I'm working for building modern web apps in Java:

https://frequal.com/Flavour/book.html
It describes how to make single-page apps in Java, using the Flavour framework. No plugins, no extensions, and 99.9% pure Java. Plenty of sample code and links to relevant podcast episodes and demos.

TeaVMFan#
Flavour supports multiple JVM languages. Plus it is a batteries-included framework, no need to look to extensions to get routing, templates, EL, JAX-RS support, and more.
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!

Load more comments