Is MVC dead for the frontend?

As more and more frontend developers adopt unidirectional architectures, one can only ask if there is any future for the classic MVC approach.

In order to understand how we got to this point, let’s analyse a bit the evolution of the frontend architecture.

Over the past four years I saw a great deal of web projects and spent a good period of time architecting the frontend or integrating some framework for it.

Before 2010, JavaScript — that programming language jQuery was written in — was used mostly for DOM manipulations and adding that extra touch to a traditional web application. People did not care much about the architecture and things like revealing module pattern were good enough to structure our codebase.

The whole discussion on frontend vs backend architecture virtually appeared with the rise of the single page application concept (late 2010) and with the increasing popularity of frameworks like backbone and knockout.

As this was a novelty at that time, the designers of those frameworks had to look somewhere else for inspiration, so they borrowed from the practices that were already well established for server side architecture. And by then, all popular server side frameworks had some sort of implementation of the classic MVC (Model — View — Controller), also known as MV* because of the different variations.

When React.js was first introduced as a rendering library, it was mocked by many because of the apparently counter intuitive way of dealing with HTML in JavaScript. But people overlooked the most important contribution which React brought on the table — Component Based Architecture.

React did not invent components, but it took the idea one step further.

This major breakthrough in architecture was overlooked even by Facebook, when they advertised React as the “V in the MVC”. As a side note, I still have nightmares after reviewing a codebase which had both Angular 1.x and React working together.

However, 2015 brought us a major shift of mindset, from the classic MVC we were all used to, to the Unidirectional Architectures and Data Flows derived from Flux and Functional Reactive Programming, with tools like Redux or RxJS.

Frontend development is ever changing, and even more so over the past year or so.

Source: https://medium.com/@alexnm/is-mvc-dead-for-the-frontend-35b4d1fe39ec#.8grf9o81p

Ready To Build Awesome Apps?
Get started for free