Posts Tagged ‘deep dive’

Nowadays we can found a lot of posts over the internet about new Microsoft windows 8 capabilities or Windows 8 Metro style Apps.  Since i am diving in to this platform since the public announcements of the developer preview, i decided today to take sometime to make a journey with you in a different view of windows 8.

I am talking about windows 8 runtime. This is the first post of our win RT journey.

Win RT is the codename that stands for Windows runtime, and is the software block of the new windows that powers metro style applications.

!important: remember that at the time of this written Windows 8 is at the consumer preview version so that can happen some slightly changes in the final versions.

Presenting WinRT

Presenting WinRT as a concept can be made on 4 different sentences:

  • Is a bunch of Windows Management APIS used to build Metro Style applications;
  • Is the runtime that manages the resources necessary to make a Metro Style APP run;
  • Is the maestro between the different software blocks that connects windows core and metro style apps;
All the sentences above are true and complementary views so if we try to condense all this view in to just one we will found the definition presented by microsoft since the build event
“WINRT is the solid, efficient foundation to build and run metrostyle APPS”
Localize WINRT in Windows 8
After understanding what is and what the mission of WINRT, let’s position Metro APPS in to the Windows 8 Universe and find the action place of WINRT.
                                                                                         (image copyrights to Microsoft)
 As you can see from the figure above and as you maybe already know, windows 8 windows support 2 kinds of different interaction paradigm (and build) apps.
  • Desktop Apps : the usual kind of applications we are used to in a windows operation system
  • Metro Style Apps: apps that follow the patterns of Metro style principles

As you can see from the picture Metro Style Apps are supported by a bunch of APIS named Windows Runtime APIS, this APIs correspond to the programmatic service interface of Windows runtime over the Operating System Kernel (like win32 or .NET libraries) . Basically WinRT sits right on top of Windows as a thin layer, exposing functions of Windows. These functions can be used in Metro style apps from all languages.

The figure above shows the different APIs used by developers to build Windows 8, that provides the abstraction layer over the operating system.

  • User Interface: Abstraction layer related to the handling of controls and other Visual and user interaction objects.
  • Devices: Abstraction layer that gives the developer an abstraction over the different devices that are assembled in the machine where the operating system runs (sensors, GPS and others).
  • Communication & Data: Abstraction layer over the communication between apps and systems.
  • Fundamentals: The core of the windows Runtime this API is an abstraction layer over the basic computation processes and needs of the application like memory management, security and others.

But Windows Runtime is much more than just a bunch of APIS, the most beautiful part is the runtime system and our main goal is to deconstruct and understand how this runtime works, so let’s continue our journey.

Discovering Windows Runtime Architecture

Let’s make take a deep look in to the Windows runtime deconstructing and understanding his architecture.

Windows Core: correspond to the services of Windows;

Windows runtime core: Is a Layer that exposes the Windows services, definition of types exposure of interfaces, is the core of the runtime;

UI, Pickers, Controls; Media; XAML;Storage; Network;.. : Some APIS that live on the top of windows runtime;

Windows Metadata & Namespace: The runtime give us the concept of metadata for types, what allow us to manage and get in a natural way the runtime notions of types.

Web Host: A host for Web applications;

Runtime Broker: is a separate process that handles the security permission of separated processes like sensors or cameras;

Language projection: A mechanism that allows the windows runtime API be exposed in a different way according to the language in usage;

Language support: Is the implementation of the technologies to allow the support of windows runtime over the different languages (WINJS,  CLR )

Thanks to is design and architecture of Windows Runtime it is allowed to create applications over Windows 8 runtime that respect the fundamental software development principles:

  • Major improvement of developer experience and freedom: thanks to the language projection and metadata developers can choose and use different languages without losing functionality and thanks to metadata we have great intellisense.
  • Responsive and fluid user first: One of the principles of windows 8 programing is assyncronism, that option is imposed in some cases by the platform and WINTRT;
  • APP Centric platform: Applications are isolated as they was in the past (with processes boundaries) but are possible the creation of contracts between apps and operating system and the manage of app to app contracts;
  • Versioning: The runtime enables the concept of version in a way that each application as the reference of built and can run in future systems, because runtime knows how to get that information and can adapt to the needs of the application.

That’s all for now, in the next post we will take a look in to Windows metadata and to the way memory managed and objects are supported. Thanks for your attention and stay tuned.

Next posts: