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

Re: Objections to / uses of PSVI?


top
Mike wrote:

"Yes, but what did we learn from the experience?  That external schemas are 
quite difficult to deploy and evolve in the real world ...  That parsing
data with markup is much easier and more robust than parsing data
against an external schema ...  That the type systems of the programming
languages in widespread use are so diverse that it is very difficult
to define a neutral data interchange method that doesn't lose 
information yet is simple enough to use by ordinary programmers ..."

Hear hear. If an 'ordinary' programmer has to deal with the validity of incoming messages then the environment has failed. Verifying the  validity of a message is a middleware function not an application function. 

Given a schema for a message type and that programs are to be written to handle it, then the best thing is to use the schema to generate a set of classes that can instantiate instances from a message instance. The more complete the schema language, the more watertight the objects.

The advantages of this are:
1. Early binding: giving much faster parsing and much smaller memory use
2. Version control: the objects in the program match the schema of the message (and the schema of the database if that needs to change too)
3. Free validation: the objects will fail to instantiate correctly if the message is not valid.

What's the moral? That class definitions in OO languages are in fact schemas for data types in programs. If you can't instantiate an object without a definition of its class then it is strongly typed. So XML Schema has to have complex types to generate complete sets of objects. In a language like Java, the PSVI information is called introspection and reflection. 




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.