Tech Ed 2011 – Architecting Windows Phone Apps with Caliburn Micro
Posted by: | Technical |
I recently gave a talk at Tech Ed 2011 New Zealand on the Caliburn Micro MVVM framework. You can view and download the presentation and download the source code.
Here are the areas I covered:
- Getting Started with Caliburn Micro
- Lifecycle Management for Apps and View Models (VMs)
- Managing the App Bar and performing Navigation
- Pivot Pages made easy
- Tombstoning with ease
- Simplifying Messaging, Launchers and Choosers
- Simplifying Async with Coroutines
- MVVM Video Player Demo
Enjoy!
I quite like the ViewModelWorker object – I really am sick of passing in so many services via constructor
I would really like for anything that inherits from Screen to automatically have access to an INavigationService and IEventAggregator (but an explicit subscription) in the future – without having to pass them via constructor. All my Screen descendant VMs use them. But I am sure that Rob has bigger things to worry about
I haven’t actually played too much with Tombstoning, but I do like the more recent model for handling it in CM. Does the phone handle the backstack on a resume? i.e. does the state of the backstack restore when an app resumes, so you can navigate back through it as required?
I was considering using some sort of Event Sourcing model for restoring navigation state for Mango as we get more control over the backstack. But if this is restored, then I clearly don’t need to worry.
thanks for the comments. I wouldn’t mess with the back stack to be honest, you’ll likely get in trouble with the certification police. The back stack is something which should feel seamless at an OS level working across apps, when you go back into the app whatever page you enter on (even when fast app switching) should be the first page in that session, so a back button press takes you out of the app.
I would generally agree, but is there a slight chance (however slight it may be) that your app is killed when you receive a call?
I imagine it would be a series of unfortunate events if it did – but is there a chance? I am not sure how MS handles which apps it picks from dehydrated mode to stop – and the effect is probably even lessened further with Mango, but I would want my app to resume from the same place with the same navigation options I had at the time, regardless of it being dehydrated or stopped.
I am dealing with less technical users, so I want to avoid confusion whereever possible