Photo by jenny downing
I've been putting aside some research material for a Model View Controller post. Time has passed and I have not found the time to blog on the topic. Today I'll do, on a different way.
How I got started
Back in 2004 when I started as an intern at Intel, I got the chance to be taken as apprentice of one of the top senior engineers from one of Intel's Research departments and so, transforming my project into a Research effort and its implementation into a parallel Production one.
Nofil Fawad, my dear friend, came to open my eyes and mentored me in lots of stuff related to software engineering, life and, specially, in ways of designing computing.
Our project, called Shrek Fx, soon found its foundation on the Model View Controller pattern and from there it took us into a 2 year effort that ended up empowering some big in house web applications to date.
The Pattern: Learn the stuff
Back in the day, it took me quite a bit to digest the pattern and transform it into a practical mean of developing software in an iterative, secure and scalable framework. It even took Nofil and I a bit more discussing its design and implementation down to levels not before explored by meself.
Nowadays, though, it's common to find people talking on the subject and even more common to find frameworks with a flavored approach to the pattern; yet, I believe it is just a few that really knows its foundations, basics and specially what's behind its purpose.
Just like Scott Hanselman wrote earlier on his blog,
It's always better, for me, to understand WHY and HOW something is happening. If you say "just because" or "whatever, you just add that, and it works" then I think that's sad
Today a post on the matter landed my RSS feeds, and thought it was a good start on the basics of MVC - it's always good to have a point of start and move from there.
On his post, Stephen Walther takes his readers to the Smalltalk years where the pattern was invented and then develops into what he calls the JavaServer Pages' year and later to today's ASP.NET MVC ones.
A remarkable thing to point is his distinction to the modern days of the pattern; just as American painter Jackson Pollock once said "new times call for new techniques". And it remains true to the way we solve problems in our industry.
Model View Controller, was borne where all things digital sought their few steps, Xerox SPARC, on a paper called Thing Model View Editor and based on Smalltalk's way of doing things; from there, it has evolved into patterns like the Model View Presenter and variations of its dependencies, as well of its execution flow.
I wanted this post to be about the pattern, its history and flavors yet I feel like it's still early to write about a history that is re-defining itself as we speak.
MVC was conceived as a general solution to the problem of users controlling a large and complex data set, writes Trygve Reenskaug, it's inventor; and so it is to assign the right amount of responsibility to its actors while in implementation.
The following is a list of references that will get you filled up with the basics so you can better design around them, its flavors and some insight on what's to come.
- Thing Model View Editor, the original paper wrote by Trygve M. H. Reenskaug at Xerox SPARC.
- The Model View Controller - Its Past and Present, an update to the original paper extending the scope of the challenges and updates his view based on the experience gained by the history.
- Model View Controller, on wikipedia.
- The Evolution of MVC, an history reference by Stephen Walther.
And here is a list of flavored implementations for the Web,
- Perl's Catalyst
- PHP's Zend Framework
- Python's Django
- Ruby on Rails
- AS3's Cairgorm
- ASP.NET MVC Framework
- Java's JavaServer Faces
Hope you find it as valuable as I did when giving my first steps in the subject.