Chapter 10

Windows Store Application Architecture

WHAT’S IN THIS CHAPTER?

  • The importance of MVVM
  • Finding ViewModels
  • Using models in the Artist Browser example from Chapter 1
  • How commands can handle input
  • Understanding and utilizing the MVVM Frameworks

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter at www.wrox.com/remtitle.cgi?isbn=1182205707 on the Download Code tab in zip file. 205709 C10.zip.

BEST PRACTICES FOR YOUR APPS

Because the framework for building Windows Store apps is based on XAML, many existing techniques and design patterns for solving problems are also applicable on the new platform. Just as architects use different tools and techniques depending on what they’re designing, each software project may require a different design to meet the known requirements and constraints. Although there isn’t a single solution to every challenge, sometimes, best practices provide guidance to make solving the challenge easier. This chapter outlines best practices to reduce complexity and increase flexibility of your apps.

UNDERSTANDING MVVM

Model-View-ViewModel (MVVM) is a design pattern primarily used with XAML-based applications, such as Windows Presentation Foundation (WPF), Silverlight, and Windows Phone applications. It has strong similarities with Model-View-Controller (MVC) and Model-View-Presenter (MVP), but it’s designed specifically for XAML applications. It consists of three elements:

  • Model: This is the representation ...

Get Professional Windows 8 Programming: Application Development with C# and XAML now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.