DEV Community

Discussion on: A simple way to reduce complexity of Information Systems

Collapse
dakujem profile image
Andrej Rypo

@viebel The only online references I found on "data oriented programming" are yours :-)

The problem I see with this design is that it seems like just another tradeoff. You trade classes for schema validators. You design immutable structures to mitigate errors and sacrifice performance, as every mutation creates a copy of the previous data.

It reminds me of what happens on every REST API request - you map the xml/json to arrays/objects, then validate the schema, then do stuff with the validated data. I usually map it to internal data structures (DTOs) or ORM classes, depending on use-case. I can't really imagine how I write a schema+validator for every part of my application, every service interacting with the data (services, controllers, background jobs, etc.). I can see flexibility, but I can't see the reduction in complexity mentioned.

Could you point me to some sample code? Prefereably something heavier than a hello-world app.

Also, I can see you mention the paradigm is language-agnostic, but which language do you think would benefit most? (Seeing the tags in this article, would it be Java or JavaScript?)