O'Reilly logo

Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® by Robert Fonseca-Ensor, Karli Watson, Nick Lecrenski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

USING MVVM FRAMEWORKS

One of the benefits of using an MVVM architecture is that a lot of your code is more reusable, enabling you to build more features faster. Sometimes, you end up reusing the same framework code (for example, the ButtonCommandHelper and DelegateCommand classes you saw earlier in this chapter) across completely different projects. Other developers have noticed this, too, and some have gone as far as extracting the reusable bits of code into a formal framework.

It's a good idea to use an existing third-party MVVM framework for any big projects because the implementations have been thoroughly tested and cover more ground than the samples you've seen in this chapter. For example, a fully featured implementation of ButtonCommandHelper would also disable the associated button whenever the command was not executable, and it would allow you to pass parameters from data bindings into the command. There' s nothing stopping you from adding this functionality to your own classes; it's simply easier to use other people' s work.

image NOTE All the current MVVM frameworks are open source, donated to the world by their original developers, so you should be able to just download the latest assemblies from the Internet and use them directly. Although you shouldn't ever have to pay for these open source frameworks, it's always worth remembering to read the license in case the terms ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required