General discussion

Locked

Serializable vs. Externalizable

By MaryWeilage Editor ·
This week's Java e-newsletter compares the pros and cons of java.io.Externalizable and java.io.Serializable. The author also explains the key differences between serialization and externalization.

Based on your application's requirements, which one would you choose? What would make you choose one interface over the other? Let us know.

If you aren't subscribed to the free Java e-newsletter, click the following link to automatically sign up:
http://nl.com.com/MiniFormHandler?brand=builder&subs_channel=bldr_front_door&list_id=e027&tag=fb

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

What about custom serialization?

by avia In reply to Serializable vs. External ...

Peter,
You forgot to mention that any java class can customize java's default serialization mechanism by overriding the "readObject()" and "writeObject()" methods. Perhaps you'd care to fill in the rest of the details regarding this option?

Good Luck,
Avi.

Collapse -

Implement Serializable judiciously

by jslarochelle In reply to Serializable vs. External ...

There are many additional reasons not to implement Serializable:

- Decreased flexibility to change a class's implementation
- Increased testing burden when modifying the class

See Joshua Bloch "Effective Java" for details about the inconvenient of implementing Serializable and many good tips about serialization.

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums