MVC The New Architecture


Well going back to my yesterdays mentoring session , I learned somethign really cool from my Mentor . So let me start again .MVC stands for Model, View Controller , which is a piece of new architecture and an advancement into  the .NET world . As we know the three layer Architecture in ASP.NET , wherin we have a UI Layer/ Buisness Layer/ Dataacess layer in a straight line communication , MVC rather follows a Triangular or a circular pattern wherein model, view and controller are related to each other
please check the  image below to get a diagrammatic representation of how it might look like


1.View over here is basicaly a User Interface wherein a user can have its inputs added on a website. It mostly contains all the HTML for a website.It does all the presentation for the website
2. Controller  is the one which has some part of the code which handles the inputs from the user interface(view) . say a button gets clicked . It also notofies the model of the users action so as to change the state
3. Model contains the most of the code behind .
This really helps to keep things simpler where we have a complex website which contian lots of events .. However when it somes to  building a simpler website three layer architecure is a better option to shoose from

No comments:

Post a Comment