
Almost all of the code examples in the book are in JavaScript (not Java) though a significant feature of Sharvit's approach is that it decouples Data Oriented Programming from any specific language. As a Clojure geek, I highly recommend the book as the way to achieve some of Clojure's core virtues in other languages.
Data-Oriented Programming: Reduce software complexity
by Yehonathan Sharvit
https://www.manning.com/books/data-oriented-programming
and from SICP:
2.4.3 Data-Directed Programming and Additivity
https://sarabander.github.io/sicp/html/2_002e4.xhtml#g_t2_00...
https://blog.klipse.tech/visualization/2021/02/16/data-relat...
it includes a nice summary of all of the above which may help when reading the OP.
I like the idea of having models and enforcing themselves. For example, testing that three different API endpoints of a service match each other's idea of their objects. This is a sanity check when we verify the frontend state.
If we could separate scraping from modeling constraints, we could potentially collect data separately from the verification step. Then we aren't left waiting for UI DOM stuff when we verify the model. The latter can happen separately, and extremely quickly.
See also
Data-Oriented Programming. Sharvit, Yehonathan. Manning 2022.
Principles of Program Design. M.A. Jackson. 1975.
SAM Pattern. Jean-Jacques Dubray. https://sam.js.org/
Anyway I thought it was sort of ironic that the idea is this good because it does the thing everyone tells you not to do (hashmap all the things), but now that someone has written a book on it you have at least the air of respectability.
[1] https://www.youtube.com/watch?v=Vz9rkr_p3Ts [2] https://www.manning.com/books/data-oriented-programming