03 - Introduction to Windows Store Apps

In today’s scenario different types of devices are used by people for performing day to day activities like: PCs, laptops, Tablets, smartphones and PDA. All these devices are of different hardware and software platform, so it needs of different types of operating systems to develop application for these devices.

Microsoft has filled this gap by introducing new operation system Windows 8. That is available and supports all these different devices uniformly. It also supports multi touch interface for touch screen devices as well as use of mouse and keyboard for PCs and laptops.

Windows 8 operating system also support a new kind of apps Window store apps those can be deployed on all kinds of devices in the same way.

It can be developed using multiple programming languages and scripting languages such as:

C/C++ with XAML

C#/VB with XAML

HTML5/CSS with JavaScript.

Features of Window store apps

Support for multiple devices like desktop PCs, tablets, PDA and smartphones.

Easy navigation and quick search for fast and fluid experience.

Tiled interface for simpler user interaction

Focus on content by displaying the app in full screen without chrome.

Different views are available like Full Screen view, Snapped view and Fill view.

Share and access data quickly using charms bar.

Support NFC (Near field communication).

Support different programming languages.

Navigation patterns are provided.

Animation library is provided attractive and elegance apps.

Support easy communication.

Support GPS, Webcam and microphone.

Development of share enabled apps to allow users to share data from one app to another.

Development Tool Visual Studio 2012

Visual Studio 2012 is an integrated development environment from Microsoft that is used to develop windows store app development on windows 8 operating system.

Click on I agree to the License terms and conditions in above screen, following screen will appear:

Select all required features you want to install. Click on INSTALL button.

It will display following screen:

Installation process will start. There will be two progress bars appearing on screen Acquiring and Applying.

Acquiring progress bar shows the progress of package download and Applying progress bar shows the progress of installation and configuration.

Click on LAUCH button to execute the application.

To develop windows store app in Visual studio 2012, Microsoft developer license is required. You can acquire it by signing in on Microsoft site. It will provide you License for windows store app development for one month period.

Creating a new Window store project:

To create a new window store project follow steps:

Launch Visual studio 2012 application IDE.

In the main menu click File-> New Project. The New Project dialog box appears and displays all available templates.

Select Visual C# language and window store project from left pane and click on Blank App (XAML)in main window. Provide the App name and path where you want to save your project.

It will display following screen, where we can see all the folders and files that a window store project contains by default.

To load the designer, In Solution Explorer window, double click the MainPage.xaml node. The IDE will open the file in Design view, as shown:

Structure of Window store Project

A Window store Project is a collection of source code, resource files and configuration files. It contains several files and directories.

Following are the directories that a window store project may contain:

Properties

It contains AssemblyInfo.cs file, that contains information of assembly of the project.

References

It contains the references of APIs those are required to build the current Window store app.

Assests

It contains the files regarding images, audio files and video files.

Common

It contains StandardStyles.xaml file which is a set of default styles of app

App.xaml

It contains information regarding the resources used in the app.

App.xaml.cs

It is the entry point of a project. It loads the main page of a window store project. This file is also can be said code behind file of App.xaml file.

It is the code behind file for MainPage.xaml file. Here we can write code for our window store app.

Package.appxmanifest

This file contain information regarding deployment of the app.

<Project_Name>_TemporaryKey.pfx

It is encrypted security file of window store project, used for authentication purpose of a device where window store app is being accessed.

Guidelines for creating window store project

To make an efficient window store project, we should follow some guidelines, these guidelines are:

Content before chrome

In traditionally developed application various elements are present on application Interface like: Border, Title bar, menu bar and Tool bar, these elements are known as Chrome. These elements are not frequently used in applications and they destruct the user from contents.

I window store app there is no border that means contents are displayed on full screen. Users can pay more attention towards contents. In these applications only frequently used controls are provide on interface. Controls those are less required can be available on demand through App Bars.

A developer can use the concept of chrome by:

Using purposeful animations in apps.

Providing immediate visual feedback to users.

Using built-in WinRT controls

Keeping interaction reversible.

Be fast and fluid

While making window store apps, developer should ensure that all the features are provided fastly and are efficiently responsive. To make it possible we should use tiled interface and maximize the use of animations in our applications and also keeping in mind the use of application on touch first devices.

Snap and scale beautifully

Window store apps are used on variety of devices from small screen of smart-phones to large screen of desktop. They support different layouts, views and screen resolutions. Application can be run on full screen. In snapped view snap is displayed in 320 pixels of screen and rest of the part of screen is used for contents. Applications should support Portrait and Landscape views depending on the feature of screen rotation.

Use the right contracts

Window store apps should follow the right contracts. Contract is an agreement between two applications, so that they can share information of one another. This sharing is made possible through windows.

The app that shares the contents with another app should support a source contract. In window store apps

following contracts can be used:

Share contract

This contract enable user to share data from one app to another.

Search contract

This contract enable user to search an app’s content from anywhere in Windows.

File Picker contract

This contract make possible to access contents of one app while using another app.

Invest in a great tile

In window store apps every application, whenever installed is present on start screen associated with a tile. It can be executed by clicking on associated tile.

Feel connected and alive

In window store apps there is a feature of live tiles; these tiles are used to provide notifications to user even the application is not executing, In this way we can give the experience to a user that He/She is connected to the store.

Roam to the cloud

While creating window store apps, developer needs to ensure the app that is installed on one device with desired settings and preferences will be available on other device also with the same preferences and settings.

For eg. If a user is using weather app on his desktop and made the temperature from Fahrenheit to Celsius, this settings should be available if he/she access the weather information on his tab.

Apart of settings and preferences in a window store apps it also needs to be ensure that it supports state save feature, if the same app is being used across the devices. For eg when a user is reading a book on his desktop using Reading app and close the application due to some reason, and opens the same app in his/ her tablet with the same Reading app, he/she can start from the point where he/she has left.