Archive for March, 2012

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:

 
cold-dive-into-windows-8-runtime-part-2

Memory protection in Internet explorer 10 explained step by step in this post a worth reading for the browsers builders and enthusiasts
http://bit.ly/y85e7i

I had been spending a great part of the night trying to figure out how could i automatic generate Controls and views in ASP.NET MVC 3 and i end up with a review to code first way to do things.

My problem was to allow some dynamic content to be manged directly from a website. For my example i used a canonical example based on books.

So here goes the review of automatic creation to the ones like me that don t remember sometimes this wonderful asp.net MVC 3 feature.

After long running R& D and tests i finally can do this. To do that i had to use some CRUD with scaffolding with Entity Framework and code first. So let’s meet my road to accomplish this.

Step1: Before sacaffolded, i create a model and a DbContext to define what data will be collected.  So i create the following classes

public class Book
{
public int ID { get; set; }
public string Title { get; set; }
public string Isbn { get; set; }
public string Summary { get; set; }
public string Author { get; set; }
public string Thumbnail { get; set; }
public double Price { get; set; }
public DateTime Published { get; set; }
}
public class BookDBContext : DbContext
{
public DbSet<Book> Books { get; set; }
}

The first class defines the concept of book and his data and actions. The second class is the context of book.

Step2: Create the model

i had use the right click of the mouse in to the Controller folder of my project and select Add Controller visual studio opens the window

This is a great way to quickly put your entities and elements running

While Windows 8 keep growing and creating fans in the backstage a lot of important decisions and metrics start to gain form. One of the things that make more curious nowadays when a application driven technology emerges, is how will work marketplace and what will be the market place requirements.

Today i had spend a part off my pre dinner reading the draft of requirements for windows 8 and i must confess this sems a good way to filter good from bad. Here you have for your analisies

http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx

Front end development class

Posted: March 22, 2012 in Anouncements, HTML 5

Today was announced a new class where i will be teaching HTML 5in Portugal  and some Front end development tricks and true deep knowledge, stay tunned in edit offers.
http://www.edit.com.pt/#programas-e-workshops/workshop-frontend-dev-trends.html

Snipets for HTML 5

Posted: March 21, 2012 in HTML 5

One off the useful things a good work tool of any developer had to have is snippets to maximize productivity. A lot of ides allows to had some off that.

I had joint to my visual studio some new snipptes of html5 today i share with you the post with that information

 

http://html5snippets.com/

HTML 5 quick start

Posted: March 21, 2012 in HTML 5
Tags: , ,

Since half of the year off 2011 HTML 5 had become a growing star in the development community and business, some off the fault are of Steve Jobs you may say, but the true is HTML 5 is a great improvement in markup world and Client server applications.

Since the date i start developing in talking teaching and discussing HTML 5 about a year and half ago every day someone ask me how to start, what course should get what book.

Well today i had been viewing the Belgium Tech Days 2012 and i recommend this video from Jeff Prosise to everyone, even for the ones who think they know everything about HTML 5  (silverlight needed).