I am currently working on a Silverlight project and our team is planning to implement some of the best practices related to Silverlight development. One of the thing we have started doing is the use of MVVM. I have come across many articles and blog posts related to MVVM and Silverlight and WPF as well. Sometimes the views expressed in these resources is contradicting and confusing as well. I’ll try to share my understanding of MVVM with regards to Silverlight application. I plan to build a small application which will be right from the scratch and explore different facets related to MVVM.
Topics for Silverlight learning series
My initial thoughts are to build a simple Twitter or Facebook client application using Silverlight. This might be on the lines of TweetDeck or Sesmic Desktop (although not as advanced as either of them). That would mean I need to get handle around the API’s exposed by these two social networking sites. It would all depend on the kind of API exposed by them and as well as the time available at my disposal.
If the learning curve is high then to keep the things simple I would build an application without external dependencies. Once I have demonstrated all the fundamental concepts I might then move onto integrating it with third party services. All this is right now in the very initial stages as I am still learning Silverlight. Based on my pace of learning so far I intend to come up with the following posts in a short while :
- Part 1 – Basic Controls in Silverlight Part I
- Part 2 – Basic Controls in Silverlight Part II
- Part 3 - A basic Silverlight 4 application using drag and drop features
- This will be a small prototype of the application I am trying to build using Silverlight.
- Part 4 – Understand the basics of MVVM pattern
- Some of the very basic minimum things everyone needs to know about MVVM before diving into it.
- I managed to refactor this demo into something more useful by removing the dependency between MessageBox and a ViewModel using dependency injection in this post.
- In this post I integrated the MVVMLight toolkit in the application and also demonstrated the use of ViewModelLocator.
- Part 5 – Understand basic data binding in Silverlight
- This will cover the basic data binding concepts like one way binding, two way binding and how data binding in general works with Silverlight technology stack.
- Part 6 – Understand advanced data binding like element binding
- This post will cover next step in data binding process like element binding and binding to different types and values using convertors.
- Part 7 – Refactor basic application to use MVVM
- In this post I’ll refactor the application to use MVVM pattern.
- Part 8 – Make use of advanced concepts and may be implement a feature like Themes.
- Hopefully by this time I would have explored good amount of Silverlight features and can make use of things like data and control templates to come up with a UI which can be themed. As a very simple example I think being able to choose between Silver and Black or Blue themes should be a better option.
- Part 9 – Make the application multilingual to demonstrate localization features in Silverlight.
- I also plan to demonstrate the multi language support in Silverlight by localizing it to couple of languages.
This is a learning curve for me and by means of this series I hope to uncover the parts of Silverlight that I have not covered so far. As I go along this path there are chances that some things get added or dropped but mostly things will not change much. Initially I do not want to complicate the things by including things like IoC containers and service oriented architecture. My plan is to leverage the new things in Silverlight to come up with an application with minimal features. Once that is completed I do intend to demonstrate other advanced stuff for sure.
I hope to cover up these things in the next two to three weeks time. Feel free to suggest things which might help me or if you would like me to include something helpful as part of this learning series. Many of the things I discuss here would be applicable to WPF development as well and might be helpful to those working on WPF. Until next time Happy Programming