serialization - Why should we make our POJO's Serializable in Java? -


i've seen lot of questions on how serialize pojo's in java using different frameworks, wanted understand need of making our pojo's serializable in first place. use javascript handle pojo objects or spring or other framework - why have make our pojo's serializable ?

is has done on good practice or best practice?

if not case, advantage able leverage serializing pojo classes?

there couple of threads discuss this, i'm not satisfied explanation / answers!

can here, shed light on concept please?

you serialize pojo's when need to:

  1. transmit them through medium (web service, etc)
  2. store them on medium. (this in turn devolves how going store them: xml, binary, etc).

you not have serialize them, depends on ever doing.

for instance, if have web application concept of user object, wherein user has user name, , maybe preferences might not make sense make class serializable. however, if expose web service through 3rd parties can extract user information, class need serializable can transmitted said 3rd parties.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -