Thursday, 2 April 2020

Understand the concept of serialization with real word example

  No comments
Serialization is a marker interface as it converts an object into a stream using the Java reflection API. Due to this it ends up creating a number of garbage objects during the stream conversation process. So my final verdict will be in favor of Android Parcelable over the Serialization approach :

Real work example 1: 
Imagine a building that turn into a pile of building material at the touch of a button
and then pressing the second button returns the building to its original shape.

That's the essence of serialization in OOP. Serialization transforms an instance of an object into a bunch of bytes, then magically re-creates the objec by deserialization


Real work example 2:
When the account holder tries to withdraw money from the server through ATM, the account holder information like withdrawal details will be
serialized and sent to the server where the details are deserialized and used to perform operations.




,

No comments :

Post a Comment

Loading...