The Model View Controller and Model View Presenter design pattern has been the source for a lot of confusion. Lately there has been a growing number of blog posts attempting to explain the when, what and why of this design pattern. Many developers unfamiliar to this pattern seem to be pushed back by the initial learning curve and complexity.
I have been following much of what has been written on this topic both on online forums and on blogs. If you are unfamiliar with MVP and are doing UI development I would strongly urge you to evaluate and study this pattern. It does not always pay to implement it and there are several flavors of MVP. Each flavor has strengths and weaknesses. But, IMHO, if you develop user interfaces, you need to be familiar with this design pattern.
If you are new to design patterns in general, there is one personal message that I would like to emphasize. I was first introduced to Design Patterns several years ago. It was early in my career, but I was no longer a junior programmer. Full of confidence I dived into this topic that was supposed to make me a better developer. There was however a difficulty I had to overcome that I would like to share.
I had mostly been working on medium sized projects. My interpretation of medium size is more than 6 months of development with 3-6 developers. Most, if not all of us were familiar with the principles of writing cohesive code and low coupling. The code was modular, well managed and in general I felt that for the most part it was high quality code.
At this point I was introduced to design patterns. My main problem was that it took significant time to unlearn certain practices I was familiar with. It took time to grok what all this extra complexity would bring to the table. And this is the main point. Until you become familiar with certain ways of doing things, it is pure added complexity. Once you get past this point and start to follow a set of principles and design patterns you'll find yourself writing highly consistent code. What was previously complex becomes second nature.
Back to the topic on Model View Presenter. As I stated in the beginning of this post, a lot has been written on this topic lately. Instead of repeating what others have written I'll instead point you to the sources I have enjoyed most.
Jeremy Miller has written a lot on the topic of Model View Presenter and Design Patterns in general. Development Trivial Pursuit: The difference between MVC and the different flavors of MVP is a pretty recent post, but if you search his blog you'll find tons of good content.
In his post MVC or MVP Pattern – What's the difference? Todd Snyder from Infragistics gives a good overview and compare and contrast the two.
Nicola Malovic offers a two part introduction to MVP. Part 1: Model View Presenter (MVP) Pattern Part 2: Model View Presenter (MVP) design pattern close look - Part 2 - Passive View.
If you want a lengthy, but thorough introduction and historical evolution of this pattern head over to An Introduction to the Model-View-Controller, Model-View-Presenter, and Presentation-Abstraction-Control Patterns by Derek Greer.
Scott Guthrie has just posted a post on how to increase the performance of Visual Studio. (The title of this post is actually his) He has posted several blog posts on how to improve the performance of Visual Studio here and here. .NET tip of the day also has a couple of posts on VS performance here and here. In his latest post he points out the importance of the speed of the hard drive.
Despite spending most of my time in Visual Studio I've had my fair share optimizing databases. When monitoring databases for perf problems you try to find which if any of the subsystems cause bottlenecks. Is the server CPU bound, disk bound etc.
Turns out some skills transfer well to other environments. :-) I am doing my development on a notebook. (A hefty one. One that can compete if not outperform most desktops) Despite having a powerful machine it seemed to disk bound. eg. the hard drive subsystem is the main bottleneck and the other sub systems are under utilized waiting for IO completion. I was already running with a 100GB 7200 rpm Hitachi 2.5" drive and I wasn't sure what I could do. I won't upgrade this machine until late 2008 which is when I estimate the next substantial hardware upgrade will be available. After a short monitoring session my suspicion was confirmed. I'm wasting time waiting for IO. Since this is a notebook I can't set up a RAID configuration or throw in a 10K rpm drive.
A few months ago Hitachi released a new 200GB 7200 rpm disk. So what would that buy you you might ask. A lot! Hard drive performance isn't only dependent on the platter rotation speed, but also on the density of the data on the platters. The denser (can you say that?) the data the more data is read/written per rotation.
I ran out and got the 200GB version and I can just say that the performance increase is substantial. Hitachi claims close to 20% performance increase, but I haven't done any benchmarks. My gut feeling is that it's less, but that might be because of other factors as well.