Skip to content

Instantly share code, notes, and snippets.

@shiftkey
Created August 13, 2012 06:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiftkey/3337426 to your computer and use it in GitHub Desktop.
Save shiftkey/3337426 to your computer and use it in GitHub Desktop.
My Ideal MVVM Framework
Things you need:
- a base implementation of ICommand - for Win8 I'd recommend asynchronous support. For early frameworks I'd say no.
- an interface for messaging between components - current favourite interface is MvvmLight's Messenger
- a base implementation of this messenger
Things you don't need:
- a base implementation of INotifyPropertyChanged - just IL weave and [don't think too hard about it](brendanforster.com/inotifypropertychanged-stop-the-madness.html)
Nice things on top of this:
- EventToCommand-style helpers (these are UI concerns to help eliminate code-behind)
@distantcam
Copy link

What about ViewModel-View location and creation strategies? Also lifetime of VM (eg guarded closing)?

@aaronpowell
Copy link

Okra (formerly Cocoon) does most of this.

It does need an Async command implementation, I've got a good one (thanks @JakeGinnivan) that I might send as a PR if I can feel motivated to install Mercurial. The Glass guys have a decent looking event-to-command helper as well.

Only think it would be lacking is messaging, but since I'm not sure what you mean by that I can't speculate whether the Navigation framework would do what you want or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment