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.

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.

A few days ago a friend of mine asked me the following. He was working on a program with a database backend. He found some ORM tools on the web, but every time they worked differently (use that or that class, mapping files, configurations, …) and he was worried that if he took the wrong ORM tool that later on in the program they would be stuck with it.

So he asked me if I knew anything where this wouldn’t be the case. I was pretty busy at the moment but I told him that I would let him know anything in a few days.

Anybody that had the same problem before and has a good solution for it?

Oct 5

Just found a pretty cool program today.
It’s called MusicBrainz Tagger (Website)

The great thing about this program is that it uses an online dictionary (based on some sort of hashing) to detect the files.
It can set the MP3 tags but it can also rename/move the files.

Together with Album Art Fixer this can really clean up your music collection. (Art Fixer Website)
Album Art Fixer