MVC - There's a New Superhero In Town
January 10, 2019

You’re probably wondering about the image we’ve chosen. Frameworks and languages are a lot like superhero’s and graphic novels. Everyone has a favourite and everyone has an opinion and ultimately the conversation descends into why one is better than the other…and that’s exactly what this blog is going to do.

Why MVC is better than WebForms


If you’re an avid follower of the Smarter Software ® blog you probably caught our blog on the release of Kentico 12 and it’s focus on MVC development. If not, go check it out and get yourself up to speed on the death of WebForms and how that’s changing the WCMS game.
 
First things first, a littler history on WebForms and Model View Controller (MVC)…
 
Web Forms came about in the early 90s when ordering food and doing your shopping online really started to take off. Naturally these activities required considerable data gathering on everything from customer details to payment processing and shipping, so there was a need for a user-friendly graphical user interface. Hence, web forms was born.
 
Now, 20 years on and the way people behave and interact online has dramatically evolved, yet WebForms have remained largely unchanged. In fact, the internet today, the user demands placed on it, and the data generated is completely unrecognisable from the internet of the 90s, rapidly pushing Web Forms towards ‘not fit for purpose’ status. When you look at like that, it’s any wonder WebForms weren’t been tipped for retirement sooner.
 
That said, WebForms have not had a monopoly on the market, MVC has actually been kicking about for quite some time. Believe it or not, the earliest iteration of MVC came about courtesy of Trygve Reenskaug in 1979, but the Model View Controller we recognise today hit the mainstream in the 00s (naughties? Does anyone still say that?) when it’s relationship with Java was solidified through Spring, Python, Django and Rails; all of which focussed on rapid deployment, dramatically increasing MVC’s popularity among the development community.
 
So now you know where Web Forms came from and why they are retiring, and that the MVC revolution has been slowly but surely gathering speed, let’s take a look at the major benefits of the later.
 

8 reasons MVC is better than WebForms

 

  • Faster Development (POW!)

 
MVC supports rapid and parallel development. While one developer works on the view, another can work on the controller to create the business logic of the application in development.  So the application or website built using MVC can potentially be achieved twice as fast!
 

  • Enables the full control over the rendered HTML. (THWACK!)

MVC works with abstractions over the standard HttpContext classes so unit testing is easier because classes can be ‘mocked’. WebForms can’t be mocked because it relies on ASP.NET context classes that require real context to work.
 

  • Provides clean separation of concerns (BLAM!)

 
Separation of Concerns is a design principle that dictates the separation of code into distinct sections, each addressing a particular purpose or ‘concern’. MVC naturally supports this organisation of code, promoting great design.
 

"the whole point of MVC is to decouple the front end UI code, from the back end logic, which WebForms has tied together...There are many other benefits - faster development, cleaner code, better control over things like using REST and authentication, but in my opinion, that's the 1 true reason to use MVC."

James Anderson, Technical Architect for Etain
 

  • SEO friendly (KAPOW!)

 
Using MVC it’s easy to develop SEO-friendly URLs that attract more visitation!

"1 thing though with the SEO - I think what its getting at is that through MVC routing we have greater control over the route names - making them more readible, which is important in SEO now"

James Anderson, Technical Architect for Etain

 

  • Enables Test Driven Development (BOOMM!)

 
An Agile element here, where your Requirements are turned into Test Cases that run at the end of short development cycles and the results of which are used to improve the application during it’s development.
 

  • Easy integration with JavaScript frameworks (ZAP!)

 
Here’s a handful of Javascript Frameworks MVC plays well with: Angular, Raect.js, Backbone.js, Ember.js, Polymer.js and D3.js
 

  • No ViewState and PostBack events and support for asynchronous technique (OOOF!)

 
Thanks to their less intensive use of server resources, applications and websites buit using MVC load lightening fast!
 

  • Reusable code! (BIFF!)

 
MVC patterns return data without any formatting so you can store and call on your components again and again for use with any interface.


So now we've added some serious POW and THWACK  to the fight, are you team WebForm or Team MVC? 
 

Ready for MVC?

If you’re ready to future-proof your website with MVC arrange your free consultation by calling 028 90 87 22 22  or complete the contact form below:

 Security code

Return to blog

We're Hiring

Interested and want to know more?Send us an email