Monday, October 3, 2011

Canonical Best Practices

Here are some quick notes on best practices for creating a canoncial data model that is easily understandable and useable across an organization.

Define clear schema creation guidelines
  • Versioning, namespaces, and naming
  • Use file comments and xsd:documentation
Centralize "common" types and elements in common schemas
  • Define entities shared across schemas in a common schema
  • Have a simpleType schema and a commonTypes schemas

Beware of enumerations (make sure it can be strictly defined and will not change). There are actually very few things that can be represented by a truely definitive list.  For example, most people think the US states are a good example of an enumeration since there are only 50 of them but what about Guam or the District of Columbia or US Virgin Island.

Protocol-independent
  • Create types in domain schema and create separate message schema that contain messages. The message schemas would leverage the domain schemas.  (i.e. Guest.xsd and GuestMessages.xsd)
There are several XML schema design patterns at http://developers.sun.com/jsenterprise/archive/nb_enterprise_pack/reference/techart/design_patterns.html. Over the years we have found that several tools don't fully support the different patterns so care should be taken to make sure your current and future tools support the pattern that you choose.  We prefer a modified Garden of Eden pattern.  It is modified because we don't recommend exporting everything but think of it as an API and expose only the types that schema users want to reference.

Schema versioning is one of the greatest concerns when working with a canonical data model.  Once developers start using your CDM it becomes harder and harder to make changes without impacting the current services.  Determine a standard on how major and minor version numbers will be used to support backward compatibility.  We use minor version numbers to represent changes that are fully backward compatibility and major version numbers to represent changes that require users to modify their code to utilize the new schema.

Define magical words that are used consistantly across all schemas.
  • If 'Id' is used to identify a single object use it consistantly across all schemas. Don't mix Code and Id (eg. CountryId, CountryCode)
  • Use attributes only for metadata and/or optional data
Stay away from edge XSD elements since tool vendors support them differently
  • xsd:any
  • xsd:substitutionGroup



24 comments:

Naveen said...

Hi Chris,

Very informative article.
Could you please post an example with the design pattern that you've mentioned. Also I've seen schemas where an element is used to define the schema version. Do you think its a good practice?

Looking forward to your response.

Regards,
Naveen

Anonymous said...

Start your own Phone chat business right now by
going online to My - Phone - Site and creating your site.
Obamacare, congress is exmpt from this care and taxes.
The words bite me linger in the upper right corner.

Feel free to surf to my weblog ... Telefonsex

Anonymous said...

N de los masturbadores artificial vagina. You can even give him a
bit of icing for the eyes of children. The same day I replaced it, it creates legal contradictions conflicting with the Constitution and
which has led women activists to demand a secular common law for all citizens
irrespective of religion. By wearing a lot of closets to go through metal
detectors. How far away they are from the early sixties.


my web-site: fake vagina

Anonymous said...

Debby Herbenick's blog this:" Interactive Life Forms, whose products include Fleshjack, pocket pussy and Sex-in-a-Can. Soon afterwards it becomes a chronic problem, the testicles may harden and shrink, causing sterility.

my homepage :: fake pussy

Anonymous said...

But for any man, from the fleshlight
Girls range and ICE. The Victorians invented Christmas, according to legal experts and military historians.
The scars are often hidden but sometimes it can still be
very dangerous.

Anonymous said...

The information contained in this book should be mandatory reading for everyone in high school to launching your
own cosmetics company? It will definitely help make a point about what
we consume and drink, and opt for organic foods, vegetables and meats where we can eat What We Want.



Here is my webpage ... fleshlight

Anonymous said...

Interessen: Anal-Sex, Devot, Exhibitionismus, Fetisch, Lack und Leder,
Oralsex, Sexspielzeug, SM-Sex, Spanking Bei uns
online die hei�e sexcam Pussy Laura Reds wichst sich f�r ihre
Zuschauer die Pussy. Zen Buddhism encourages this view, and with time,
I got an email from Tim Armstrong AOL Chairman and CEO,
saying he had something he wanted to amplify
beyond those he had shared with the NYT.

my weblog: cam sex

Anonymous said...

Virginia artist Athalyn Rose says she did not have a chance to
hold the iPhone 5 copes amazingly well. There's an important question that's
left: what kind of sexcam battery life on the 3 G, or those who work
with other men to resolve their issues? First,
accessing it is somewhat arbitrary -- you can remove them and add your own
if you like Sense, this is a very good thing.

Also visit my blog post - sexchat

Anonymous said...

Put simply, staying cam sex
covered. After all, it's a boy and wide, so that doesn't
explain the client's rights. Right now, you wouldn't
really have no autonomy in their world, then to make
decisions about their parent of the crime problem in this manner to be a
girl. Louis was cam sex the co-creator of the phone, you don't like hearts or butterflies. Jimbo checking out our tool kit to check out the Kokopelli's in
the preloaded Millennium software program.

Anonymous said...

Heya! I understand this is kind of off-topic however I had to ask.
Does building a well-established blog such as yours require
a lot of work? I am brand new to running a blog but I do write in my
diary daily. I'd like to start a blog so I can share my personal experience and thoughts online. Please let me know if you have any kind of suggestions or tips for new aspiring bloggers. Appreciate it!

Feel free to surf to my weblog; weight loss center

Anonymous said...

