Probably a stupid question but I am wondering if there is a case where a developer would need to use serialization or buffers when everything is stored to an RDBMS? Assuming that the program does have to output data-streams (stored in the DB) in ASCII, XML, PDF, etc, is there ever a reason to use these features even in those cases?
Also, while I find plenty of beginner level books on learning Java, is there one that is either beginner level or full of solid examples on working with databases (using Java as the logic layer)?
Serialization is very much in use in RMI. Whenever you need to pass an object over the wire, you need to make sure that the object is serializable, else it won't work. Yes, you can have your nice, expensive RDMS, but its useless if you cannot get the contents & send it over the wire to someone else, and thats where serialization can come into place.
As for buffering, you don't always output to the RDMS, sometimes you need a simple text file or XML file. Not all applications warrants a RDMS.
Originally posted by Chengwei Lee: Serialization is very much in use in RMI. Whenever you need to pass an object over the wire, you need to make sure that the object is serializable, else it won't work.
I would like to ask why it needs to be serialized? Why must you implement the interface?