Click here to Skip to main content
11,797,355 members (82,074 online)
Click here to Skip to main content

Tagged as

Learning MVC - Part 1: Introduction to MVC Architecture and Separation of Concerns

, 17 Mar 2015 CPOL 398.6K 251
Rate this:
Please Sign up or sign in to vote.
Introduction to MVC architecture and Separation of Concerns.



After having gone through numerous of blogs and articles, I came to a conclusion that very few of the genuine writers have explained the topic from the basic to full-fledged, while including a working application. My effort in this MVC articles series will be to cover almost all the aspects of MVC starting from creating a simple app and connecting with the database with various Microsoft providers. We’ll be gradually moving forward part by part so we can understand and practically implement every scenario.

Road Map


All set? Let's start our journey with Part1.  

Part1: Introduction to MVC architecture and Separation of Concerns

Topics to be Covered

  1. What does MVC mean.
  2. Understanding MVC Architecture.
  3. Separation of Concerns


Model: The business entity on which the overall application operates. Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be encapsulated by the Model.

View: The user interface that renders the model into a form of interaction.

Controller: Handles a request from a view and updates the model that results a change in Model’s state.

To implement MVC in .NET we need mainly three classes (View, Controller and the Model).

MVC Architecture

           The choice of MVC comes when we go for a solution where the separation of concerns, ease of maintainability and extensibility of an application matters a lot. As per the architecture given below, we can see the request-response flow of a MVC application.

The architecture is self explanatory. The browser (as usual) sends a request to IIS, IIS searches for the route defined in MVC application and passes the request to the controller as per route, the controller communicates with the model and passes the populated model (entity) to View (front end), Views are populated with model properties, and are rendered on the browser, passing the response to browser through IIS via controllers which invoked the particular View.

Separation of Concern

As per Wikipedia 'the process of breaking a computer program into distinct features that overlap in functionality as little as possible'. MVC design pattern aims to separate content from presentation and data-processing from content. Theoretically sound, but where do we see this in MVC? One place is reasonably clear - between the data-processing (Model) and the rest of the application.

When we talk about Views and Controllers, their ownership itself explains separation. The views are just the presentation form of an application, it does not have to know specifically about the requests coming from controller. The Model is independent of View and Controllers, it only holds business entities that can be passed to any View by the controller as required for exposing them to the end user. The controller is independent of Views and Models, its sole purpose is to handle requests and pass it on as per the routes defined and as per the need of rendering views. Thus our business entities (model), business logic (controllers) and presentation logic (views) lie in logical/physical layers independent of each other.


Now that we know why and where to use MVC, in the next part of the series we’ll be creating an MVC application from scratch, and exploring the practical implementation of MVC. For more informative articles,visit my blog A Practical Approach 

Learn  Code First Approach using Entity Framework 4.1, Inversion of Control, Unity Framework, Repository & Unit of Work Pattern and MVC3 Razor View  , a complete end to end solution. 






This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Akhil Mittal
Technical Lead
India India
I am a C# Corner MVP,a Code project MVP,blogger,programmer by heart and currently working as a Sr. Analyst in Magic Software and have an experience of more than 8 years in C#.Net. I am a B.Tech in Computer Science and hold a diploma in Information Security and Application Development. My work experience includes Development of Enterprise Applications using C#,.Net and Sql Server,Analysis as well as Research and Development. I am a MCP in Web Applications(MCTS-70-528,MCTS-70-515) and .Net Framework 2.0 (MCTS-70-536). Visit my personal blog A Practical Approach for more informative articles.
Article of Day on 16 Aug 2013.
Article of Day on 28 Aug 2013.
Article of Day on 08 Sept 2013.
Article of Day on 29 Sept 2013.
Article of Day on 29 Oct 2013.
Article of Day on 21 May 2014.
Article of Day on 19 July 2014.
Article of Day on 01 June 2015.
Article of Day on 02 June 2015.
Article of Day on 08 June 2015.
Article of Day on 28 June 2015.
Article of Day on 28 July 2015.
Article of Day on 01 Aug 2015.
Group type: Collaborative Group

