ORM vs State Store

The classic implementation of the application persistence layer is ORM. Its advantages and disadvantages have long been known and described many times, for example, by Martin Fowler. In short, the main problem with ORM is that OOP objects describe the behavior of entities, while ORM attempts to work with the data inside them. However, the ORM lacks information about which class fields represent the entity’s state that needs to be saved. To provide this information, you must mark these fields or describe the persistence logic elsewhere in the code. Often, ORM is used incorrectly due to a misunderstanding of its specifics and the universal nature of its implementation. ...

2022-06-11 · 2 min · 263 words · Andrey