The Windows 8 Store Application Object Model

by on August 14, 2013

While working on my latest Windows Store application, I found that I needed a better mental model of the relationships between the framework classes. Here are some quick sketches that cover the core objects and their interactions during application launch.

Core Objects

The diagram below shows the core objects common to all store applications:

Application Object Model              

An App class derived from the framework’s Application base class is the starting point. It represents the running process for the application and exposes basic events for startup and shutdown, as well as several other special events triggered by the operating system.

The sealed Window class represents the core container window created by the operating system to host the application’s user interface. It exposes several properties and events related to visibility and sizing. It acts as the host for the visual controls that compose the application.

The Frame class is a visual content container. It is attached to and completely fills the core Window object. It hosts and manages the lifetimes of the individual Page objects that form the user experience of an application. It provides a navigation framework with full backward and forward history stacks to allow movement between pages using a familiar browsing metaphor.

You can see an expanded view of these objects with their attributes and methods here:

WIndows.UI

 

Application Launch

The sequence diagram below shows the basic launch steps for a simple store application with a single Main page:

Application Activation

When a user launches the app, it triggers a call to the overloaded OnLaunched() event in the App class. This method instantiates a new root Frame object and attaches it to the framework’s current Window (there’s only one for the newly launched application).

Once the Frame is attached, a call to Navigate( typeof(MainPage) ) triggers the creation of the first page, fills the frame with it, and places it in the navigation history stack. It’s important to point out that the Frame’s navigation framework takes care of instantiating the requested pages, optionally reusing them if desired.

After the Frame is set up and the first page has been primed, a final method call to Window.Current.Activate() brings the application window to the forefront and shows it to the user.

That’s a quick tour of the Windows Store app model to show the fundamental objects and how they interact with each other as the application starts up.

Note: These models are based on a C# + XAML based application. The core object model is fundamentally the same for JavaScript + HTML5, but there are some differences in event names and object interactions due to language and runtime differences. I’ll show the JavaScript + HTML 5 versions of these same models in a future article.

As always, stay tuned to my twitter feed for Windows 8, Windows Azure and other Microsoft developer announcements, updates, and links: @clinted



Windows Azure IaaS Reaches General Availability

by on April 17, 2013

Today, Windows Azure Infrastructure Services (IaaS), including Virtual Machines and Virtual Networking, has reached general availability. These new services make it possible for you to move your applications into the cloud as is.

This announcement is a significant step in our cloud computing strategy, which has been influenced directly by our discussions with customers and partners around the world. One point holds true in every one of our discussions with you - the cloud should be an enabler for innovation, and an extension of your organization’s IT fabric, not just a fancier way to describe cheap infrastructure and application hosting. This brief video explains what we mean by extension of your organization’s IT fabric.

You’ve also told us that you don’t want to have to choose either a low price or good performance; you want a low price and good performance. That’s why today we are also announcing a commitment to match Amazon Web Services prices for commodity services such as compute, storage and bandwidth. This starts with reducing our GA prices on Virtual Machines and Cloud Services by 21-33%. 

Another highlight is the introduction of 2 new high memory compute instance sizes (28GB and 56GB) to meet the needs of memory intensive workloads like SharePoint Server and SQL Server.

Key scenarios enabled by Windows Azure IaaS

If you haven’t taken a look at Windows Azure, there’s never been a better time. Our IaaS offering has been driven by these key scenarios:

clip_image002[6]

Dramatically reduce your wait time to provision IT resources by rolling out apps and infrastructure in minutes. Bring your Windows or Linux-based application to the cloud as-is.  Scale up or scale down as needed for a wide range of app hosting scenarios and pay only for what you use. More in this video

clip_image004[6]

Build hybrid services that take advantage of what you already have while enabling new innovation in the cloud.  Bring your existing identities to apps running in Virtual Machines by simply connecting to your on-premises Active Directory.  Running Office 365?  Simply run Active Directory Federation services in Virtual Machines to sync with on-premises identities for single sign on.

clip_image006

Spin up a test lab within minutes.  Connect to your existing infrastructure if required. When you’re done, tear it down, bring your app back in house to run it using your on-premises infrastructure, or keep it in the cloud.  The choice is yours. More in this video.

clip_image008

Spin up SharePoint farms in minutes without major capital investments. Integrate full trust code to run rich apps and business logic, and provide internet facing collaboration sites on SharePoint that scale with your business needs. More in this video.

clip_image010

Start small, go big. Whether you are building a lab to prototype your newest app with SQL Server or extending data marts into the cloud, Windows Azure Virtual Machines is a solid foundation you can count on. With full SQL Server compatibility you get capabilities like full-text search, or transparent data encryption for greater security. More in this video

 

You can find more details in the general availability announcement including information about the price reduction at the Windows Azure Blog.

As always, stay tuned to my twitter feed for Windows 8, Windows Azure and other Microsoft developer announcements, updates, and links: @clinted



Announcing Android Support for Mobile Services

by on March 7, 2013

clip_image001[4]

I'm extremely excited to announce the release of our official Android SDK for Windows Azure Mobile Services. Android developers now have easy access to structured data storage, authentication, push notifications using Google Cloud Messaging(GCM) and more in the form of a native Java SDK. This SDK joins the Windows Store, Windows Phone 8, and iOS SDKs that we've already released. When we first launched Mobile Services, we said our goal was to enable any application developer to connect their app to a backend hosted in Windows Azure. Today’s announcement means that even more mobile developers can be Microsoft developers by easily consuming Windows Azure services for their backend.

For this release, the Windows Azure team worked with Microsoft Open Technologies. MS Open Tech developed the SDK and the Windows Azure team worked on the portal integration and push notifications. The native Java SDK for Android developers can be used for applications destined for the Google Play Store, Amazon App Store, or any other Android app store. Additionally, integrated support for push notifications with GCM has been added to server scripts. Like the other Mobile Services SDKs, the Android SDK will be open sourced on GitHub. You can access the GitHub repository here. Going forward, the plan is to keep improvements to each SDK the same when possible.

New Content

WindowsAzure.com – Developers will see changes to the Mobile Services Dev Center at WindowsAzure.com.  These changes include Android focused tutorials on creating a new mobile service, getting started with data, and handling user authentication.  These will join the tutorials already present for the other client platforms.

Android Samples - We've created two samples that are focused on demonstrating common scenarios when using Mobile Services with Android.  Both of these scenarios focus on the data storage aspect of Mobile Services though we'll be adding samples that take advantage of the other capabilities of Mobile Services soon. 

 

clip_image002[4]

Feedback

This sample demonstrates how you can use Mobile Services to get feedback data from your application and store it to Mobile Services.  The sample was built so that a developer could easily take the code and UI involved and place it into their own applications.  You can access the GitHub repo for this sample here.

clip_image004[6]

Tic Tac Toe Leaderboard

This sample demonstrates how you can use Mobile Services to store and serve up a leaderboard for a game.  In this scenario the game is Tic Tac Toe, and each win, loss, or tie will be recorded for the current player.  The leaderboard will display each player ranked from best to worst.  You can access the GitHub repo for this sample here.

As always, stay tuned to my twitter feed for Windows 8, Windows Azure and other Microsoft developer announcements, updates, and links: @clinted