MVC - Model View Controller/ Presenter
I had been battling with unraveling the mysteries of the design pattern at my place of work since my first day there.
We had a lot of brain trusts and unfortunately, all the brain trusts had left or about to leave with the trusts by the time I joined, so, I did not have the luxury of interacting with them in order to understand the design principle and all the other undocumented features/consideration for the application. The architecture worked as along as one was in compliance with the work flow. Unfortunately, a lot of behind the scene stuff was shrouded in mystery and only a handful of people really understood what was going on.
I was not content with following the factory workplace work flow - do it repeatedly a particular way and you'll get the same exact result as expected. I wanted to understand how the system really worked and not just the abstracted layer in form of a framework/template/work flow. The best bet, in my view, was to try and unravel the design principle or thought process behind the application. There were a lot of Windows messaging, listeners and notifiers. The whole thing was asynchronous and if you were not well versed in the concept and underlying principle of the application, debugging could be a nightmare.
I did a lot of ‘googling’ and came across a lot of references to software models almost identical to what we had in place. My takeaway from my little research was that our architecture was most likely modeled round the MVC paradigm – which was a model originally conceived by Smalltalk in the late 70s and used primarily in initial Apple/Macintosh software development.
Mike Potel wrote a paper on this: http://www.wildcrest.com/Potel/Portfolio/mvp.pdf
Martins Fowler dwelt on a slightly variant of this which can be viewed at: http://www.martinfowler.com/eaaDev/uiArchs.html
Andy Bower and Blair McGlashan expanded on this model further : http://www.object-arts.com/downloads/papers/TwistingTheTriad.PDF
Darek Greer made an attempt to put everything in perspective - http://aspiringcraftsman.com/2007/08/25/interactive-application-architecture/
You might take a look at http://wpf.codeplex.com/wikipage?title=WPF%20Model-View-ViewModel%20Toolkit&referringTitle=Home for the WPF MVVM toolkit. It’s for VS2008, but someone has updated it for VS2010.
Finally, examples of how this model is implemented in other languages and a bit of the underlying principle can be found here: http://puremvc.org/
Microsoft - Practice and patterns - Desktop Development
Building an MVP Framework for .NET. Part 1: The Basics of MVC and MVP
Building an MVP Framework for .NET. Part 2: Implementing Core Functionality
Building an MVP Framework for .NET. Part 3: Designing a Windows Forms Views Engine
Comments
Post a Comment