Mick Walker
Mick Walker

Reputation: 3847

Silverlight MVVM Application Architecture

I have a question on using MVVM within a Silverlight application I am developing. Whilst I understand the concept of MVVM, I am unsure how it would be best be applied within my application or even if MVVM would be suitable for my application.

My application is a navigation application, which simply displays a series of live video streams to the user. The user can switch between streams etc. There is no backend data store for the application, stream details are simply passed to the Silverlight application by the hosting page in a JSON encoded string.

Is MVVM best suited to this type of application, or would it be more suited to a data centric application?

I hope I have given enough information regarding the application, if however you need more information, I will be happy to edit this question.

Many Thanks

Upvotes: 0

Views: 361

Answers (1)

Stefan Z Camilleri
Stefan Z Camilleri

Reputation: 4076

Even though you might not be using a DBMS behind the scenes, as long as you have dynamic data being read from somewhere, then you need a layer that is responsible for retrieving said data.

The idea of MVVM is based around your abstracting:

  • where this data is coming from (i.e. your model which knows how to retrieve the stream details from the JSON encoded string)
  • the view model (which asks for the stream details from the model via some service.. without needing to know that they are json encoded strings)
  • your view (which binds to the stream sources in your view model and doesn't care how they got there)

...hope this helps

Upvotes: 1

Related Questions