Mar 27 2008

Recommended podcast

Category: C# | Podcast | Recommendationsfossmo @ 15:29

I have earlier posted about podcast's I listen to. In that post I forgot to mention an other good podcast. The name of the podcast is Polymorphic podcast by Craig Shoemaker.

Link to the site: http://www.polymorphicpodcast.com

ppodcast

Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Mar 27 2008

To night I understood what you gain using the Model-View-ViewModel pattern

Category: C# | Patternsfossmo @ 15:19

To follow me in this post I believe you need to have some pre knowledge about this Model/View/ ViewModel-pattern.

In my company we have a thing called "fagkveld". Its basically 1,5 hours where we present different design patterns and best practices to each other. To night Kjetil talked about something that I think is really exiting; the pattern Model View ViewModel. It's a pattern, among other things, for separating the (business) logic from the GUI (in Windows Presentation Foundation).

I have implemented the Model View Controller pattern in WPF earlier, and didn't then see the advantage of using a ViewModel. To night I understood what you gain using a ViewModel.

When using ViewModel on top of a (domain) model you get the benefit of customizing the ViewModel to exactly fit your views needs. If you need to change the data before you present it in the view, you can do this in the ViewModel. Let's say you have a model representing a person and you want to merge the persons first name and last name into one textbox in the view. You can do this in the ViewModel to avoid adding logic to the code behind file in the view. To completely remove code from the view, you also can use the Routed command pattern included in WPF. If you have a (domain) model that isn't suitable to databind to your view, ViewModel is your savior.

A problem I see using a ViewModel, is that the (domain) model isn't updated before you specific tell it to update it self. If other parts of the application relies on the model being updated "on the fly", you may have a problem. But, i guess this problem is possible to overcome.

Model View ViewModel is perfect to adapt an "old" domain model to support the mind blowing features in Windows Presentation Foundation.

Good reading for learning about the pattern:

http://blogs.msdn.com/johngossman/archive/2005/10/08/478683.aspx

Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Mar 6 2008

Test new software in a virtual layer

Category: Softwarefossmo @ 12:41

Would it not be nice if you could install and test software without worrying about your computer getting cluttered up with dodgy registry settings and information stored at places you don't want information to get stored? These last months I have tested a virtualization layer called Altiris SVS. What it does, is to let you install software in a "sandbox" at your computer. You can turn the layer on and off as you please. All information written by the software installed in the "sandbox", can be removed. You can share a layer with a friend or co-worker. I find it quite handy when testing beta software.

altiris

Altiris SVS is free for personal use. You can download it from this site: http://juice.altiris.com/node/86

Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5