SlideShare ist ein Scribd-Unternehmen logo
1 von 69
Developing on Windows 8




       Power point template by
          Colin Eberhardt
Agenda

WinRT Platform Basics

Best practices

Pickers

Contracts

Tiles

Notifications

Process Lifetime Management
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
Projections
Collections
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();
APIs
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
Dependency Object



Contains property bag for
DependencyProperties on object

Holds attached Dependency Properties

DataContext aware
Dependency Properties



A bindable property that can hold binding
expressions

Registered on a DependencyObject

Callback when data changes
Attached Dependency Properties




Cross cutting properties

Extend other dependency objects with
properties they don‟t have
DataContext


Hierarchical
 Children uses parents datacontext unless
 explicitly changing it

     Set DataContext = “Hello World”

       DataContext = “Hello World”

    Set DataContext = “Something else”

     DataContext = “Something else”

       DataContext = “Hello World”
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
Active View

INotifyPropertyChanging / INotifyPropertyChanged

INotifyCollectionChanged – ObservableCollection<>
ValueConverter




Simple interface; IValueConverter
 Convert
 ConvertBack


Converts values during databinding
TypeConverter




Converts data from XAML to CLR types and back

XAML will always give string

Can be defined on a DependencyProperty or on an object
with attributes pointing to the converter
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,       Optional “peek”          Local or cloud
max size 150 KB         animation                updates
Notification Queuing
Secondary Tiles
Process Lifetime Management



System manages application lifetime

One foreground full screen window

Apps are quickly suspended to preserve
battery life
Suspend


System resources focused on the app that
the user is interacting with in the foreground

Inactive apps have no impact on battery life
or responsiveness, they are suspended by
the OS

Enables instant switching between apps
Suspend details

Suspended apps are not scheduled by the NT Kernel

No CPU, Disk or Network consumed

All threads are suspended

Apps remain in memory

Kernel ensures apps are not suspended in critical sections that could
cause system wide deadlocks

Apps instantly resumed from suspend
when brought to foreground
Session State


SuspensionManager
 SessionState
   Property bag that is automatically serialized and saved when suspended
   Reloads property bag from disk on activation
   Does not reload state if app crashed



Only save and restore user session metadata

Tip: Don‟t wait till suspension to put data into SessionState
Session State : Best practices

   User using app          Launch



     Save incrementally   Restore session

     App switch           Resuming



     Save navigation        Do nothing
Termination

User explicitly closes the app: soft termination
System needs more memory
User switch occurs
System shutdown
Apps crash


           Apps does not get notified when
             they are getting terminated
Process State Transitions



  User                       suspending
              Running                      Suspended      Low Memory      Terminated
Launches
                App             resuming
                                              App                            App
  App




 Splash
                    Code gets to run       No code runs         App not running
 screen
Splash screen

System provides splash screen mechanism

Shown while Windows launches your app

Presented during activation

Developer provides color and image in app manifest

Apps need to present a window within 15 seconds of activation or the
app will be terminated
Background Audio Playback


Apps can play audio in the background

Developers must specify background audio in the app
manifest

Each audio stream is given a type (communication, media,
game)

Onle one audio stream type may play at a given time
Upload/Download in the background




Use the BackgroundTransfer API to upload or download
data over HTTP in the background

Initiate upload / download from the foreground and it can
continue though your app is suspended
Background tasks

Trigger / Condition based
  System events
    InternetAvailable
    NetworkStateChange
    OnlineIdConnectedStateChange
    SmsReceived
    TimeZoneChange
  Background tasks for lock screen capable apps
    Control Channel
    Timer
    Push Notifications
  System events for lock screen-capable apps
    UserPresent
    UserAway
    ControlChannelReset
    SessionConnected
    LockScreenApplicationAdded
    LockScreenApplicationRemoved
Background tasks : resources




                      CPU resource quota   Refresh period


  Lock screen app


Non-lock screen app
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
Data



Isolated Storage is the key
 http://metrostoragehelper.codeplex.com


Database
 SQL Lite
   http://timheuer.com/blog/archive/2012/05/20/using-sqlite-in-metro-style-app.aspx
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


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
Windows 8 BootCamp

Weitere ähnliche Inhalte

Was ist angesagt?

eRCP Overview and Update '06
eRCP Overview  and Update '06eRCP Overview  and Update '06
eRCP Overview and Update '06Gorkem Ercan
 
Android Fundamentals
Android FundamentalsAndroid Fundamentals
Android FundamentalsHenry Osborne
 
Quality Assurance with Manual Testing
Quality Assurance with Manual TestingQuality Assurance with Manual Testing
Quality Assurance with Manual TestingEdureka!
 
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
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Wcl303 russinovich
Wcl303 russinovichWcl303 russinovich
Wcl303 russinovichconleyc
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guidebigspire
 
Android tutorial (2)
Android tutorial (2)Android tutorial (2)
Android tutorial (2)Kumar
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introductionsnevesbarros
 
Windows phone 8 session 10
Windows phone 8 session 10Windows phone 8 session 10
Windows phone 8 session 10hitesh chothani
 
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.Richard Langlois P. Eng.
 
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentationAWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentationServerless User Group Poland
 

Was ist angesagt? (20)

Sencha Touch MVC
Sencha Touch MVCSencha Touch MVC
Sencha Touch MVC
 
eRCP Overview and Update '06
eRCP Overview  and Update '06eRCP Overview  and Update '06
eRCP Overview and Update '06
 
Android Fundamentals
Android FundamentalsAndroid Fundamentals
Android Fundamentals
 
Meteor
MeteorMeteor
Meteor
 
Quality Assurance with Manual Testing
Quality Assurance with Manual TestingQuality Assurance with Manual Testing
Quality Assurance with Manual Testing
 
#Fame case study
#Fame case study#Fame case study
#Fame case study
 
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]
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Wcl303 russinovich
Wcl303 russinovichWcl303 russinovich
Wcl303 russinovich
 
Active x
Active xActive x
Active x
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guide
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
Android tutorial (2)
Android tutorial (2)Android tutorial (2)
Android tutorial (2)
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
 
Windows phone 8 session 10
Windows phone 8 session 10Windows phone 8 session 10
Windows phone 8 session 10
 
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.
 
code-camp-meteor
code-camp-meteorcode-camp-meteor
code-camp-meteor
 
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentationAWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
AWS UG Warsaw & Serverless warsztatowo! 19.09.2019 | Hillel Solow's presentation
 
Build apps for Apple Watch
Build apps for Apple WatchBuild apps for Apple Watch
Build apps for Apple Watch
 

Andere mochten auch

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
 
It's Primetime: A Javascript Story
It's Primetime: A Javascript StoryIt's Primetime: A Javascript Story
It's Primetime: A Javascript StoryEinar Ingebrigtsen
 
Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01Mariz Encabo
 
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
 

Andere mochten auch (17)

Genealogylecture2012
Genealogylecture2012Genealogylecture2012
Genealogylecture2012
 
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
 
It's Primetime: A Javascript Story
It's Primetime: A Javascript StoryIt's Primetime: A Javascript Story
It's Primetime: A Javascript Story
 
Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01Pptsummativeassessment 130217030359-phpapp01
Pptsummativeassessment 130217030359-phpapp01
 
Developing on Windows 8
Developing on Windows 8Developing on Windows 8
Developing on Windows 8
 
Genealogylecture2012
Genealogylecture2012Genealogylecture2012
Genealogylecture2012
 
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...
 
An Agile Journey
An Agile JourneyAn Agile Journey
An Agile Journey
 
Lets focus on business value
Lets focus on business valueLets focus on business value
Lets focus on business value
 
해맑은 어린이집 상담자료
해맑은 어린이집 상담자료해맑은 어린이집 상담자료
해맑은 어린이집 상담자료
 
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
 

Ähnlich wie Windows 8 BootCamp

3 App Compat Win7
3 App Compat Win73 App Compat Win7
3 App Compat Win7llangit
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightFrank La Vigne
 
Developing Interactive Applications Using Windows Live Robots, Activities, an...
Developing Interactive Applications Using Windows Live Robots, Activities, an...Developing Interactive Applications Using Windows Live Robots, Activities, an...
Developing Interactive Applications Using Windows Live Robots, Activities, an...goodfriday
 
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
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-upDerek Lakin
 
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewWindows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewSascha Corti
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Decksschwarzhoff
 
Sequence Like a Boss - BriForum 2015 Denver
Sequence Like a Boss - BriForum 2015 DenverSequence Like a Boss - BriForum 2015 Denver
Sequence Like a Boss - BriForum 2015 DenverRyanWillDotcom
 
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overviewcodeblock
 
Windows 8 programming with html and java script
Windows 8 programming with html and java scriptWindows 8 programming with html and java script
Windows 8 programming with html and java scriptRTigger
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARSNAVER D2
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsPeter Gfader
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developersjoycsc
 
Android overview
Android overviewAndroid overview
Android overviewHas Taiar
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0Jasmine Conseil
 

Ähnlich wie Windows 8 BootCamp (20)

3 App Compat Win7
3 App Compat Win73 App Compat Win7
3 App Compat Win7
 
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"  Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
 
Developing Interactive Applications Using Windows Live Robots, Activities, an...
Developing Interactive Applications Using Windows Live Robots, Activities, an...Developing Interactive Applications Using Windows Live Robots, Activities, an...
Developing Interactive Applications Using Windows Live Robots, Activities, an...
 
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
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-up
 
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewWindows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's New
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
 
Sequence Like a Boss - BriForum 2015 Denver
Sequence Like a Boss - BriForum 2015 DenverSequence Like a Boss - BriForum 2015 Denver
Sequence Like a Boss - BriForum 2015 Denver
 
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overview
 
Windows 8 programming with html and java script
Windows 8 programming with html and java scriptWindows 8 programming with html and java script
Windows 8 programming with html and java script
 
Android
AndroidAndroid
Android
 
Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows Forms
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developers
 
.NET presentation
.NET presentation.NET presentation
.NET presentation
 
Android overview
Android overviewAndroid overview
Android overview
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 

