9. Bridging the gap
FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add("*")a;
StorageFile file = await picker.PickSingleFileAsync();
Windows.Storage.Streams.IInputStream inputStream =
await file.OpenReadAsync();
System.IO.Stream stream = inputStream.AsStreamForRead();
System.IO.StreamReader reader = new StreamReader(stream);
string contents = reader.ReadToEnd();
10. Missing things
Reflection API changed
Type details through GetTypeInfo() – extension
method
Emit namespace practically empty - security
11. XAML
Originally developed for Windows Vista and
exposed as WPF
Defines what you see
Layout is by default not flowing, as in HTML
Can observe changes (Active View)
19. Async – C# style
Marked with “async” modifier
Must return void or Task<T>
Use “await” operator to cooperatively yield
control – remember to mark with “async”
Feels just like good old synchronous code
20. Patterns & Practices
MVVM
Inspired by PresentationModel by Martin Fowler
Good for decoupling – promotes testability
Compositioning
Commands
Actions / Triggers / Behaviors
24. Tiles
Tap on tile to launch or switch to an app
Static default tile specified in app manifest
Two sizes:
Both sizes can have live updates
25. Live Tiles
Tiles updates using Templates provide Text-only image-only
pre-defined templates rich rendering options or combination
JPEG or PNG
only, max size 150 Optional “peek” Local or cloud
KB animation updates
28. Windows Notification Service
Enables delivery of tile and toast notification over the
internet
Tile updates and notifications shown to the user even if
your app is not running
WNS handles communication with your app
Scales to millions of users
WNS is a free service for your app to use
29. Push Notification Overview
1. Request Channel URI
2. Register with your Cloud Service
3. Authenticate & Push Notification
30. Toast Notifications
Toast notifications deliver transient messages outside the context of the
app
Use toast notifications to get user‟s attention immediately
User is in control and can permanently turn off toast notifications from
your app
Allows quick navigation to a contextually relevant location in your app
Toast notifications are easy to invoke from your app or from the cloud
31. Toast Templates
Uses same template architecture as Live Tiles
Rich set of rendering options available
35. Share
Your app can share anything (text, images, binaries)
Automatically filters available applications to share to
Your app can be a share target – receive sharing from others
Add sharing target as a capability and you can receive share requests
38. Summarized
Windows RT is a huge leap, both in faith but also technically
Consistent API that feels mature from day one
Well architected solutions putting the user first
Makes us as developers focus on adding the business value
39. Resources
The samples of today
http://github.com/einari/toodeloo
Yggdrasil – IoC Container
http://github.com/dolittlestudios/yggdrasil
https://nuget.org/packages/Yggdrasil
INPC Weaver
http://github.com/SimonCropp/NotifyPropertyWeaver
WinRT Toolkit
http://jupitertoolkit.codeplex.com
Tiny IoC container - WinRT Compatible
http://microsliver.codeplex.com/
40. Resources
MVVM Light
http://mvvmlight.codeplex.com/
Setting up push notifications – registering your app
https://manage.dev.live.com/build
WAT for Windows 8 + WnsRecipe
http://watwindows8.codeplex.com/releases/view/73334
Calisto – UI Framework for WinRT
https://github.com/timheuer/callisto
Get into the store – register as a deveveloper
http://msdn.microsoft.com/en-us/windows/apps/
Metro App = one foreground full screen window that allows the user to work more efficientlyThe other Metro Apps are quickly suspended to preserve battery lifeAs a developer, you have to know how Windows manages your App lifetime and how to be a good citizenApps are suspended 5 seconds after leaving foreground.However, you get 10 seconds instead when you switch from one App to another.You can check it if you launch an App in Snap view and keep the Task Manager in the Filled view (I’m not able to find a workflow that ends up to the 5 seconds…)
Metro App = one foreground full screen window that allows the user to work more efficientlyThe other Metro Apps are quickly suspended to preserve battery lifeAs a developer, you have to know how Windows manages your App lifetime and how to be a good citizenApps are suspended 5 seconds after leaving foreground.However, you get 10 seconds instead when you switch from one App to another.You can check it if you launch an App in Snap view and keep the Task Manager in the Filled view (I’m not able to find a workflow that ends up to the 5 seconds…)