This chapter described how the developers at Tailspin built the UI components of the application, and how and why the MVVM pattern was implemented. The next chapter will describe how the developers at Tailspin implemented the model elements from the MVVM pattern in the mobile client application, and how the application leverages services offered by the Windows Phone platform, such as isolated storage, background agents, and location services.
- Which of the following are good reasons to use the MVVM pattern for your Windows Phone application?
- It improves the testability of your application.
- It facilitates porting of the application to another platform, such as the desktop.
- It helps to make it possible for designers and developers to work in parallel.
- It may help you avoid risky changes to existing model classes.
- Which of the following are good reasons not to use the MVVM pattern for your Windows Phone application?
- You have a very tight deadline to release the application.
- Your application is relatively simple with only two screens and no complex logic to implement.
- Windows Phone controls are not ideally suited to the MVVM pattern.
- It's unlikely that your application will be used for more than six months before it is completely replaced.
- Which of the following are correct about tombstoning?
- Tombstoned applications have been terminated.
- Tombstoned applications remain intact in memory.
- Information about a tombstoned application's navigation state and state dictionaries are preserved for when the application is relaunched.
- A device will maintain tombstoning information for up to five applications at once.
- Which of the following describe the role of the view model locator?
- The view model locator configures bindings in the MVVM pattern.
- In the Tailspin mobile client, the view model locator is responsible for instantiating view-model objects.
- The view model locator connects views to view models.
- Data template relations offer an alternative approach to a view model locator.
- Where does the Back button take you?
- To the previous view in the navigation stack.
- It depends on what the code in the view model does.
- If the current view is the last one in the navigation stack, you leave the application.
- If your application is on the top of the phone's application stack, it takes you back to your application.
- Why should you not use code-behind when you're using the MVVM pattern?
- The view model locator always intercepts the events, so code-behind code never executes.
- The MVVM pattern enforces a separation of responsibilities between the view and the view model. UI logic belongs in the view model.
- If you are using the MVVM pattern, other developers will expect to see your code in the view model classes and not in the code-behind.
- Code-behind has a negative effect on view performance.
For more information about designing a Windows Phone UI, see "Themes for Windows Phone" on MSDN.
For more information about the Pivot control, see "Pivot Control for Windows Phone" on MSDN.
For more information about navigation on the Windows Phone platform, see "Frame and Page Navigation for Windows Phone" on MSDN.
For more information about Prism and MVVM see the Prism CodePlex site and "Prism (Composite Client Application Guidance)" on MSDN.
These and all links in this book are accessible from the book's online bibliography. You can find the bibliography on MSDN at: http://msdn.microsoft.com/en-us/library/gg490786.aspx.
Last built: May 25, 2012