Think different about data model #9

In the eighth article I presented a naive functional implementation of data oriented design approach.

Why is this implementation functional and naive?

It is functional because it can be referentially transparent. For this a function have to receive a context and return a new context, as the context has to be immutable. This is also why this implementation is naive, from the performance stand point. We will create and populate a lot of objects. This is expensive.

Another problem that we get, when our context is just a simple data structure, we can’t make any smart querying. We would have to iterate through all the entities in every behavior/function. This is also expensive.

Back to the overview

Like what you read? Give Maxim Zaks a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.