1

MVC is used a lot (not only in web apps) and it seems it's the 'go to' approach when designing software. There are also a lot of MVC versions.

My question is: what was before MVC? How did people structure large software systems?

Obviously 'separation of concerns' wasn't invented with MVC (even if it wasn't called that). I assume this type of thinking, which is crucial for building and maintaining software, was present long ago.

But in more technical terms, how was software structured before MVC?

Aviv Cohn
  • 21,190
  • 31
  • 118
  • 178
  • 1
    Varied between ball of mud design and stuff that would look pretty close to MVC if you squinted right, but didn't have a name. – Gort the Robot May 20 '14 at 19:56
  • 7
    Define "before MVC". Before the term was invented? Before it was popularized? The pattern existed before it was named. It existed **before** design patterns were invented – Oded May 20 '14 at 19:58
  • 3
    "How did people structure large software systems?" - honestly, large software systems are seldom structured primarily using MVC, not even today. Something like the Linux kernel has a lot of structure, but MVC is most probably not the primary model for that system. – Doc Brown May 20 '14 at 20:04
  • 6
    I think this question betrays a lack of knowledge about the MVC concept. For instance, you speak of it as a new thing whereas MVC was invented in the 70s. You also speak of it as an overarching systems design approach when it's really just a basic technique for simplifying UI design and does not detail the system beyond UI. You should perhaps do some more researching on MVC to get your head around the full crux of what it is, where it came from, and what it's for, because this question doesn't really make sense when you fit it into the reality of MVC as such – Jimmy Hoffa May 20 '14 at 20:21
  • @JimmyHoffa I know MVC was invented in the 70s. And in my opinion it's about more than UI design. It mainly defines the interaction between the UI and the rest of the system - but doesn't define *how* the rest of the system (the model) is to be structured, you're right here. So it's a very general 'framework' (in the conceptual meaning of course) of structuring software, but as you said mainly has to do with how the UI interacts with the rest of the system. Still it's interesting to learn what people used before it was invented/named. – Aviv Cohn May 20 '14 at 20:28
  • 1
    What was before MVC? People who thought they were doing MVC. – Songo May 20 '14 at 21:58
  • 3
    Trygve Reenskaug invented MVC in 1979. And in 1978, I was using Fortran77 on punch cards. So one answer is: Fortran77 on punch cards. – Joe Ballard May 21 '14 at 00:18
  • @JoeBallard wow, nowadays it takes so long before anybody let's you use a new version of your language, it's heartening to know that back in the 70's people would use a version of their language that's only one year old, well done staying on the bleeding edge (and I'm sure those punch cards were at the time!) – Jimmy Hoffa May 21 '14 at 16:05
  • @JimmyHoffa - This was at a university. The upperclassmen were using some new language called C, on monochrome terminals. Us freshman were punching FORTRAN on cards to run on a CDC 6600. I remember thinking "C? What a dumb name for a language, that'll never take off." WRONG! – Joe Ballard May 22 '14 at 22:12

2 Answers2

6

MVC is about User Empowerment for Interactive GUI Systems. It was invented at about the same time that GUIs were, and only shortly after Interactive Systems became available (and before they became widespread). User Empowerment (at least in the sense that Alan Kay's group understood it, namely that programming should be so easy that users wouldn't have to depend on programmers for programming) still hasn't happened yet.

So, in a sense, there was no "before". At the time that MVC was invented, there were only about a dozen or so programs that would have benefited from MVC, and the inventors of MVC knew all of them and (probably) drew inspiration from them.

More interesting is the fact that the community which invented MVC 35 years ago has mostly abandoned it by now. Self (a direct descendant of Smalltalk) appeared in 1987 with the Fabrik UI (inspired by the Alternate Reality Kit), which is distinctly different from MVC, and Squeak Smalltalk (the Smalltalk dialect designed by the original creators of Smalltalk) adopted a port of Fabrik called Morphic instead of MVC in the 1990s (MVC is only included in the Squeak distribution for legacy programs). Pharo, a modern fork of Squeak, gets rid of MVC altogether, in favor of Morphic. Most commercial Smalltalks nowadays use some variation of MVP, not MVC.

Arseni Mourzenko
  • 134,780
  • 31
  • 343
  • 513
Jörg W Mittag
  • 101,921
  • 24
  • 218
  • 318
  • 2
    +1 for history lesson. Although I'd appreciate a note on how MVC is this very specific pattern, the fact all those web frameworks that are MVC are not really MVC (view can't observe model well over statless protocol yada yada), and the fact classical MVC is _rarely_ the solution to a modern UI problem. Also, something about the fact it's all about separated presentation, and that often people say MVC and really just mean separated presentation. – Benjamin Gruenbaum May 21 '14 at 00:21
3

Actually the MVC concept pre-dates graphical GUIs.

It first appeared as an architecture in large mainframe CICS installations.

The motivation was scalability rather than useability, and, to overcome some of the single threading, single ownership issues associated with CICS processes or "region" in M/F speak.

So you had the Controller which contained the application logic in a separate program which could run in one of several "Application Owning Regions".

Then you had the View as a separate program which could run in any of the "Terminal Owning Regions" where users could log in and start a session.

Finally you had the Model in a "Data Owning Region" there could be several of these but an olde worldy VSAM file or IMS database had to be wholly owned by a single CICS region. These days "DOR"s have mostly been replaced by connections to a real DB2 database.

So apart from the actual GUI almost everything you think of as "modern" IT was implemented on the mainframe in the last century.

In case you were wondering VSAM is effectivly a "key"/"value" data store. IMS/DB is a NoSql database.

James Anderson
  • 18,049
  • 1
  • 42
  • 72
  • +1 for the humour, especially "IMS/DB is a NoSql database". True, and funny. – Móż May 21 '14 at 04:47
  • +1 for pointing out that CICS was MVC (I was about to add a comment to that effect, then scrolled down). I would add that the 3270 terminal interaction followed exactly what we today call MVC. – kdgregory May 21 '14 at 11:38