You can download it here:

Aug 4

Didn’t even know it was possible but it seems like Expression Blend supports AddIns. And Stefan implemented to feature I was missing the most in Blend: IntelliSense!

You can get the Add-In at his blog.

Jul 9

It’s a long time since I posted something, have been working on our latest product and it’s finally getting ready for the big public to see :)

We have put a screencast online to give a first look at it.

More info at David’s blog.

Dec 4

I finally got the demo online, you can download it at our forums. If you have installed all the required tools it should work without a problem. I’ve added an attached database file so just installing SqlServer 2005 Express would be enough to run the demo. To run the oracle part you’ll need to install ODP.NET. The current demo can connect to 2 different database servers just by changing 1 word :) The ADO.NET part only supports SqlServer though. You can also change 1 line of code to switch to a completly different model. The web project is just a starter to show that the MVP part can be used on any user interface.

So the current demo has 2 models and 2 view with one and the same presenter. There is also a test project which uses Rhino Mocks to mock both a view and model. The tests just define the workflow of the presenter and then I implemented it. If I ever add anything I’ll need to update the tests because even adding a new event will fail the test :)

The file is 2.35MB because of the embedded database but it’s really a nice example of a MVP application. It even includes a second MVP part for the import part. The actual model implementation are seperated in the Demo.Service.Hera project for an implementation with our Hera Application Framework. And a Demo.Service.AdoDotNet for an implementation with ADO.NET, the last one isn’t completly though. It’s mostly missing some features that would make the sample too complicated (concurreny, transactions, state tracking,…) but it works.

Here is a small part of my Demo that I’m creating. It is actually a second Presenter with Model and View that are used when you want to import something (the demo will follow so don’t worry :) ).It gives a good view of how I’m implementing the MVP pattern.

Import MVP Class Diagram

As you can see my Model exists only of methods to get data. My view exists of only events. The presenter has 1 public constructor which takes an IImportModel and IImportView instance. The constructor calls the SetUpView method which will bind all the View’s events to the private methods (ViewAdd, ViewClosing, ViewLoadFeed). The Closing event is an easy feature (WinForms already have this event anyway) which allows me to clean up everything. That’s why the Model also implements the IDisposable interface. So when the view is closed the presenter will call the Dispose method on the Model which can then close the database connection, file or …

I’ve been working MVP for a day now and I just love it. Complete seperation of data and user interface. I’ve been creating 2 models, one built with Ado.NET (which sucks by the way) and one built with Hera (the ORM tool at work).

I found a few ways to implement MVP though. Some still have a reference from the View to the Presenter. I removed this reference by using events on the View that the Presenter listens on.

By using Rhino.Mocks I also created a complete test case for my presenter with a mocked View and Model to check that everything goes as it should.

This is actually the first program where I could test a program with a user interface :)

I’ll see that I can post some information later today and put up the code for anybody who wants it.

Somebody mailed me that I should look into the MVP pattern (did I mention I love patterns! :) )

So after some browsing on the web it sure looks like the right pattern to use for my last problem.

MVP exists of a Model (the data), a View (the user interface) and a Presenter which links everything together. There are a few good articles about it on codeproject so you should look there if you want to.

Since MVP completly seperates model from view it should be possible to use an ORM and when you don’t want to use it anymore you just need to create a new model.

I couldn’t really find a sample of a MVP application with 2 models so I’ll create a sample myself. I might post it online to.

« Previous Entries