Difference between Windows.Storage.ApplicationData.current and WinJS.Application.local
-
Thursday, May 03, 2012 12:41 PM
Hello everybody,
what difference is there between Windows.Storage.ApplicationData.current and WinJS.Application.local? Both provide access to the app's local storage, don't they?
Also, is there a WinJS.Application.sessionState equivalent in C#/VB/C++? That is, a fast in-memory data structure? What about indexedDB? Is there something similiar in C#/VB/C++?
Thanks!
Best Regards
--Oliver.
All Replies
-
Thursday, May 03, 2012 12:50 PMModerator
You have the option of storing local, roaming or temp data for your application. See this:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465109.aspx
Windows.Storage.ApplicationData.current is the application package storage (the application you deploy and it's resources) which is different from your app data you would store and access when running. http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.current.asp
WinJS.Application.local is the same as localfolder: http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.localfolder.aspx
See the example at the end of the previous document to see both being used.
-Jeff
Jeff Sanders (MSFT)
- Proposed As Answer by Jeff SandersMicrosoft Employee, Moderator Thursday, May 03, 2012 12:50 PM
- Marked As Answer by oarafat Friday, May 04, 2012 6:56 AM
-
Thursday, May 03, 2012 2:52 PM
Thanks Jeff!
So that means besides local/roaming/temporary data storage there is no session state or indexedDB in C#/VB/C++ (like in JS) ?
Also, when suspending a C#/VB/C++ app, variables and data structures are automatically saved, aren't they? Whereas in JS I have to manually store them in sessionState in case of an suspend event? Is this correct?
-
Thursday, May 03, 2012 3:43 PMModerator
You are welcome!
Briefly, you need to handle the application state in those other languages. See this information: http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx for a good overview of this.
For specific questions about those languages you would be best served asking questions in those forums.
IndexedDb is an HTML/JavaScript paradigm. If you need similar storage there are a couple of different options (of course you can use JSON and local storage. Again, please direct your other questions to those other language forums for more information.
-Jeff
Jeff Sanders (MSFT)
- Proposed As Answer by Jeff SandersMicrosoft Employee, Moderator Thursday, May 03, 2012 3:44 PM
- Marked As Answer by oarafat Friday, May 04, 2012 6:56 AM


