Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization

 
Norm Poole
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My assignment states:

"In non-networked mode, must not involve the serialization of any objects when communicating between the GUI and database elements."

I have a Data Transfer Object (Value Object) that implements the Serializable interface. Does the above statement mean that in non-networked mode my value object should not implement Serializable.

Any input would be greatly appreciated.
 
Robert Chisholm
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing the same thing with a DTO... I feel pretty confident that it's ok.

Serializable is a marker interface, so it only implies that it CAN be serialized, not that it actually is.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
norm,
I have a Data Transfer Object (Value Object) that implements the Serializable interface. Does the above statement mean that in non-networked mode my value object should not implement Serializable.

It means that your value abject must not go through the process of serialization. You should not use loop back network.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!