Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xml-dev] XML Schema: "Best used with the ______ tool"

From: "Michael Kay" <mike@--------.--->
To: "'Dennis Sosnoski'" <dms@--------.--->, <xml-dev@-----.---.--->
Date: 11/28/2008 11:03:00 AM
 
> Wonderful answer for those who don't have any performance 
> concerns and are more comfortable working in XML than in data 
> structures. The web services world, however, is generally 
> quite concerned about both performance and ease of use for 
> programmers, and because of these issues data binding is used 
> for the vast majority of web services.

I don't agree: on both ease-of-use and performance I would go for XSLT or
XQuery in preference to lower-level languages every time.

If you're receiving lexical XML from a web service, the time taken to
process it in XSLT or XQuery is usually less than the time taken to parse
and validate it. I would take a lot of convincing that a data binding
approach is likely to be faster, given the cost of marshalling and
unmarshalling the data.

And on ease of use, I've seen programmers struggling with regenerating all
their Java classes when the schema changes and it's horrendous. (Worse, I've
seen people refuse to change the schema because it has become too expensive
to contemplate!) Having two different models of the same data, understanding
how they relate, and organizing yourself to keep them in sync is simply
complexity that you don't need.

Michael Kay
http://www.saxonica.com/

> 
> Unfortunately there is a real disconnect between XML schema 
> and programming language data structures, and most of the 
> people in the SOA community who are pushing schema for web 
> services don't seem to understand that. I personally think 
> it's better to start from code and use data binding tools 
> that allow clean schema generation, since the schema 
> generated by one data binding tool will generally be usable 
> with other tools of the same type. But too many people have 
> been sold on "schema first" approaches, and when they 
> actually start using their schema in real applications 
> they're shocked to discover that, e.g., pretty much all of 
> their lovingly-crafted simpleType restrictions are ignored in 
> the programming API and the base datatype is just used instead.
> 
> That doesn't make schemas useless with web services, of 
> course, even if they have more detail than is represented in 
> the data binding representation. You can still use schema 
> validation during testing, for instance. But if your focus is 
> on web services you should design your schemas with data 
> binding in mind.
> 
>   - Dennis
> 
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, 
> WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> ______________________________________________________________
> _________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by 
> OASIS to support XML implementation and development. To 
> minimize spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l... List archive: 
> http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@l...
subscribe: xml-dev-subscribe@l...
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent