Sunday, February 27, 2011

Building a Windows Phone 7 Application with UltraLight.mvvm

I recently released a new open source project called simply UltraLight.mvvm. The purpose of this project is to make it easier to build MVVM-based applications that support tombstoning (a must) on Windows Phone 7. The DLL is 22KB and the source is less than 300 lines of code.
With that, the framework supports:

  • Commands
  • Command binding for buttons (with parameters)
  • Support for binding commands to application buttons on the application bar
  • Dialogs, both notification and confirmation
  • Messaging using the event aggregator publisher/subscriber model
  • Service location
  • Design-time friendly view models
  • Tombstone-friendly view models with control hooks for tombstone events
  • Decoupled navigation support from the view model
  • Decoupled visual state support from the view model
  • Notify property changed using expressions instead of magic strings
  • Dispatcher helper for UI thread access


Why not Jounce?
I think Jounce is overkill for the phone. Jounce specifically and explicitly relies on the Managed Extensibility Framework which is a phenomenal tool for building modular line of business applications for Silverlight. While the phone is Silverlight, and while there are certainly business applications on the phone, there are several reasons why I think it requires a completely different framework.

Read more: C#er: IMage