Programming to Contract
In This Chapter
Allowing sharing with other apps
Providing search functions
Making use of devices
Once upon a time, if you needed to do something external to an application, like print to a printer or communicate with another program, you would copy your code from a magazine.
Okay, that was a long time ago. But it wasn’t long ago that you would copy the code from the Internet. Then, after a while, libraries appeared that you could copy into your program.
Eventually, services appeared that you could use. If you wanted to provide the information, you could create your own service. Finding those services, or getting people to find yours, was rather difficult at times, though. Still is.
Windows 8 is trying something totally new. Instead of depending on Internet-enabled code — either copied from or provided within — the commonly used interface code is provided as part of the operating system’s programming interface. It’s called a contract, and it’s taking Windows programming to new places.
Coding to a Whole New Tune
Windows 8 applications use charms to interface with the user, and contracts to communicate with the outside world. Charms are the navigational ...