Conclusion

patterns & practices Developer Center

On this page: Download:
Questions | More Information Download code samples
Download book as PDF

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.

Questions

  1. Which of the following are good reasons to use the MVVM pattern for your Windows Phone application?
    1. It improves the testability of your application.
    2. It facilitates porting of the application to another platform, such as the desktop.
    3. It helps to make it possible for designers and developers to work in parallel.
    4. It may help you avoid risky changes to existing model classes.
  2. Which of the following are good reasons not to use the MVVM pattern for your Windows Phone application?
    1. You have a very tight deadline to release the application.
    2. Your application is relatively simple with only two screens and no complex logic to implement.
    3. Windows Phone controls are not ideally suited to the MVVM pattern.
    4. It's unlikely that your application will be used for more than six months before it is completely replaced.
  3. Which of the following are correct about tombstoning?
    1. Tombstoned applications have been terminated.
    2. Tombstoned applications remain intact in memory.
    3. Information about a tombstoned application's navigation state and state dictionaries are preserved for when the application is relaunched.
    4. A device will maintain tombstoning information for up to five applications at once.
  4. Which of the following describe the role of the view model locator?
    1. The view model locator configures bindings in the MVVM pattern.
    2. In the Tailspin mobile client, the view model locator is responsible for instantiating view-model objects.
    3. The view model locator connects views to view models.
    4. Data template relations offer an alternative approach to a view model locator.
  5. Where does the Back button take you?
    1. To the previous view in the navigation stack.
    2. It depends on what the code in the view model does.
    3. If the current view is the last one in the navigation stack, you leave the application.
    4. If your application is on the top of the phone's application stack, it takes you back to your application.
  6. Why should you not use code-behind when you're using the MVVM pattern?
    1. The view model locator always intercepts the events, so code-behind code never executes.
    2. The MVVM pattern enforces a separation of responsibilities between the view and the view model. UI logic belongs in the view model.
    3. 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.
    4. Code-behind has a negative effect on view performance.

More Information

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: https://msdn.microsoft.com/en-us/library/gg490786.aspx.

Next Topic | Previous Topic | Home

Last built: May 25, 2012