Close a WPF View while abiding to the MVVM pattern

I want to start by saying that i am a total WPF using MVVM pattern newbie, but im getting the hang of it after working for a while with WPF and the MVVM pattern.

But i have to say its sometimes really hard to move eventhandlers from the views codebind to the viewmodel. Especialy when it commes to the Close method.My first thought was i could send the window as  an param to a command in the viewmodel but then that breaks the MVVM pattern and we cant be having that people.

Because you see, in the MVVM (Model – View – View Model) design pattern, the ViewModel (a class that typically contains the values you want to display in your View) shouldn’t know anything about the View.  However the view can and has to be aware of the ViewModel. But finally it came to me how i could implement the close eventhandler.

And i have to say i never thought it could be so hard to move an eventhandler like the one bellow from the views codebehind to the ViewModel:

private void  Close_Click(object sender, RoutedEventArgs e)
{
    this.Close();
}

Read More…

The “Big-Bang” Software development lifecycle model

Since i have had a lot of free time these last days i have spent the time reading about all kinds of subjects and one of the subjects was the “Big-Bang” lifecycle model.

First of all lets start with a short explanation of what a software development lifecycle model is. Simply put it is the process used to create a software product from its initial conception to its public releases. There are many different methods that can be used for developing software, and no model is necessarily the best for a particular project. But there are four frequently used models:

  • BigBang Model
  • Waterfall Model
  • Prototype Model
  • Spiral Model

Read More…

Pex and Moles – Automated Whitebox Testing for .NET

Pex and Moles basics

Now some of you might be thinking what is Pex and how can a Mole help me test anything. Well Pex is a testing tool which helps you generate unit tests. And when i say Moles i am not thinking about the animal instead i am thinking about a framework which enables you to isolate parts which are tested from other application layers.

Pex is a tool which can help you generate inputs for your unit tests. To use Pex you have to be writing Parameterized Unit Tests. Parameterized Unit Tests are simple tests which accept parameters and Pex helps you generate these parameters automatically.

Read More…

The lameguy returns…….

For the few readers i have which at this moment is probably just 1-2 people as you have probably noticed i haven’t posted that much this last week. That is because i have been sick, and also because i have started a new job at a development firm so i haven’t had the time nor the energy to write anything interesting.

So i thought i would post a couple of pics of my lame dog this time. Enjoy the cute dog pics :) Read More…

Test process improvement with the TMMi model

I feel i should warn everybody at the beginning of this post that this is gonna be a very long one. Because this is a subject that i am passionate about.

The size and complexity of systems and applications are constantly increasing. This leads to increased requirements and demands from the customer receiving the application or system. Users are not just interested in the functions that the systems provide, it’s also necessary that they are of high quality. And how do we meet the users expectations? By testing, but you can’t just test the software and claim that you have a good test process. Read More…

Subsonic install in FreeBSD jail

This post is a continuation of the “FreeBSD jail on embedded Nas4Free install” post, which covered how to setup a FreeBSD jail on an Nas4Free embedded install. This post is going to cover setting up Subsonic standalone server inside the jail.

Subsonic is a piece of software i can recommend to anybody running a NAS server since with it you can use your NAS also as a media jukebox.

SSH to the NAS

After you logged on to the NAS, check that the jail is up and running using the “jls” command.The output should look something like this: Read More…

FreeBSD jail on embedded Nas4Free install

Setting up a FreeBSD jail on embedded Nas4Free install

As most DIY computer geeks i have a server at home, more specifically a DIY Nas. It is basically an old p4 mini atx motherboard i had laying around with a raid controller card and a couple of hdd’s. The Nas runs an embedded FreeBSD distribution called Nas4Free,

Since the distro is an embedded install this means that any changes you make to it are gone when the server is restarted. So how can you extend its functionality and for example add a subsonic server to it.

The answer lies in Freebsd jails.Jails, sometimes referred to as an enhanced replacement of chroot environments, are a very powerful tool for system administrators, but their basic usage can also be useful for advanced users. Read More…

Follow

Get every new post delivered to your Inbox.