Reputation: 1294
I am looking after guidelines / best practices / patterns on how to manage application and view state in Win 10 – UWP. I am looking specifically how to address the following scenarios:
I remember that in Windows Phone 7.5 there were some very clear rules on how to deal with these scenarios. Since Windows 8.1 and Windows Phone 8.1 I felt that things became a little bit murkier. I am transitioning to Win 10 UWP and I would like to get onto a more rigorous footing regarding how to address these scenarios.
For some reasons this subject is not well covered. Even for Win 8.1, resources that cover app and page life cycle only scratch the surface when it comes to state management. The fact that pages have since Win 8 / Win Phone 8.1 the NavigationCacheMode attribute offers more flexibility but probably complicates the matter of defining clear and simple patterns in this area. VS 2013 does generate a SuspensionManager class in some of the project templates but I heard people considering that deficient and writing their own. If anyone has experience with that I would be interested into hearing details about what aspects of the auto-generated SuspensionManager are not satisfactory and how a good one would look like. For Win 10 / UWP resources on the subject are even harder to find.
Any links, articles, books or any other resources on the subject would be appreciated.
Upvotes: 0
Views: 1406
Reputation: 4815
I've found that by reusing the SuspensionManager class from the Windows 8.1 templates that it supports everything I need for managing state.
I wrote about it here: http://blog.falafel.com/windows-10-development-maintaining-application-state/
as part of an ongoing series on windows 10 development. if you're looking for a quick and simple solution for state management this might just do the trick (tho I definitely recommend you check out Template 10 as well)
I hope this is helfpul!
Upvotes: 1