Windows Phone MVC is a MVC implementation for WP7. It supports strongly typed navigation with history, easier handling of windows phones lifecycle, multiple navigation frames and enables you to build testable, and maintainable applications for WP7.
There is quite a high compatibility and many concepts are transferrable. The main difference is Phoenix has WPF and WP7 support, and is far more mature.
This project was spawned from Columbus, another WP7 framework, which was inspired from Magellan (a WPF MVC framework). I learnt a lot from those projects, and I wanted to change some core behavior of Columbus, and so WP7 MVC was born.
MVVM can only get you so far, MVC is an awesome way to deal with navigation BETWEEN views, then MVVM can take over and provide the interaction on that view. A large effort has been made to maintain full compatibility with the out of the box feature sets.
- Strongly Typed Navigation, with objects as parameters support (Controller<HomeController>().NavigateTo(c=>c.SomeAction(StateArgument)))
- Custom Shell, Navigator and Journal to give better control over navigation of WP7 (like back stack manipulation, in NoDo! And stuff like BackTo<HomeController>(c=>c.Main());)
- TransitionFrame comes out of the box, for nice navigation animations using the Silverlight Toolkits Transitions
- FAST! I am constantly tweaking the internals to make sure all the awesomeness does not have a massive performance hit
- Ability to pass arguments in navigation, rather than uri query strings (had to mention this twice because it is so handy)
- Easy access to Obscured and Activated events on your view model
- Full Testable! All major WP7 classes (WindowsPhoneFrame, WindowsPhoneApplication etc) all have Interfaces and are wrapped to allow you to test
- Some helpers around Async. Execute.AsyncPattern or Execute.AsyncPatternWithResult synchronise async calls
- Task/Chooser support, in a testable way
- Convention based Controller and View discovery
- Autofac Support Via an Extension
- Easy access to page or application transient storage
- Simple tombstoning support
- Awesome tracing/debugging output so you know what is happening, and see any performance bottlenecks, see
for a look
- Search Extra's support
- Super Easy Deep Linking (easier than the default apis :P)
- More coming soon!
Apps Using it
Windows Phone MVC is in production now and is being used by
which is a really cool app and winner of Spotlight 2011
And we are in the process of rebuilding Mahtweets for WP7 (http://mahtweetswp7.codeplex.com/
) just for Mango using the framework. So head over there for a currently evolving app and see how Windows Phone MVC can
help you write awesome performant WP7 apps with ease and without the frustration of the restrictiveness of the OOTB APIs.
At this point I am really open to suggestions in ways to improve this framework.
Controller actions are executed asynchronously, this means if you are fetching data from web services, it should be done in a synchronous way, currently the best way to do this is:
var stuff = Execute.AsyncPatternWithResults(myService.BeginGetStuff, "Arg1", "Arg2", myService.EndGetStuff);