318 members

You may also be interested in...

Comments and Discussions

GeneralNicely explained Pin
Vikas Sharma1-Jul-15 23:16
memberVikas Sharma1-Jul-15 23:16 
GeneralRe: Nicely explained Pin
Akhil Mittal 1-Jul-15 23:19
mvp Akhil Mittal 1-Jul-15 23:19 
GeneralMy vote of 5 Pin
udeep kansal17-Jun-15 7:20
memberudeep kansal17-Jun-15 7:20 
GeneralRe: My vote of 5 Pin
Akhil Mittal 17-Jun-15 22:24
mvp Akhil Mittal 17-Jun-15 22:24 
QuestionGood explanation Pin
Its Tinku3-Feb-15 0:42
memberIts Tinku3-Feb-15 0:42 
AnswerRe: Good explanation Pin
Akhil Mittal 8-Feb-15 20:41
mvp Akhil Mittal 8-Feb-15 20:41 
GeneralMy vote of 1 Pin
Syed M Hussain30-Jun-14 2:14
memberSyed M Hussain30-Jun-14 2:14 
GeneralMy vote of 1 Pin
Member 1001700228-May-14 21:18
memberMember 1001700228-May-14 21:18 
GeneralMy vote of 1 Pin
deba prasad satapathy22-Apr-14 22:42
memberdeba prasad satapathy22-Apr-14 22:42 
GeneralRe: My vote of 1 Pin
Akhil_Mittal22-Apr-14 22:44
mvpAkhil_Mittal22-Apr-14 22:44 
GeneralMy vote of 2 Pin
_Gandalf - The White_18-Feb-14 20:43
member_Gandalf - The White_18-Feb-14 20:43 
GeneralRe: My vote of 2 Pin
Akhil_Mittal19-Feb-14 5:00
mvpAkhil_Mittal19-Feb-14 5:00 
GeneralRe: My vote of 2 Pin
_Gandalf - The White_19-Feb-14 19:15
member_Gandalf - The White_19-Feb-14 19:15 
GeneralMy vote of 2 Pin
_Psychopomp_10-Sep-13 5:46
member_Psychopomp_10-Sep-13 5:46 
GeneralRe: My vote of 2 Pin
Akhil_Mittal10-Sep-13 17:46
groupAkhil_Mittal10-Sep-13 17:46 
GeneralMy vote of 2 Pin
BillWoodruff10-Sep-13 3:11
memberBillWoodruff10-Sep-13 3:11 
GeneralRe: My vote of 2 Pin
Akhil_Mittal10-Sep-13 17:45
groupAkhil_Mittal10-Sep-13 17:45 
GeneralMy vote of 5 Pin
VitorHugoGarcia9-Sep-13 22:13
memberVitorHugoGarcia9-Sep-13 22:13 
GeneralRe: My vote of 5 Pin
Akhil_Mittal9-Sep-13 22:48
groupAkhil_Mittal9-Sep-13 22:48 
QuestionThis sould not be an article Pin
Pete O'Hanlon9-Sep-13 2:28
protectorPete O'Hanlon9-Sep-13 2:28 
AnswerRe: This sould not be an article Pin
Akhil_Mittal9-Sep-13 3:42
groupAkhil_Mittal9-Sep-13 3:42 

Thanks for reading my blog.To update you, code project was the first platform where I shared this article.Thereafter I placed this article on my blog.Please compare the dates.
I just want to help readers, no matter where they read the content from,what matters is content should be original and useful.
Do not forget to comment and rate the article if it helped you by any means Smile | :) ...
For any technical requirement related to .net ,OOPS,C# and design patterns contact me on

