October 10, 2003
@ 10:52 AM

One of the most trying aspects of being the PM in charge of XML schema technologies in the .NET Framework is dealing with backwards compatibility and the fact that our v1.0 implementation was buggy (i.e. almost standards compliant).The bugs in our v1.0 implementation of the W3C XML Schema recommendation are compounded by the numerous errata to the W3C XML Schema recommendation which required several changes of behavior from our v1.0 implementation.

Now I've had to deal with two camps of users, the first being those who do not like breaking changes from release to release who would be pissed if upgrading from Everett (most recent version of .NET Framework) to Whidbey (next version of .NET Framework) meant that their applications that were working fine would break because an XML config file that was being read in and validated against a schema on startup was now being considered invalid due to some esoteric part of the W3C XML Schema recommendation. On the other hand, we have customers who depend on W3C XML Schema as a way to share a message contract between producers and consumers of XML potentially on different platforms who expect us to be as standards compliant as possible for validation purposes.

These goals are often contradictory and we constantly have to make tradeoffs between the two on my team given that we work on technologies produced by standards bodies. I'm currently at my wits end as to the best way to ship schema validation in Whidbey. Currently we are trying to figure out how to satisfy both classes of users. One option which I'm unlikely to choose is that our schema validation APIs should have a flag that selects between the buggy or old v1.0 behavior or the most recent, more standards compliant behavior. This solution seems extremely ghetto and I'm not even sure what the flag should be called perhaps BuggyAndGhettoV1Behavior ? Or perhaps even a flag per bug or change made due to clarifications made to the W3C XML Schema recommendation? Or maybe a brand new set of classes for XML schema validation that don't have the baggage? Or is it something else I haven't yet realized? I'd love any feedback from the peanut gallery.

In v1.0 of the .NET Framework we could have been considered Almost Standard Compliant. Unlike myself from my college days I don't see this as such a bad thing anymore.


 

Friday, 10 October 2003 18:20:20 (GMT Daylight Time, UTC+01:00)
I'm not sure if this is feasible, but perhaps an appropriate solution would be accepting the 'invalid' documents but providing a warning which says "This construct is not valid according to the XML Schema recommendation but is supported for backwards compatibility. Support for this construct may be removed in future versions of the .NET framework." However, designing such a warning mechanism isn't obvious -- an event? A n-ary return value (in the style of COM's multiple success return values)? How will this interact with functions that throw exceptions to denote failure? It seems that you need to make the warning obvious enough that developers will notice it but invisible to end-users -- not an easy task.

The idea of a warning almost reminds me of Java's deprecated method support, with the obvious exception of it being a compile-time rather than run-time warning.

Alternatively you could simply break backwards support of XML Schema and tell developers to use the supportedRuntime stanza of app.config and not support the latest .NET runtime until they fix their bugs. The question then becomes "How does the runtime treat applications that do not have the supportedRuntime stanza?" I don't know the answer, but it seems to me the ideal solution would be to have the runtime require the .NET version against which the application was compiled.
Steven Engelhardt
Friday, 10 October 2003 21:18:07 (GMT Daylight Time, UTC+01:00)
I'll have to cast my vote for the unfortunately named flag. Maybe it can be StandardsCompliant for the portion of the developer community that doesn't listen to Chingy? I think it's a concept that would be pretty intuitive to people using the libraries, or anyone who's dealt with IE and doc types.
Saturday, 18 October 2003 20:07:13 (GMT Daylight Time, UTC+01:00)
Well, I'd like to have only BuggyAndGhettoV1Behavior flag. "You are in ghetto mode!" sounds good and forcing to switch out to complaint mode. But I don't believe you will manage to ship it with such a name and politically correct Framework1CompatibleBehaviour is another matter, it's not a shame to work in this mode :)
Comments are closed.