![]() |
Monday, July 21, 2003 |
Dare:
However since the entire point of object oriented programming is to tie together data and behavior, XML is actually a pretty dumb way to serialize objects in any programming language. It is a handy way to serialize the state of Java (or .NET Framework) objects though.Amen, brother. I wish I'd had this quote handy when having this argument a couple weeks ago. At the time, I described a web service this way: "Conceptually, we have a black box that takes XML as input and output; i.e., a transform. The things we're dealing with are data, not objects - the objects produced by Castor have no behavior (aside from ordinary container type behavior), and no useful type and therefore fail the whole point of Object Orientation. What programmers want and need (whether they realize it or not) is a way to associate names with data, not to strongly type it." In a statically typed language, XML Serialization gives names to data, at the cost of introducing a whole lot of noise in the object model. It makes it easier to program in Java, but my opinion is that since the fundamental process is a transform, what would be better is a language to describe transformations. 4:37:57 PM permalink
![]() |