Codeacademy Python Console
Intro to codeacademy:
Contracts are the glue that bind Metro Style apps together with the system UI. Different Metro style apps can talk to each other if they have implemented the same contract. Basically, contracts provide Share, Search and Picker and other services to apps. Apps can implement one or more contracts to interact with the system in a fluid way.
Both Socialite and Tweet@rama have implemented Target Share Contract.
Share lets you share data from one app with any other app that has implemented a share contract. A Source app is the one which provides something to share. A Target app is the app being shared through. This data interchange is made possible through a set of common formats. Every app, where possible, should implement a Source share contract. Apps that produce or store content, news, information, data should implement a Source Share contract.
Apps such as Mail, Social Networks, Chat, Note Takers, Image Editors, Translator Apps etc should implement Target Share Contracts,
Search enables searching from anywhere within Windows 8 within your app. This is generally recommended than building a search within your app because the search functionality is standardized across all apps. The apps that show below the search box are all the apps that have implemented the search contract. So, the context of your search will change depending on your app. You don’t have to search app to app any more. With Search Contracts, you launch search from a single place across all apps.
Apps that browse or create dynamic content, then such apps will benefit from implementing search contracts.
Search is probably not useful for games/utility apps.
Picker contract allows other apps to choose content (pictures, documents, media etc) from you app. If I wanted to change user tile, I can choose a picture from my desktop or any of the apps that have implemented the Picker Contract. Note the apps: Socialite, Photo Feedr, Shutter Web and Skydrive have implemented the Picker Contract.
I just grabbed a picture of mine from Socialite app.
Implement a picker contract, if your app:
- accesses or stores files that would be useful to other apps
- keeps data in a service (cloud, social network)
In summary, contracts enable apps to power Windows 8 experience. You need to implement the right contract for your app. Avoid creating redundant services that is already available in Contracts.
HTML5 is on equal footing as XAML.
All WinRT APIs that take more than 50 ms now support Async.
Note use of async below:
1: async private void Photos_Tapped(object sender, Windows.UI.Xaml.Input.TappedEventArgs e)
3: var picker = new Windows.Storage.Pickers.FileOpenPicker();
6: var file = await picker.PickSingleFileAsync();
8: var image = new BitmapImage();
9: image.SetSource(await file.OpenAsync(FileAccessMode.Read));
10: Photo.Source = image;
Use the appmanifest file to enable capabilities:
When you run the app, you will be prompted as seen below:
Below are the list of controls available for building Metro style apps. You can control and customize these controls by applying style sheets. These can be used in HTML5 as well as XAML.
When you are ready, you can upload your application to the Windows Stores which will be launched most likely in Feb 2012.
Until the Store is ready, you can build the package locally.
The folder below shows the local package:
The appx file (which is actually a zip file) is the installer for the application. There is no separate installer program required. All apps must now be digitally signed which is the .cer file.