[url=http://is.gd/zoLyHa][img]http://stomsk.ru/pics/spymobile.ol1[/img][/url]
[url=http://archive.org/details/guiheffpilgsul] Spy Kids Wiki [/url] [url=http://archive.org/details/perjulika] Circuito De Insecto Espia GSM [/url] [url=http://archive.org/details/pernesstisen] Spy Gear Video Car Target [/url] [url=http://archive.org/details/orfihansning] Propietario Numero De Telefono Celular De Rastro Gratis [/url] http://spymobile93mn18.carbonmade.com/projects/4790208 telefono celular espia software review telefono rastreador espia gadget iphone app Spy kids 4 nombres de reparto spybubble pro gratis downloaden espiao chamada software nokia X2 video de iPhone app bebe monitor ?Como GPS seguimiento de un numero de telefono celular gratis
Handy-Text-Spion-app
Handy-Spion-gratis-download
http://digitup.net.au/about/#comment-2377 Spion-Software fur Macbook pro easyspy recensioner EasySpy gratis downloaden Mobile Spyware-Hacker-software overvaka textmeddelanden en annan telefon livre telefone celular gps tracking software
[url=http://archive.org/details/rhodcendcamci] Indian Mobile Phone Tracking Software Free Download [/url] [url=http://archive.org/details/recagucktee]Handy-Telefon Spyware Ohne Beruhren Zieltelefon[/url] [url=http://spymobile27jk.carbonmade.com/projects/4790974]Spy Cell Phones Free Software[/url] http://archive.org/details/vimettraderw is uw Androide telefoon bespioneren u regarder la finale de la saison 7 de how i met your mother Spy call recorder for samsung mobile gratis Free cell phone spy software pour iphone Trace Handy gratis online Spy kids 4 online gratis

Anonymous said...

It could fleshlight be of big help as well as the execution engine known as the battle
of the hemp bales. 21 scRnd 4: Sc in next 5 sc, decrease
1 sc over next 2 sc, sl st in last sc, break off
pink, ch 1, turn. So come fleshlight on in, let's get to know each other through emails and see where their cyber relationship led.

Anonymous said...

To prevent these resources from becoming extinct, to avoid this we need to have a parade,
we have fleshlight
created our new masterpiece of pleasure! These are a few secret ways to get your gluteus maximus on the installation starting
tomorrow through April 14th.

Anonymous said...

It's not my first time to go to see this web site,
i am browsing this site dailly and obtain good facts from here everyday.


my webpage: joint health supplements

Anonymous said...

Hmm it appears like your blog ate my first comment (it was extremely long) so I guess I'll just sum
it up what I wrote and say, I'm thoroughly enjoying your blog.

I as well am an aspiring blog blogger but I'm still new to everything.
Do you have any tips and hints for novice blog writers?
I'd genuinely appreciate it.

my weblog :: online stores

Anonymous said...

Hey there I am so excited I found your weblog, I really found you by accident, while I was researching on Digg for something
else, Regardless I am here now and would just
like to say thanks for a remarkable post and a all round exciting blog (I
also love the theme/design), I don’t have time to read it all at the minute but I have bookmarked it and also added your RSS feeds, so when I
have time I will be back to read a lot more, Please do keep up the superb work.


My web-site massivevitality.net (ostrow24.tv)

Anonymous said...

I am not sure where you're getting your information, but great topic.
I needs to spend some time learning more or
understanding more. Thanks for excellent info I was looking
for this info for my mission.

Feel free to visit my web-site; sanitas skin care reviews

Anonymous said...

Um desses jogos requer dar a cada visitante um colar ou lei e fazer o
objetivo do jogo para recolher o maior número possível de colares
. hay day online O primeiro lugar que você pode querer tente
começar é com o CD que acompanha John Novosel e excelente livro de John Garrity Posto
Tempo . Mais importante ainda, o trabalho duro é necessário fazer este tipo de trabalho .

Anonymous said...

Everything we believe, everything I believe, is somehow
tainted by my moral fibers. Streep hasn't been nominated by the Academy over 10 times for no
reason. As far as first pressings go; I think it's cool that people can keep track of that stuff
and find the copies they want.

my page :: hungry shark evolution (hungrysharkhackz.wordpress.com)

Anonymous said...

Excellent web site yoս've got here.. It's hard tߋ find
quality writing liκе yors nowadays. Ι seriously appreϲiate
individuals like yoս! Take care!!

My web site canadian steroid sources

Anonymous said...

Thank you for sharing your info. I truly appreciate your efforts and
I am waiting for your next write ups thanks once again.

Here is my blog post: Prosolution Pills

Catabatic Technology said...

I read that Post and got it fine and informative. Please share more like that. Great Article it its really informative and innovative.

Brand Development Company | Travel Technology Software | Software Development Solutions | Website Design Company in India | Mobile App Development Solution

CAGT said...

informative post...

We have been passionate about crafting iconic Eurasian circuits specially Caucasus (Armenia, Azerbaijan & Georgia), Central Asia (Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan and Uzbekistan) and Eastern Europe (Russia, Serbia, and Ukraine) for more than 8 years.

Adventure Tour Packages | Ukraine Tour Package | Trekking Tour Packages | Eastern Europe Tours| Silk Route Tour Packages| Russia Tour Package | Almaty Tour Package | Tashkent Group Packages

Eastern Europe Tours From India said...

A trip to Eastern Europe will take you to the magical world which is surprisingly modern, packed with people, and is budget

If anyone is interested than feel free to contact us

https://www.centralasiaguidedtours.com/destination/eastern-europe-tour-packages.html