You probably know what binary search is but WTF is Eytzinger order?
You might have heard of a data structure called binary heap. It is a binary tree represented as an array, where the parent is at position
i, the left child is at position
i*2+1 and the right child is at position
DTOs (Data Transfer Objects) are classes which people use to represent and store data before they serialise and send the data over the wire. So the primarily purpose of a DTO is to be able to turn an object graph into a buffer (array of bytes).
[Application state] --> [DTOs] --> [Buffer]
And turn a buffer into an object graph.
[Buffer] --> [DTOs] --> [Application state]
Some people (my self including) don’t see the point of separating between
Application state and
DTOs some times. Specifically if the mapping between the
Application state classes and
DTO classes is 1:1. The mapping seems to be redundant and they are ok with integrating the DTO as part of their application state and logic. …