Chapter 1. Windows Store Apps

In this chapter, we will cover:

  • Building our first Windows Store app
  • Adding a splash screen (and app tiles) to our app
  • Improving the application to make it compliant with the Windows 8 lifecycle model
  • Improving our application tile
  • Improving our application with toast notifications

Introduction

We are clearly speaking of a new, modern, and touch-friendly kind of application with the Windows Store apps style.

Windows Store app style application development, for the latest Windows 8 platform, is a very important part of this release of the .NET Framework 4.5.

We will explore Windows Runtime managed development in our development recipes. We also have the power of a very simple, well designed, and lightweight base class library API at our disposal (C# and VB) for developing Windows Store apps. This is called Windows Runtime, more commonly known as WinRT.

The following image clarifies the overall structure and components that we will have to use for developing Windows Store apps:

Introduction

Portable libraries are there to help us port our existing code into multi-targeting scenarios such as Windows Store apps, Windows Phone, Silverlight, desktop, or X-box code with a strong focus on Model-View-ViewModel (MVVM). MVVM is an architectural design pattern designed for modern user interface (UI) development, very commonly used in XAML development. This will allow us to share the Model and ViewModel code with only the need for rewriting the UI and the application model, apart from the device integration.

Windows Store apps are designed for tablet devices and touch interaction, mainly for consumers. However, the good old desktop is still there and we can develop classic Windows applications, now called desktop apps, through the desktop mode.

Both of these execution and development modes coexist and are here for different scenarios. This chapter focuses on Windows Store apps development.

The Windows 8 app programming model basically:

  • Implements the new Windows Store app style
  • Provides a simple programming model for developers
  • Provides WinRT, which provides a natural .NET-like interaction with Windows APIs
  • Provides a Silverlight-like XAML UI model to develop with
  • Is sandboxed, providing self-contained secure applications
  • Is designed to be asynchronous, which if well applied, makes our applications fast and fluid

WinRT provides projections that expose the API to the different development environments. With this we can use WinRT from the .NET Framework 4.5.

The UI can be created with XAML (or HTML and CSS if we prefer), which is rendered with DirectX 11.1 (also known as Direct2D), so that we have a high performing UI. We can also implement the interface using DirectX.

So the good news is that the development is very straightforward and easy if we have some experience in Silverlight, Windows Presentation Foundation (WPF), or Windows Phone. If not, it will only be easy.

Note that the Base Class Library (BCL) used by WinRT is not the full desktop version but a reduced set, very similar to the Silverlight types.

There are also some very important Windows Store app principles to keep in mind. We will explore the following principles through the recipes in this book:

  • Windows Store app style design: Focus on the content, minimalism, and emphasis on typography
  • Fast and fluid: Fast user interactions and transitions that are intuitive and executed without delays (performance)
  • Touch first: Simple and consistent touch interaction language
  • Scale beautifully: Windows Store apps are readily executed on tablets with less than 10-inch and up to 27-inch screens
  • Support for multiple states: Full screen, portrait, landscape, or snapped
  • Using the right contracts: Contracts provide a way for Windows Store apps to collaborate, allowing the user to search or share content between applications
  • Live tiles: Useful information appears on the app's tile on the start screen while the app is not in execution
  • Settings and data roam to the cloud: Users get the same experience regardless of where they sign in from

It's your turn; go ahead and explore our recipes! They will help you explore progressively how to implement the different flavors of this new era of Windows Store apps. Let's get started!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset