Re: XML Object Serialization
** Reply to message from tblanchard@m... on Wed, 30 Oct 2002 01:31:49 +0100 > On Tuesday, October 29, 2002, at 07:43 PM, Anthony B. Coates wrote: > > The problem is if the auto-generated XML->Java code is called > > from all throughout the application codebase. If the XML changes, > > everything breaks. You need to hide the auto-generated code > > behind a facade so that almost all of the application code is > > unable to call it directly. Then, when there are changes to the > > XML, the effect on the codebase is limited to a small, > > pre-determined set of classes. > > Of course, this is only a problem with statically typed languages like > Java. Dynamically typed languages cope much better. Actually, I don't buy the idea that dynamically typed languages are a significant help here. I can write robust code in Java/C++/C#/etc. that doesn't use any schema validation at all, just application validation. I can write that code so that if new elements are added they are ignored. I can write that code so that if old elements that I don't need are removed, the application doesn't care and just keeps on writing. Etc., etc. However, it is *expensive* to write such robust code, and in the current economic climate, difficult to justify. I'm not convinced that it is so much cheaper to write robust, defensive code in a dynamically typed language, since the cost of writing that is the primary issue in my experience, not the language. That is why I tend to concentrate my thoughts on how to get the most value out of schema validation engines without producing unsupportably brittle code as a side effect. That said, I am happy to be educated about what can be done with dynamically typed languages if there is some amazing trick I'm simply missing here. Cheers, Tony. ==== Anthony B. Coates, Information & Software Architect mailto:abcoates@T... MDDL Editor (Market Data Definition Language) http://www.mddl.org/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format