3 ms·
Agreed. It's complete ignorance on the author's part to suggest that Rails and Hibernate serialize objects into a single cell. acts_as_nested_set even provides
by mattmcknight 17y ago
Agreed. It's complete ignorance on the author's part to suggest that Rails and Hibernate serialize objects into a single cell. acts_as_nested_set even provides a decent way of dealing with tree structured data in a relational store.
His second part is off base as well, the challenges of serialization in strongly typed languages have little to do with wire protocols. He seems to be suggesting that adding a translation layer would solve the problem. It rather seems that would still fail if deserialization were used, as the translation layer would then become brittle. Rather it would seem to be more wise to step away from a serialization based persistence approach, while it might be a good idea for wire protocols, since the data is more ephemeral.
- loup-vaillant 17y agoAbout the serialization, I understood he basically said "don't use that". Not that an explicit, manual translation layer would solve any problem. It just makes you aware of it. Translation layers are brittle even if they are automatic. The only solution is to have a protocol (or file format) that change as little as possible. An automatic marshalling facility doesn't encourage you to do so. I see one case where automatic serialization is harmless, though: when you have the guarantee that the program producing the data and the program receiving it are of the same version and don't talk to the outside world. Temporary files used to recover crashed sessions are a good example.