MVC Architecture as a Software Architecture

Udith Gayan Indrakantha
3 min readDec 15, 2019

--

Photo by 童 彤 on Unsplash

A software Architecture:

A software architecture is the way that different functioning modules or the components are interrelated in a system to achieve a single task or set of tasks , fulfilling the requirements with best performance.

There are several software architectures used to design a software at different scales, such as MVC architecture, Layered Architecture, Component Architecture, Service Oriented Architecture etc.

MVC Architecture

This is one of the mostly-used architectural pattern for developing various applications. MVC stands for Model , View , and Controller which a MVC framework consists of. These three categories have its own functions.

Model: This represents the data that you need to display to the view. We can basically say Model class represents the data in your database.

View: View is what is presented to the user through the interface. Using view user can interact with the application. In an application, this is the UI/UX front end part and in an web application, View consists of HTML,CSS,JS etc.

Controller: This is where we write our logic of the application. This can handle requests and acts as an interface between Model and View.

This MVC architecture was first designed for Desktop Applications. But, Nowadays, this architecture is widely used in web applications in major languages. Further some MVC web applications taker a thin client approach while some are executed partly on client. For the development of Mobile applications also, this architecture is mostly used.

Advantages of MVC Architecture

§ Provides multiple views.

§ Faster development process by enabling multiple developers to work collaboratively.

§ The modification does not affect the entire model.

§ MVC model returns the data without formatting.

§ Easier to Debug as we have multiple levels properly written in the application.

§ High cohesion and loose coupling.

Disadvantages of MVC Pattern

o Complexity in code navigation.

o Excessive boilerplate.

o Must have strict rules on methods.

o Undermined by inevitable clustering.

Conclusion

MVC architecture is a well known and mostly used architecture in Web and mobile applications. Therefore, for those who are new to these fields can start your journey from structuring your project according to the MVC Architecture.

--

--