[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Object Serialization


xml object serialization c
** 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.