GeneralRe: This sould not be an article Pin
Pete O'Hanlon9-Sep-13 3:50
protectorPete O'Hanlon9-Sep-13 3:50 
SuggestionRe: This sould not be an article Pin
Kornfeld Eliyahu Peter30-Apr-14 0:07
professionalKornfeld Eliyahu Peter30-Apr-14 0:07 
GeneralArticle of the day on Microsoft's Site Pin
Akhil_Mittal27-Aug-13 19:54
groupAkhil_Mittal27-Aug-13 19:54 
GeneralMy vote of 5 Pin
Menon Santosh22-Aug-13 20:40
professionalMenon Santosh22-Aug-13 20:40 
GeneralRe: My vote of 5 Pin
Akhil_Mittal22-Aug-13 22:45
groupAkhil_Mittal22-Aug-13 22:45 
GeneralRe: My vote of 5 Pin
Menon Santosh23-Aug-13 3:24
professionalMenon Santosh23-Aug-13 3:24 
GeneralMy Vote of 5 Pin
sridharsh16-Aug-13 4:39
membersridharsh16-Aug-13 4:39 
GeneralMy vote of 5 Pin
Chris Dis15-Aug-13 22:46
memberChris Dis15-Aug-13 22:46 
GeneralRe: My vote of 5 Pin
Akhil_Mittal15-Aug-13 22:47
groupAkhil_Mittal15-Aug-13 22:47 
GeneralMy vote of 5 Pin
garg prachi15-Aug-13 4:15
membergarg prachi15-Aug-13 4:15 
GeneralMy vote of 3 Pin
darkhorse_code13-Aug-13 1:12
memberdarkhorse_code13-Aug-13 1:12 
QuestionWhat is "independence" wrt MVC Pin
darkhorse_code13-Aug-13 1:09
memberdarkhorse_code13-Aug-13 1:09 
GeneralMy vote of 5 Pin
Member 1020215510-Aug-13 22:31
memberMember 1020215510-Aug-13 22:31 
GeneralMy Vote of 5 Pin
Member 101973838-Aug-13 1:05
memberMember 101973838-Aug-13 1:05 
GeneralMy vote of 4 Pin
niteshkrl29-Jul-13 19:52
memberniteshkrl29-Jul-13 19:52 
GeneralRe: My vote of 4 Pin
Akhil_Mittal29-Jul-13 20:06
groupAkhil_Mittal29-Jul-13 20:06 
QuestionLearning MVC Pin
msnbilly18-Jul-13 15:30
membermsnbilly18-Jul-13 15:30 
AnswerRe: Learning MVC Pin
Akhil_Mittal20-Jul-13 5:26
groupAkhil_Mittal20-Jul-13 5:26 
GeneralMy vote of 2 Pin
mevahid16-Jul-13 20:17
membermevahid16-Jul-13 20:17 
SuggestionArticle is not up to the mark. Pin
mevahid16-Jul-13 20:16
membermevahid16-Jul-13 20:16 
GeneralRe: Article is not up to the mark. Pin
Akhil_Mittal16-Jul-13 22:13
groupAkhil_Mittal16-Jul-13 22:13 
GeneralRe: Article is not up to the mark. Pin
mevahid16-Jul-13 22:37
membermevahid16-Jul-13 22:37 
GeneralRe: Article is not up to the mark. Pin
Akhil_Mittal16-Jul-13 23:05
groupAkhil_Mittal16-Jul-13 23:05 
QuestionPart 7 suggested Pin
Member 1010021016-Jul-13 7:13
memberMember 1010021016-Jul-13 7:13 
AnswerRe: Part 7 suggested Pin
Akhil_Mittal16-Jul-13 22:18
groupAkhil_Mittal16-Jul-13 22:18 
GeneralRe: Part 7 suggested Pin
choldi16-Jul-13 23:38
membercholdi16-Jul-13 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.151002.1 | Last Updated 18 Mar 2015
Article Copyright 2013 by Akhil Mittal
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid