Casper Bang wrote: > As I understood Joe, his issue is with the fact that build-in binary > serialization is a bad idea because a class definition will inevitably > mutate over time. Schema migration has been the bane of object systems since the beginning of time. This problem just doesn't express its self in Java, it is also present in Smalltalk where you don't have a binary implementation. It was one of the killer features of OODBMS systems and I don't mean killer as in wow, thats really cool killer. I mean it helped kill the technology.
> So while implementing Serializable is great for when > you are in full control on both ends, say when using it for caching, > java.beans.XMLEncoder/XMLDecoder really is superior. I'm not sure that I agree but I'll say at best, it's no worse. You can have this point ;-) > On some level > this is just another facet of static vs. dynamic, you either have a > mutual contract or you don't. > There is a mutual contract and each party has implemented their own parts of that contract. The fact that it is binary is an implementation detail. I don't see the issue unless we get back to schema migration and classloader/class identity rules. On second thought, how does using XML suddenly magically get rid of the versioning issue? > What Serializable as a marker interface does provide, is a way to > express a type-safe API around it (i.e. ObjectInputStream takes a > Serializable) but whether it actually buys you very much I don't know. > My point is, this buys you a lot! Package stability is a perfect score of 1 for example. That is because there is clear separation between implementation and interface. You code to the interface, not the implementation. > In Effective Java, Josh Bloch argues for marker interfaces. +1 for Josh. I find them very useful for decoupling. > I believe > both C# and Scala chose to externalize this aspect and rely on > annotations for such expression of intention, something Java did not > originally have as an option. > Well, I can't say much about Scala yet but I find C# to be the garbage can (and I mean that in the good sense of the term) of language ideas. Humm shiny new... shiny... good! Ok, seriously, there is lots of cool stuff in there but to stuff them all into a single language... sorry.... I think that Dick got it right in another episode where he commented on how it was a benefit that language changes have been fewer in numbers and have taken longer to come to market. Regards, Kirk Speaking @ devoxx Speaking @ jfokus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
