How to develop Metro Apps for Windows 8 OS


Read this article to know more about how to develop Metro style App for Windows 8 operating system. In this article, I will discuss on how to take advantage of Single sign-on while developing Metro Apps for Windows 8 operating system.

As we all know Microsoft recently released the Developer preview of Windows 8 operating system. Many people around the world downloaded and installed it in their system. Though the Developer preview is only for developers, many people downloaded to test how Windows 8 will actually looks. The main difference in Windows 8 when compared to other Windows system is the interface and performance. Microsoft developed Metro user Interface for Windows 8 operating system. Metro user Interface is the default interface for all Windows 8 devices irrespective of their supportive behavior.

As per Microsoft, Windows 8 works perfect for both touch enabled devices and general PC's. Apart from the Metro Interface, Apps are introduced in Windows 8 operating system. As per sources, Windows 8 will have their separate own App store. Recently, in the Building Windows 8 blog, Microsoft discussed on how to write Apps and how to take advantage of SkyDrive which is a cloud based storage from Microsoft.

How to connect Developers Apps to the Live cloud


As per Microsoft, when a developer starts building Apps for Windows 8 operating system, the main problem he faces is "Enabling Sing-in and sign-up of for users." Many users dislike to sign-in into websites and Apps repeatedly. Developers make users to do this to engage the users with their Apps which increases the security and loyalty of the App. In Windows 8, Microsoft given a chance to Developers to bring users content from cloud into their App to power user experience. One can check it in the Apps like Photos and Mail, and the Metro style Apps which are present in the Windows 8 uses the same platform and technology.

In Windows 8, users cloud-based identity is an OS primitive which is universally accessible for Apps and websites with user permission for single sign-on, which means Apps developed by Developers can inherit the signed in state of a user and their identity. Developers of Metro Apps no need to worry about separate authentication process. In Windows 8, Microsoft made access to user's content in the Live cloud for Apps by using industry standard protocols such as OAuth which is used for authentication and authorization. JSON protocol is used as payloads for the data returned when accessing SkyDrive and Hotmail, XMPP protocol is used for interoperability with Windows Live Messenger.

In addition to above, Microsoft offer the Live SDK for Windows 8 Developer preview to make development on WinRT which is integrated to Visual Studio 11 Express. In Windows 8, when a user connects Developers App to their Windows Live ID, user will have a seamless single sign-on experience from an y Windows 8 PC where they are signed in with a Windows Live ID. The same thing extends to Developers Website, where they get a single sign-on experience if users are signed in to their PC with a Windows Live ID. As per Microsoft, for the Developers, the best way to use single sign-on with Windows Live ID and to integrate SkyDrive content into their Metro style App is to leverage the Live SDK.

How to use the Live SDK in Developers App


The first thing one should do is to download and install the Windows 8 Developer preview and the Live SDK Developer preview on their PC which also installs Microsoft Visual Studio 11 Express for Windows Developer Preview. Second thing is to visit the Windows Push Notifications and Live Connect App management site to configure their Metro style App to access the Live cloud. After the App is configured to use Live Connect, Developer need to add a reference to the Live SDK. The Live SDK is available for development in C#, JavaScript, and VB. One can add it to their project by right-clicking the Project and selecting the "Add Reference, selecting Extension SDK's" from the list, and they should select the entry for the Live SDK as shown below:

In a JavaScript application, Developer need to add the following script reference to Default.html:

<script src="ms-wwa:///LiveSDKHTML.5.0/js/wl.js" ></script>

In C#, they should add the following reference to be able to leverage the Live SDK in their code

using Microsoft.Live;

In VB, the following import statement should be added.

Imports Microsoft.Live

How to use Windows Live ID in Metro style App


Developers to take advantage of Single Sign On (SSO) in their App, they need to place a sign-in button in the App. When a user clicks on the sign-in button, they will be automatically signed in if they are signed into their PC with a Windows Live ID. If not they will be asked to sign in with the Live ID. After signing in, user will be asked to provide consent to the App to access their data such as their SkyDrive photos.

The above workflow will be handled automatically for the developer by simply adding the sign-in button. One can notice that users still confirm sign-on to your application and are not automatically signed on—this is an important design consideration. Below is the example of sample HTML for the sign-in button shown by Microsoft.

div id="signinbutton" style="width: 251px; margin-left: auto; margin-top: 40%; height: 64px; top: 0px;">. In the above code, open the braces before div and close it at the end.

To get more information of how to use the Live SDK, one can visit the Microsoft's official site to get the detailed information.


Related Articles

Step by step instructions to install Windows 8 on VMWare Workstation 8

After several failed attempts to install Windows 8 developer preview build on Windows Virtual PC, VMWare Player and Oracle Virtual Box, I was able to successfully install Windows 8 today on VMWare Workstation. Read this post to learn how to install Windows 8 on VMWare Workstation.

How to get refund for Windows 8?

Are you one of those who are frustrated with Windows 8 and want to get your money back? Or, you got a wrong version of Windows 8? Learn how to get a refund.

How to fix HAL_INITIALIZATION_FAILED error in Windows 8 installation?

In this post, you can find my Windows 8 32-bit and 63-bit installation experience and the problems I encountered during the installation including the HAL_INITIALIZATION__FAILED error. Both Windows Virtual PC and VMWare Player showed the same error for 32-bit installations, but the error messages were different for 64-bit Windows 8 installation.

More articles: Windows 8 Windows Operating System

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: