Thursday, 17 May 2012

The Old Ones are the Best

It is very common for a new technology to appear in the development world. Slightly less common is the entire development community turning round and adopting it wholeheartedly. And when they do, it's often touted as the 'next new thing' to adopt.

MVC (model, view, controller), as a way of separating logically distinct areas of code within a software development project, exists within a vast number of languages and frameworks and has come from almost nothing over the past ten years. In the Microsoft world it has heralded a complete paradigm shift away from the more traditional Web Forms development model to one focussed around demarcating code across strict lines between the user interface, the data and the 'controllers' responsible for channelling information between the two.

Like most developers working with Microsoft's tools, my first awareness of MVC came when Microsoft - slightly late to the party - launched their implementation in 2009. It was only when their third version launched in 2011 that it really took flight on their platform, primarily (I believe) due to Razor, a language designed specifically for writing user interfaces.  For most developers using .net languages it brought about a massive change in thinking about how applications work; and yet, it shouldn't have done. MVC has existed for many years, even if the name is a new one to most people.

It wasn't one of the design patterns championed by the Gang of Four in their seminal 1994 book, but if I recall the structure of some code I wrote back in the 90s, I was already using a pattern not completely dissimilar to MVC: a Java applet for the user interface, a backend database for storing data (I forget which), and a set of Perl CGI scripts for passing data back and forth; at the time, there was little choice. I certainly didn't invent it, nor these techniques, so how 'new' actually is MVC?

In fact, MVC - as a defined term, not even a concept - can be traced back even further than this. The credit truly belongs to Trygve M. H. Reenskaug, who writes:
"I made the first implementation and wrote the original MVC note at Xerox PARC in 1978. The note defines four terms; Model, View, Controller and Editor . The Editor is an ephemeral component that the View creates on demand as an interface between the View and the input devices such as mouse and keyboard."

We strive to keep our technological skills as up-to-date as possible, but there are times that the old ideas are the best; our skills are in recognising the appropriate technologies for each project we work on. If that means using development technologies older than some of the developers themselves, then so be it.

No comments: