Pages

Wednesday 25 July 2012

Share contract and custom data. Do you need a reference implementation for schema.org formats?

Windows 8 style apps can use contracts to interact with each other. For example Share contract allows sharing of various data between totally independent apps. As long as app follows Share target contract it can receive text, HTML, links, files, images and custom data. For source apps sharing data in the standard formats is pretty straight forward – DataPackage class provides corresponding functions SetText(), SetUri(), etc. All what you need is to call function and target app will get the data.

Custom data is a different story.

DataPackage.SetData() accepts two parameters – format id and data object. You can use your own "my-super-data" format id but nobody knows about this format and no one application will be able to receive your shared data. That’s why Microsoft suggests using for data sharing formats defined by schema.org (e.g. http://schema.org/Book) – by doing this you can be sure that at least some of apps will know about your package format

Read full article here

No comments:

Post a Comment

Web Informer Button