Serialization is mostly used in two areas:
prototyping of persistence
pretty much every object graph can quickly be made serializable, for quick proof-of-concepts or quick-and-dirty applications this might be faster than setting up a real ORM layer or other persistence system
short term storage of almost-arbitrary objects:
Applications servers, for example, have a tendency to persist session information using serialization. This has the advantage that the values in the session can be almost any type (as long as its serializable).
For almost all other uses, the drawbacks you (and the article) mentions are too big: the exact format is hard to keep stable, class changes can easily make your serialized data unreadable, reading/writing the data in non-Java code is almost impossible (or at least a lot harder than necessary).
Read full article from Java serialization - advantages and disadvantages, use or avoid? - Software Engineering Stack Exchange
No comments:
Post a Comment