Kürzlich hochgeladen

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Windows 8 BootCamp

  • 1.
  • 2. Developing on Windows 8 Power point template by Colin Eberhardt
  • 3. Agenda WinRT Platform Basics Best practices Pickers Contracts Tiles Notifications Process Lifetime Management
  • 4. Who am I Einar Ingebrigtsen @einari einar@dolittle.com http://blog.dolittle.com http://www.ingebrigtsen.info
  • 11. 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();
  • 12. APIs
  • 13. Missing things Reflection API changed Type details through GetTypeInfo() – extension method Emit namespace practically empty - security
  • 14. 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)
  • 15. Tools
  • 16. Dependency Object Contains property bag for DependencyProperties on object Holds attached Dependency Properties DataContext aware
  • 17. Dependency Properties A bindable property that can hold binding expressions Registered on a DependencyObject Callback when data changes
  • 18. Attached Dependency Properties Cross cutting properties Extend other dependency objects with properties they don‟t have
  • 19. DataContext Hierarchical Children uses parents datacontext unless explicitly changing it Set DataContext = “Hello World” DataContext = “Hello World” Set DataContext = “Something else” DataContext = “Something else” DataContext = “Hello World”
  • 20. Binding Source Defaults to DataContext Can use StaticResource as source Mode OneWay, TwoWay, OneTime – OneWay default Validation ValidatesOnException ValidatesOnNotifyDataErrors INotifyDataErrorInfo
  • 21. Binding StringFormat StringFormat = „MMM.dd.yyyy‟ Null and Fallback values TargetNullValue=„(None)‟ FallbackValue=„(Data Context Not Set)‟ IValueConverter
  • 22. Element to Element Can bind directly to other elements properties Binds by name of element
  • 23. Active View INotifyPropertyChanging / INotifyPropertyChanged INotifyCollectionChanged – ObservableCollection<>
  • 24. ValueConverter Simple interface; IValueConverter Convert ConvertBack Converts values during databinding
  • 25. TypeConverter Converts data from XAML to CLR types and back XAML will always give string Can be defined on a DependencyProperty or on an object with attributes pointing to the converter
  • 26. Events You still have events as before – buttons can be clicked and raise an event RoutedEvents – bubbles through the UI
  • 27. Async var data = DownloadData(...); ProcessData(data); STOP DownloadData ProcessData var future = DownloadDataAsync(...); future.ContinueWith(data => ProcessData(data)); DownloadDataAsync ProcessData
  • 28. Async Models Windows Runtime : IAsyncOperation<T> .NET Framework : Task<T> C# 5.0 – async / await
  • 29. 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
  • 30. Patterns & Practices MVVM Inspired by PresentationModel by Martin Fowler Good for decoupling – promotes testability Compositioning Commands Actions / Triggers / Behaviors
  • 31. MVVM Model View Observes ViewModel Observable
  • 32. Compositional UIs Navigation Header Main Content Footer
  • 33. Event Aggregator ViewModel 1 ViewModel 2 Aggregator
  • 34.
  • 35. 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
  • 36. Live Tiles Tiles updates using Templates provide Text-only image-only pre-defined templates rich rendering options or combination JPEG or PNG only, Optional “peek” Local or cloud max size 150 KB animation updates
  • 39.
  • 40. Process Lifetime Management System manages application lifetime One foreground full screen window Apps are quickly suspended to preserve battery life
  • 41. Suspend System resources focused on the app that the user is interacting with in the foreground Inactive apps have no impact on battery life or responsiveness, they are suspended by the OS Enables instant switching between apps
  • 42. Suspend details Suspended apps are not scheduled by the NT Kernel No CPU, Disk or Network consumed All threads are suspended Apps remain in memory Kernel ensures apps are not suspended in critical sections that could cause system wide deadlocks Apps instantly resumed from suspend when brought to foreground
  • 43. Session State SuspensionManager SessionState Property bag that is automatically serialized and saved when suspended Reloads property bag from disk on activation Does not reload state if app crashed Only save and restore user session metadata Tip: Don‟t wait till suspension to put data into SessionState
  • 44. Session State : Best practices User using app Launch Save incrementally Restore session App switch Resuming Save navigation Do nothing
  • 45. Termination User explicitly closes the app: soft termination System needs more memory User switch occurs System shutdown Apps crash Apps does not get notified when they are getting terminated
  • 46. Process State Transitions User suspending Running Suspended Low Memory Terminated Launches App resuming App App App Splash Code gets to run No code runs App not running screen
  • 47. Splash screen System provides splash screen mechanism Shown while Windows launches your app Presented during activation Developer provides color and image in app manifest Apps need to present a window within 15 seconds of activation or the app will be terminated
  • 48. Background Audio Playback Apps can play audio in the background Developers must specify background audio in the app manifest Each audio stream is given a type (communication, media, game) Onle one audio stream type may play at a given time
  • 49. Upload/Download in the background Use the BackgroundTransfer API to upload or download data over HTTP in the background Initiate upload / download from the foreground and it can continue though your app is suspended
  • 50. Background tasks Trigger / Condition based System events InternetAvailable NetworkStateChange OnlineIdConnectedStateChange SmsReceived TimeZoneChange Background tasks for lock screen capable apps Control Channel Timer Push Notifications System events for lock screen-capable apps UserPresent UserAway ControlChannelReset SessionConnected LockScreenApplicationAdded LockScreenApplicationRemoved
  • 51. Background tasks : resources CPU resource quota Refresh period Lock screen app Non-lock screen app
  • 52.
  • 53. 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
  • 54. Push Notification Overview 1. Request Channel URI 2. Register with your Cloud Service 3. Authenticate & Push Notification
  • 55. 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
  • 56. Toast Templates Uses same template architecture as Live Tiles Rich set of rendering options available
  • 57.
  • 58. Contracts Contracts enable integrating the Windows 8 experience into your app Yields a consistent UI for all apps
  • 59. Search Enables your app to interact and respond to Suggestions Search Query
  • 60. Settings Consistently given one place to get search Context sensitive to the front facing app
  • 61. 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
  • 62. Play To Ability to stream media to compatible devices
  • 63.
  • 64. Data Isolated Storage is the key http://metrostoragehelper.codeplex.com Database SQL Lite http://timheuer.com/blog/archive/2012/05/20/using-sqlite-in-metro-style-app.aspx
  • 65. 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
  • 66. Resources The samples of today http://github.com/einari/toodeloo INPC Weaver http://github.com/SimonCropp/NotifyPropertyWeaver WinRT Toolkit http://jupitertoolkit.codeplex.com Tiny IoC container - WinRT Compatible http://microsliver.codeplex.com/
  • 67. 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/
  • 68. Thanks for your attention

