Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

The story of state: AppData, settings, and the process lifecycle

Download

Right click “Save as…”

Slides (view online)
+ My Schedule- My Schedule
Windows Store apps are intended to be stateful, meaning that the user receives them with meaningful content already in place, even on first launch, across sessions, and across devices. Taking the point of view of the state itself, this session explores where that state lives, the different ways it's created and modified, and how it fulfills its purpose of supporting stateful apps.
For more information, check out this course on Microsoft Virtual Academy:

Follow the Discussion

  • SempfSempf Bill Sempf

    There aren't many people on the planet who understand the underpinnings of WinJS better than Kraig. Very informative talk.

  • AlexAlex

    How does the state managed across app updates/deletes/reinstalls? What stays and what is deleted?

  • Great session Kraig. State a great thread that brings together different API's and considerations. Enjoyed it.

  • Good question, Alex. Local and roaming app state is preserved across app updates. As I discuss in the talk, if you change the version number of the app data (as opposed to the version of the app), you use Windows.Storage.ApplicationData.SetVersionAsync to indicate that. The version applies to local/temp/roaming state as a whole.

    If you uninstall the app, local and temp state is wholly deleted (the folders in appdata for your package are deleted). Roaming state will remain in the cloud for "a reasonable time" so it's still there if you reinstall the app. The time is something like a month, but there's no particular guarantee of the timeframe. But it will be there. This is to accommodate cases where you uninstall the app from a device and then reinstall or install on another device (e.g. you buy a new device, you clean off and sell your other one, then set up the new one).

    Do note that if your roaming state is greater than the quota such that it *hasn't* been roamed, then it gets deleted along with everything else and there won't be present in the cloud.

    .Kraig

  • RohitRohit

    This has to be by far the best session.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.