Monday, August 18, 2008

StockSample: First Model View Presenter Sample Posted

After a long hiatus, I've created a new sample program for Windows Forms Model View Presenter pattern with data binding.  This example is not what I would call "best practices" but rather a simplification of the concepts to break it down to the most basic components.

The example is a program that is used to get stock price updates.  I wanted an example that I could do a lot of different visualizations and views / operations that just about anyone can understand.  I know that Glenn Block posted on the Composite UI WPF guidelines here ( and they also have a stock trading reference application.  The goal of my sample is to show a very simple example of Model View Presenter with Windows Forms and data binding.  There is no Inversion of Control container, no database, and no extra frills.  The sample is done in Visual Studio 2008 Express Edition (which is all you need to build / run it).  The only external libraries that are referenced are NUnit ( and Weifen Luo's DockPanel Suite (

You can get the source from my google code project here, see this link for instructions on checking out code from my repository (  The code is in the StockSample/tags/Snapshot20080818 folder.  I'll be updating the trunk periodically with extra functionality.  There are some tests... I'm still trying to get the hang of Test Driven Development.

I'll have a series of posts following talking about parts of the sample and as I build more onto it, I'll talk about those and link to the new snapshots.  You can then use your favorite Subversion client to see what exactly is different.  If you have any specific requests on things you want to see, let me know and I'll try to work it into the sample.

Technorati Tags: ,,


Anonymous said...

Is there a section on Presenter ?

Garo Yeriazarian said...

I haven't written a posting about it, but the code already has the Presenter bits in there. See the links in this post to see how to checkout the source.