Hinweis der Redaktion

  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…)
  4. 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…)
  5. = “tombstoning” in Windows phone (read http://msdn.microsoft.com/en-us/library/ff817008(v=vs.92).aspx for the execution model in WP)This also visible with SysInternals Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) where you see the same “Suspended” in the CPU column. It was possible to “suspend” a process in Windows 7 with Process Explorer: this is now done by Windows itself for Metro Apps.NOTE: Process Explorer is fully aware of Metro Apps = “Immersive” has new blue color. See Options | Configure Colors | Immersive Process + see package in tooltipWhen you right-click | Resume on a Suspended Metro App, it gets back automatically Suspending immediately by Windows
  6. The user can still decide to explicitly “close”/”end” an App by using ALT+F4 or the following touch gesture = “drag the top of the App and drag it down to the bottom of the screen”: in that case, the App gets the suspend notification after 5 secondsThe system is also allowed to “terminate” the apps.. [users can do it too via task manager or Process Explorer]There is no event fired during termination… you should save all your stuff by “suspending” or even better, along the user navigation in the AppDEMO: use Testlimit64 –d 1024 to consume as much memory (working set) as possible and see that first the Metro App working set are trimmed and then some Apps get terminated (download the tool from http://technet.microsoft.com/en-us/sysinternals/bb963901.aspx)Watch http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL405 for Mark Russinovich talk about Windows memory management + demos of Testlimit
  7. Splashscreen and background colors are set in the App manifest.It’s used by Windows to display the first screen before the App code starts to runSame during activation through Contracts
  8. Splashscreen and background colors are set in the App manifest.It’s used by Windows to display the first screen before the App code starts to runSame during activation through Contracts
  9. Ex: update cache on a regular basis such as for weekly TV programs
  10. You can control when the background task runs, even after it is triggered, by adding a condition. Once triggered, a background task will not run until all of its conditions are met. The following conditions (represented by the SystemConditionType enumeration) can be used.For instance : InternetAvailable, InternetNotAvailable,SessionConnected, SessionDisconnected, UserNotPresent, UserPresentControl Channel : Background Tasks can keep a connection alive– ControlChannelTriggerTimer : Background tasks can run as frequently as every 15 minutesPush Notification : Background tasks respond to PushNotificationTrigger to receive raw push notifications
  11. Resources for background tasks are throttled to make sure the background task is not consuming too much battery (both CPU time and network bandwidth)The throtting is tough for us (humans) to measure because it is CPU time.. When CPU is idle (e.g. making a network call) that does not count against you.. The way the metering happens is that you are allowed a quota within a period and as long as you do not exceed it, you are OK.. Once you exceed it, the system flat out ignores the triggers until the right amount of time has passed  so you can’t assume that you’ll be timely called if you exceed your limit-- Network resource constraints are a function of the amount of energy used by the network interface, which is modeled as the amount of time the network is used to transfer bytes (for download or upload); it is not based on any throughput metrics. The throughput and energy usage of a network interface varies based on factors like link capacity, physical position of the device, or the current load on the WiFi network. WiFi networks typically have lower energy consumption per byte sent and received when compared to cellular mobile networks.