extensibility

Designing Schemas for BizTalk


Designing BizTalk schemas with XML Authority is mostly like developing any other schema, though the BizTalk approach, with a repository of potentially competing schemas, makes some additional demands on schema designers.

BizTalk has avoided the 'one schema fits all' approach. Rather, it explicitly allows for the creation of multiple schemas performing similar tasks, with a general expectation that schemas will converge where useful (and diverge where useful as well.) The implications of this design choice are important - schema developers must consider that:

These requirements require designers to consider their approach to schema development carefully. If transformation is treated as an important goal in general, then creating a schema that represents information in a format that is difficult to convert into or out of is counter-productive. Developers will use the schemas that make the fewest demands on their resources while addressing their needs.

Storing information in as atomized a form as is reasonably possible is an important tool for ensuring ease of transformation, and has the side effect of requiring developers to do less work integrating information sent with your schema into their applications. Instead of:

<price>US$50.00</price>

consider structures like:

<price currency="US$">50.00</price>
or:
<price><currency>US$</currency><amount>50.00</amount></price>

To insure compatibility, you should define the contents of these atoms with the basic data types included in XML Authority, and avoid using the notations facility to define your own types.

A number of other rules that apply to schema development in general are particularly important to remember for use in BizTalk. The use of meaningful names, which describe the content of the information contained by the element or attribute, is especially important when you're building schemas for interchange. Tracking down the meaning of 'field_27' can be difficult, while understanding 'country' is much easier. The more specific the name, the better - 'item' can mean nearly anything. Document your schemas, so that developers with questions have access to the reasoning behind your approach. This should help them build better applications.

BizTalk does include recommendations for the use of case (UPPER and lower case) within names. Instead of using underscores as separators, use capitalization to indicate the breaks between words. 'Important' things - like objects, classes, or things - should start with an upper case letter, and then case should be used in later words to indicate word breaks. Properties, references, and parts of things should start with a lower case letter and then use capitalization to indicate word breaks. For example, a parts list, a 'thing' of its own, might be written as:

<PartsList>

while a diagram referenced by that parts list might be written:

<explodedDiagram href="diagram.jpg">

While BizTalk schemas are much like any other XML schema, you'll do best if you build them to be accessible to the widest possible audience.

Copyright 2000 Extensibility, Inc.

Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516