Geeks With Blogs

@cnrussell
  • cnrussell wrote a post on my blog about my friend Ursula Eilers (Microsoft MVP, Office System) - Office expert about 1806 days ago
  • cnrussell went to "The MSDN Southern Fried Roadshow" in Atlanta, GA on Dec 08, 2009. Cool stuff! about 1809 days ago
  • cnrussell went to "The MSDN Southern Fried Roadshow" is a developer/architect training through the southeast on Dec 08, 2009 Atlanta. Cool stuff! about 1809 days ago
  • cnrussell Community Credit submission approved. I earned points toward a geeky prize becuase I contributed to the development community on web. about 1810 days ago

News


Catherine Russell Architect, President of "Women In Information Technology" Group

5 Minute Overview of MVVM in Silverlight
Model-View-ViewModel ( MVVM ) is a pattern to use with Silverlight and WPF.
john gives short explanation of MVVM

MVVM works well with XAML based applications is because of the powerful XAML binding features.
This allows the View to be separated from the data and the logic.
The View can be designed in Expression Blend while the ViewModel can be developed in Visual Studio .NET.
It allows for the presentation to be separated easily.

A View is a class that represents the user interface that the user will see.
In Silverlight this is the MainPage.xaml or Page.xaml class for example.
In Silverlight and WPF the View also contains binding extensions that identify the data points
that will be presented to the user (embedded in XAML).
The bindings are activated when the View’s DataContext is set to a class that contains the source for the bindings.

Model is a class that represents data points describing a specific entity. 
The Model’s purpose is to represent the data points and it has no knowledge of
where it will be presented to a user nor how it will be presented.
It’s single responsibility is to represent the data points.

ViewModel
The ViewModel is the glue between the View and the outside world.
The View’s DataContext is set to an instance of a ViewModel class.
This is where all of the bindings declared in the View’s XAML The ViewModel contains the Model,
so it has all of the data points needed in many cases right there.

To learn more, go to URL: http://johnpapa.net/silverlight/5-minute-overview-of-mvvm-in-silverlight/

Posted on Thursday, December 10, 2009 10:01 PM Blogs | Back to top


Comments on this post: "5 Minute Overview of MVVM in Silverlight" Cool article by JohnPapa

# re: "5 Minute Overview of MVVM in Silverlight" Cool article by JohnPapa
Requesting Gravatar...
Thanks for sharing.
Left by Alex Babichev on Dec 26, 2009 6:45 PM

Your comment:
 (will show your gravatar)


Copyright © CatherineRussell | Powered by: GeeksWithBlogs.net | Join free