OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XML Object Serialization

[ Lists Home | Date Index | Thread Index ]

** Reply to message from tblanchard@mac.com 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@TheOffice.net
MDDL Editor (Market Data Definition Language)
http://www.mddl.org/




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS