Andrej Tozon's blog

In the Attic


NTK2011: Slides and sample code: MVVM

MVVM is a topic that can easily take hours of discussion. Unfortunately, I only had less then one to talk about (at least some of) its goals, parts and possible implementations. Below is my slide deck:

And the code: download

The code is structured in a way that helps you see the changes in the code while progressing through the samples. Just follow the numbers (e.g. MainPage1, MainPage2, and so on). It’s mainly Silverlight code, with the last example being example of an easy transition to Windows Phone.

The sample application is a conference app that lets you see available sessions. I removed the online data endpoint so the online samples won’t work, but you’ll get the feel using the offline data provider. Speaking of data providers, there are three (online/Ntk, using OData endpoint, Offline (loads Xml file from resources), and Json (same as Ntk, just for getting data in Json format – you know, for the phone Winking smile).

Once again, I have to stress out that code is for demo purposes only - while it’s minimized one end, it may be overly complicated on the other. Also, Silverlight Toolkit and JSON.NET libraries that were added through Nuget are not included in the zip.

Ah yes, the slides are in Slovenian language.

NTK 2011 Sample Code: What’s new in Silverlight 5

My “What’s new in Silverlight 5” session at NTK was mostly about showing sample code and samples, so no slide deck this time. The enclosed Visual Studio Silverlight project is configured for running Out-of-Browser, with GPU acceleration enabled, and requiring elevated permissions.

It’s basically a very basic video player application, used for playing videos from three preconfigured video sources: one’s your “My Videos” folder, one’s a custom local disk folder, and the last one is your favorite online TV show: the Silverlight TV (yes, it parses show’s feed to get the episodes list and info).

These sources play accordingly to the elevated permissions additions, made in Silverlight 5. The sample applications show off a lot of new Silverlight 5 features, some of them not so easily discoverable. Be sure to check out the source code to find them. This is a demo project and the code is somewhat unstructured. I’ll cover some of the new features in more details in the future, when Silverlight 5 fleshes out a bit more.

Download the sample project

Sample Silverlight 5