SlideShare une entreprise Scribd logo
1  sur  42
Developing on Windows 8




       Power point template by
          Colin Eberhardt
Agenda

WinRT Platform Basics

Best practices

Pickers

Contracts

Tiles

Notifications
Who am I




                           Einar Ingebrigtsen




       @einari           einar@dolittle.com




                        http://blog.dolittle.com
                 http://www.ingebrigtsen.info
The target
Old school interop
Windows RT style
Architecture
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();
Missing things




Reflection API changed
 Type details through GetTypeInfo() – extension
 method
 Emit namespace practically empty - security
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)
Tools
Binding

Source
 Defaults to DataContext
 Can use StaticResource as source


Mode
 OneWay, TwoWay, OneTime – OneWay default


Validation
 ValidatesOnException
 ValidatesOnNotifyDataErrors
   INotifyDataErrorInfo
Binding


StringFormat
 StringFormat = „MMM.dd.yyyy‟


Null and Fallback values
 TargetNullValue=„(None)‟
 FallbackValue=„(Data Context Not Set)‟


IValueConverter
Element to Element




Can bind directly to other elements
properties

Binds by name of element
Events



You still have events as before – buttons can
be clicked and raise an event

RoutedEvents – bubbles through the UI
Async

var data = DownloadData(...);
ProcessData(data);
                       STOP



       DownloadData             ProcessData




var future = DownloadDataAsync(...);
future.ContinueWith(data => ProcessData(data));



       DownloadDataAsync        ProcessData
Async Models



Windows Runtime : IAsyncOperation<T>

.NET Framework : Task<T>

C# 5.0 – async / await
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
Patterns & Practices

MVVM
 Inspired by PresentationModel by Martin Fowler
 Good for decoupling – promotes testability


Compositioning

Commands

Actions / Triggers / Behaviors
MVVM



                     Model



              View
   Observes



                 ViewModel   Observable
Compositional UIs



     Navigation   Header




                  Main Content



                  Footer
Event Aggregator



ViewModel 1                ViewModel 2




              Aggregator
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
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
Notification Queuing
Secondary Tiles
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
Push Notification Overview
                    1.   Request Channel URI

                    2.   Register with your Cloud Service

                    3.   Authenticate & Push Notification
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
Toast Templates

Uses same template architecture as Live Tiles

Rich set of rendering options available
Contracts




Contracts enable integrating the Windows 8
         experience into your app

    Yields a consistent UI for all apps
Search




Enables your app to interact and respond to
 Suggestions
 Search Query
Settings




Consistently given one place to get search
 Context sensitive to the front facing app
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
Play To




Ability to stream media to compatible devices
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
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/
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/
Thanks for your
   attention
Developing on Windows 8

Contenu connexe

Tendances

Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginDavid Douglas
 
Android architecture
Android architecture Android architecture
Android architecture Trong-An Bui
 
Developing Microsoft .NET Applications for Windows
Developing Microsoft .NET Applications for Windows Developing Microsoft .NET Applications for Windows
Developing Microsoft .NET Applications for Windows Rishi Kothari
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
Android overview
Android overviewAndroid overview
Android overviewHas Taiar
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]Sittiphol Phanvilai
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Massimo Bonanni
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 

Tendances (11)

Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 plugin
 
Android architecture
Android architecture Android architecture
Android architecture
 
Meteor.js for DOers
Meteor.js for DOersMeteor.js for DOers
Meteor.js for DOers
 
Developing Microsoft .NET Applications for Windows
Developing Microsoft .NET Applications for Windows Developing Microsoft .NET Applications for Windows
Developing Microsoft .NET Applications for Windows
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Android overview
Android overviewAndroid overview
Android overview
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 

En vedette

Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeEinar Ingebrigtsen
 
SME Breakfast Seminar - Keynote Session - The Data Landscape
SME Breakfast Seminar - Keynote Session - The Data LandscapeSME Breakfast Seminar - Keynote Session - The Data Landscape
SME Breakfast Seminar - Keynote Session - The Data LandscapeNathean Technologies
 
Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01Mariz Encabo
 
It's Primetime: A Javascript Story
It's Primetime: A Javascript StoryIt's Primetime: A Javascript Story
It's Primetime: A Javascript StoryEinar Ingebrigtsen
 
Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...
Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...
Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...Rae Jennings
 
해맑은 어린이집 상담자료
해맑은 어린이집 상담자료해맑은 어린이집 상담자료
해맑은 어린이집 상담자료정순 최
 
HCB patents catalogue
HCB patents catalogueHCB patents catalogue
HCB patents catalogueJoanna Huang
 
Windows Azure Camps - Oktober 2012
Windows Azure Camps - Oktober 2012Windows Azure Camps - Oktober 2012
Windows Azure Camps - Oktober 2012Einar Ingebrigtsen
 
Law Related ( Guidelines on the PTA )
Law Related ( Guidelines on the PTA )Law Related ( Guidelines on the PTA )
Law Related ( Guidelines on the PTA )Mariz Encabo
 
Laws related Education
Laws related EducationLaws related Education
Laws related EducationMariz Encabo
 
Theoretical perspectives in sociology
Theoretical perspectives in sociologyTheoretical perspectives in sociology
Theoretical perspectives in sociologyMariz Encabo
 

En vedette (17)

Genealogylecture2012
Genealogylecture2012Genealogylecture2012
Genealogylecture2012
 
Lets focus on business value
Lets focus on business valueLets focus on business value
Lets focus on business value
 
Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
 
SME Breakfast Seminar - Keynote Session - The Data Landscape
SME Breakfast Seminar - Keynote Session - The Data LandscapeSME Breakfast Seminar - Keynote Session - The Data Landscape
SME Breakfast Seminar - Keynote Session - The Data Landscape
 
Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01
 
An Agile Journey
An Agile JourneyAn Agile Journey
An Agile Journey
 
Windows 8 BootCamp
Windows 8 BootCampWindows 8 BootCamp
Windows 8 BootCamp
 
It's Primetime: A Javascript Story
It's Primetime: A Javascript StoryIt's Primetime: A Javascript Story
It's Primetime: A Javascript Story
 
Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...
Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...
Ausdance celebrates Australian dance at the 2014 Australian Performing Arts M...
 
Genealogylecture2012
Genealogylecture2012Genealogylecture2012
Genealogylecture2012
 
해맑은 어린이집 상담자료
해맑은 어린이집 상담자료해맑은 어린이집 상담자료
해맑은 어린이집 상담자료
 
HCB patents catalogue
HCB patents catalogueHCB patents catalogue
HCB patents catalogue
 
Genealogylecture2012
Genealogylecture2012Genealogylecture2012
Genealogylecture2012
 
Windows Azure Camps - Oktober 2012
Windows Azure Camps - Oktober 2012Windows Azure Camps - Oktober 2012
Windows Azure Camps - Oktober 2012
 
Law Related ( Guidelines on the PTA )
Law Related ( Guidelines on the PTA )Law Related ( Guidelines on the PTA )
Law Related ( Guidelines on the PTA )
 
Laws related Education
Laws related EducationLaws related Education
Laws related Education
 
Theoretical perspectives in sociology
Theoretical perspectives in sociologyTheoretical perspectives in sociology
Theoretical perspectives in sociology
 

Similaire à Developing on Windows 8

Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Decksschwarzhoff
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open SourceAxway Appcelerator
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium TutorialKevin Whinnery
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-upDerek Lakin
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 DevelopmentShahed Chowdhuri
 
3 App Compat Win7
3 App Compat Win73 App Compat Win7
3 App Compat Win7llangit
 
Building IoT Solutions using Windows IoT Core
Building IoT Solutions using Windows IoT CoreBuilding IoT Solutions using Windows IoT Core
Building IoT Solutions using Windows IoT CoreWinWire Technologies Inc
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyUna Daly
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2Shahzad
 
Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No VideoAllyWick
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
1 introduction of android
1 introduction of android1 introduction of android
1 introduction of androidakila_mano
 
Windows Store apps development
Windows Store apps developmentWindows Store apps development
Windows Store apps developmentLaurent Duveau
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developersjoycsc
 
Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8Damir Dobric
 

Similaire à Developing on Windows 8 (20)

.NET presentation
.NET presentation.NET presentation
.NET presentation
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
2. workload
2.  workload2.  workload
2. workload
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-up
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
 
3 App Compat Win7
3 App Compat Win73 App Compat Win7
3 App Compat Win7
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
Building IoT Solutions using Windows IoT Core
Building IoT Solutions using Windows IoT CoreBuilding IoT Solutions using Windows IoT Core
Building IoT Solutions using Windows IoT Core
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una Daly
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No Video
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
1 introduction of android
1 introduction of android1 introduction of android
1 introduction of android
 
Windows Store apps development
Windows Store apps developmentWindows Store apps development
Windows Store apps development
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developers
 
Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8
 

Dernier

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Developing on Windows 8

  • 1.
  • 2. Developing on Windows 8 Power point template by Colin Eberhardt
  • 3. Agenda WinRT Platform Basics Best practices Pickers Contracts Tiles Notifications
  • 4. Who am I Einar Ingebrigtsen @einari einar@dolittle.com http://blog.dolittle.com http://www.ingebrigtsen.info
  • 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)
  • 12. Tools
  • 13. Binding Source Defaults to DataContext Can use StaticResource as source Mode OneWay, TwoWay, OneTime – OneWay default Validation ValidatesOnException ValidatesOnNotifyDataErrors INotifyDataErrorInfo
  • 14. Binding StringFormat StringFormat = „MMM.dd.yyyy‟ Null and Fallback values TargetNullValue=„(None)‟ FallbackValue=„(Data Context Not Set)‟ IValueConverter
  • 15. Element to Element Can bind directly to other elements properties Binds by name of element
  • 16. Events You still have events as before – buttons can be clicked and raise an event RoutedEvents – bubbles through the UI
  • 17. Async var data = DownloadData(...); ProcessData(data); STOP DownloadData ProcessData var future = DownloadDataAsync(...); future.ContinueWith(data => ProcessData(data)); DownloadDataAsync ProcessData
  • 18. Async Models Windows Runtime : IAsyncOperation<T> .NET Framework : Task<T> C# 5.0 – async / await
  • 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
  • 21. MVVM Model View Observes ViewModel Observable
  • 22. Compositional UIs Navigation Header Main Content Footer
  • 23. Event Aggregator ViewModel 1 ViewModel 2 Aggregator
  • 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
  • 32. Contracts Contracts enable integrating the Windows 8 experience into your app Yields a consistent UI for all apps
  • 33. Search Enables your app to interact and respond to Suggestions Search Query
  • 34. Settings Consistently given one place to get search Context sensitive to the front facing app
  • 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
  • 36. Play To Ability to stream media to compatible devices
  • 37.
  • 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/
  • 41. Thanks for your attention

Notes de l'éditeur

  1. Visual Studio : Code editor w/ IntellisenseUI Designer DebuggersSimulator Platform window Blend : Code editor WYSIGYG designer Animation Better properties window SimulatorPlatform window
  2. 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…)
  3. 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…)