silverlightmvvm

how start implement MVVM pattern


=======

So i decide to to develop my asp.net site into Silverlight.

I today start to search articles about MVVM pattern which i want use in my Silverlight app, and i am confused :/ It's hart to me understand how works this pattern. I am find 3 frameworks which supports MVVM pattern in Silverlight - Caliburn, MVVM Light Toolkit and GoodLight.

I ask for this, cause i must start to rewrite my app from asp.net to Silverlight and i don't know that i can do it first and later (when i understand MVVM pattern and framework) implement this pattern in finished app ? Or from begining rewrite project to MVVM framework?


Solution

  • Going from ASP.NET to Silverlight is likely to require a (nearly) complete rewrite. The usage scenario is quite different. Silverlight is all about providing a client-side like development environment - it makes it so you can write an application the same way you'd write a client-side, desktop application, but execute this within the context of a browser.

    This has fairly broad implications on how you'd use and develop your software.

    That being said - for frameworks... Personally, I'd recommend getting a good grasp of MVVM first, then choose a framework (if any). MVVM is really a simple architectural design pattern. Once you understand it, the frameworks will make more sense. It's difficult to suggest "pick this framework", since they all add their own, valuable, additions and ways of working.

    There are many good sources for learning about MVVM. Personally, (I'm being biased here), I like the intro I wrote (even if it's WPF oriented instead of SL oriented, the concepts are the same). That being said, Jerimiah Morrill's MVVM for Tards is also very good to get a basic understanding of what, exactly, it means when you say MVVM.

    Once you understand this, the frameworks will be much more approachable (or avoidable, if you don't want them).