The Charms are a great new feature for Windows 8 that should be leveraged whenever possible
Windows 8 was previewed to the world back in September 2011 and and one of the cool features that was shown repeatedly were the charms that can be swiped in from the right side of the screen (this bar is called the System Commands). These charms include the Search, Share, Devices, and Settings charms. The purpose of these charms is to make certain common and repeatable actions available at the OS level to be leveraged by applications where suitable.
In my role working with Independent Software Vendors, I was immediately taken by how this could enhance certain scenarios for Line of Business Apps and started discussing them with the ISVs I work with. In particular, the Search and Share charms were very interesting so I thought I would spend some time blogging about them over the coming weeks.
Today, let’s start with a review of the capabilities and how they can be used in LOB Metro Style Apps.
From the Start screen, when one brings up the system commands and touches/clicks the top most charm the Windows 8 Search experience is displayed (captured below). The left portion of the screen displays the currently installed apps in alphabetical order, while the right side gives the user the ability to type what they are searching for in order to filter down the results.
The initial search is for Apps, but Settings and Files are also searchable. Below the fold, one will notice a number of apps that can be clicked. These apps have implemented the Search Contract, which allows them to receive the search query entered by the user. This allows users to extend their search query into the various apps installed on their Windows 8 computer as long as those apps have implemented this contract. The search results for each app are displayed within the app itself, immersing the user in the appropriate experience for that app.
How is this important to LOB Apps? It allows a user to find the information they need quickly. For example, let’s say I work at a bank and in that search box I type the name of a customer I work with (let’s say “John Smith”). Initially, Windows 8 is unlikely to find any Apps named “John Smith”. If I click Files, it may find files I have stored on my computer with “John Smith” in the title or contents. But if I click the People app, that app will immediately start and be passed the query string “John Smith” and display any contacts with that name. If I have a banking app and click it, how that app behaves will be determined by the app developers, but let’s assume it will search for customers with that name, even if that data is not local to the app. The banking app will launch, take in the query string, then send a search request to its backend servers to conduct that search. I have done all this searching by simply typing “John Smith” once and navigating through the apps I am interested in finding information about that person in.
In addition, if I was already in a specific Metro Style app, pulling up the Search charm and typing a search term will conduct a search locally in that app first, then allow the user to choose to search for that term in App, Settings Files, or other Windows 8 Metro Style Apps. If your application needs to offer a search experience, it is highly advisable to use the Search charm to initiate that search experience as it will be the natural place users will go to begin searching. And, it will also reduce the real estate in your app to display a search link.
The really fascinating charm for me is the Share charm. This charm allows a user to share information from one Metro Style App to another without the apps needing to intimately know about one another ahead of time. Typically, the type of information shared might be text or a link. Where cut and paste have been typically used to share some information between apps, Share can be used to pass information between apps but have the Target app act much more intelligently based on the type of data received from the Source App. Let’s take a look at an example.
If I am in the Windows Store and find an app I would like to share with someone, while on the app’s page, I can invoke the Share charm. This will allow me to select an app to share information to based on the type of information being share. In this case, a URI is being shared to deep link to this app within the Windows Store. You will notice in the top screen shot that just 3 apps are offered to share to. This is because these 3 apps are participating in the Share Target contract, and in addition, are specifically able to consume a data format of URI.
Once I click on an app, Mail in this case, I am brought into an experience to write a mail message with the content of that share already embedded in the message. In this case, the Mail app decided how to handle the shared data based on the type of data being share, a URI, and chose to embed the URI in a new mail message. It is up to the developers of Target app to decide how to consume the data from the Source app.
There are 7 types of data that can be shared between Windows 8 Metro Style Apps:
It is the last one, the custom data formats, that brings particular power to LOB apps on Windows 8. While the 6 standard data formats are highly usable, they don’t encompass all the scenarios around data sharing a developer may want to expose or consume and the custom data formats is the mechanism to invoke a richer share experience between apps. For example, lets say you are in a banking CRM app looking at a customer and want to initiate a new loan for that customer. Instead of retyping a lot of basic information for that customer, you would like to share that information to the loan origination app. Ideally, you would pass a Person data format from the CRM app to the loan app. This can be done by using a scheme-based format or creating a custom data format.
Ideally, one would use a common schema like those found on http://www.schema.org. In the banking example I just mentioned, one could have used this Person schema, which includes expected details like name, address, phone numbers, email, birthday …
If a suitable schema can’t be found on schema.org, then you can roll our own to allow you to pass the suitable information between Source and Target apps. I will be taking a deeper look at this in a future blog post as this capability is what will allow LOB app developers to loosely couple Windows 8 Metro Style Apps, whether they are developing both the source and target apps or whether they are creating just one of them.
Links in this post: